diff --git a/lib/l10nUtil.js b/lib/l10nUtil.js index e2fa735e4721..a635f513149e 100644 --- a/lib/l10nUtil.js +++ b/lib/l10nUtil.js @@ -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) @@ -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'], @@ -248,3 +250,12 @@ const defaultReplacements = [ [/bookmarks bar\n/g, 'bookmarks\n'], [/Copyright /g, 'Copyright © '], ] + +// 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'], +]