Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup some strings for google product names #8012

Merged
merged 1 commit into from
Feb 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion 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 @@ -230,7 +233,6 @@ const defaultReplacements = [
[/Chrome/g, 'Brave'],
[/Google LLC. All rights reserved./g, 'The Brave Authors. All rights reserved.'],
[/(Google)(?! Play)/g, 'Brave'],
[/Brave Safe Browsing/g, 'Google Safe Browsing'],
[/You're incognito/g, 'This is a private window'],
[/an incognito/g, 'a private'],
[/an Incognito/g, 'a Private'],
Expand All @@ -248,3 +250,12 @@ 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 Cloud Print/g, 'Google Cloud Print'],
[/Brave Docs/g, 'Google Docs'],
[/Brave Drive/g, 'Google Drive'],
[/Brave OS/g, 'Chrome OS'],
[/Brave Safe Browsing/g, 'Google Safe Browsing'],
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should [/Brave Safe Browsing/g, 'Google Safe Browsing'], from the defaultReplacements be moved here as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved. it would be good to have them in one place.