Skip to content

Commit

Permalink
Fixup some strings for google product names
Browse files Browse the repository at this point in the history
We should not replace google's own product name such as Google Docs
or Google Drive.

fix #5450
  • Loading branch information
simonhong committed Feb 2, 2020
1 parent 638457a commit d1cd6a6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/l10nUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ module.exports.rebaseBraveStringFilesOnChromiumL10nFiles = async function (path)
for (const replacement of defaultReplacements) {
contents = contents.replace(replacement[0], replacement[1])
}
for (const replacement of fixupReplacements) {
contents = contents.replace(replacement[0], replacement[1])
}
await new Promise(resolve => fs.writeFile(destPath, contents, 'utf8', resolve))
})
await Promise.all(ops)
Expand Down Expand Up @@ -248,3 +251,11 @@ const defaultReplacements = [
[/bookmarks bar\n/g, 'bookmarks\n'],
[/Copyright <ph name="(YEAR|year)">/g, 'Copyright © <ph name="$1">'],
]

// Fix up some strings after aggressive first round replacement.
const fixupReplacements = [
[/Brave Drive/g, 'Google Drive'],
[/Brave Docs/g, 'Google Docs'],
[/Brave Cloud Print/g, 'Google Cloud Print'],
[/Brave OS/g, 'Chrome OS'],
]

0 comments on commit d1cd6a6

Please sign in to comment.