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

Upgrade from Chromium 83 to Chromium 84 (1.11.x). #10551

Merged
merged 2 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
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
56 changes: 0 additions & 56 deletions lib/l10nUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,64 +200,8 @@ module.exports.rebaseBraveStringFilesOnChromiumL10nFiles = async function (path)
const removedMap = getRemovedGRDParts(grdsWithAutoAddedGrdps)
const ops = Object.entries(chromiumToAutoGeneratedBraveMapping).map(async ([sourcePath, destPath]) => {
let contents = await new Promise(resolve => fs.readFile(sourcePath, 'utf8', (err, data) => resolve(data)))
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)
return removedMap
}

// Straight-forward string replacement list.
// Consider mapping chromium resource ID to a new brave resource ID
// for whole-message replacements, instead of adding to this list.
// TODO(petemill): Get affected message IDs and clear out the translations in transifex for re-translation.
// This could be achieved with a regex like:
// (?<before><message name="(?<id>[^"]*)"[^>]*>[^<]*)The Chromium Authors(?<after>[^<]*<\/message>)
// Until that is implemented, when adding to or modifying this list, you must manually find the
// affected source strings in transifex, and delete every language's translation via the script
// 'npm run delete_string_translations -- ...'.
// Otherwise, languages apart from US English will not get updated.
const defaultReplacements = [
[/Automatically send usage statistics and crash reports to Google/g, 'Automatically send crash reports to Google'],
[/Automatically sends usage statistics and crash reports to Google/g, 'Automatically sends crash reports to Google'],
[/Chrome Web Store/g, 'Web Store'],
[/The Chromium Authors\n/g, 'Brave Software Inc\n'],
[/The Chromium Authors. All rights reserved./g, 'The Brave Authors. All rights reserved.'],
[/Google Chrome/g, 'Brave'],
[/Chromium/g, 'Brave'],
[/Chrome/g, 'Brave'],
[/Google LLC. All rights reserved./g, 'The Brave Authors. All rights reserved.'],
[/(Google)(?! Play)/g, 'Brave'],
[/You're incognito/g, 'This is a private window'],
[/an incognito/g, 'a private'],
[/an Incognito/g, 'a Private'],
[/incognito/g, 'private'],
[/Incognito/g, 'Private'],
[/inco\&amp\;gnito/g, '&amp;private'],
[/Inco\&amp\;gnito/g, '&amp;Private'],
[/People/g, 'Profiles'],
// 'people' but only in the context of profiles, not humans.
[/(?<!authenticate )people(?! with slow connections?)/g, 'profiles'],
[/(Person)(?!\w)/g, 'Profile'],
[/(person)(?!\w)/g, 'profile'],
[/Bookmarks Bar\n/g, 'Bookmarks\n'],
[/Bookmarks bar\n/g, 'Bookmarks\n'],
[/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'],
[/Safe Browsing \(protects you and your device from dangerous sites\)/g, 'Google Safe Browsing \(protects you and your device from dangerous sites\)'],
[/Sends URLs of some pages you visit to Brave/g, 'Sends URLs of some pages you visit to Google']
]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"projects": {
"chrome": {
"dir": "src",
"tag": "83.0.4103.116",
"tag": "84.0.4147.68",
"repository": {
"url": "https://github.com/chromium/chromium"
},
Expand Down