Skip to content

Commit

Permalink
Rename "Bookmarks Bar/bar" to "Bookmarks" (brave-browser)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Oct 9, 2019
1 parent 1b87817 commit 9360be7
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions lib/l10nUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ const braveSettingsPartPath = path.resolve(path.join(srcDir, 'brave', 'app', 'se

// component_chromium_strings.grd and any of its parts files that we track localization for in transifex
// These map to brave/app/strings/components_chromium_strings*.xtb
const chromiumComponentsStringsPath = path.resolve(path.join(srcDir, 'components', 'components_chromium_strings.grd'))
const braveChromiumComponentsStringsPath = path.resolve(path.join(srcDir, 'brave', 'app', 'components_brave_strings.grd'))
const chromiumComponentsChromiumStringsPath = path.resolve(path.join(srcDir, 'components', 'components_chromium_strings.grd'))
const braveComponentsBraveStringsPath = path.resolve(path.join(srcDir, 'brave', 'app', 'components_brave_strings.grd'))

// component_strings.grd and any of its parts files that we track localization for in transifex
// These map to brave/app/strings/components_strings*.xtb
const chromiumComponentsStringsPath = path.resolve(path.join(srcDir, 'components', 'components_strings.grd'))
const braveComponentsStringsPath = path.resolve(path.join(srcDir, 'brave', 'app', 'components_strings.grd'))
const chromiumBookmarksBarStringsPartPath = path.resolve(path.join(srcDir, 'components', 'bookmark_bar_strings.grdp'))
const braveBookmarksBarStringsPartPath = path.resolve(path.join(srcDir, 'brave', 'app', 'bookmark_bar_strings.grdp'))

// generated_resources.grd and any of its parts files that we track localization for in transifex
// There is also chromeos_strings.grdp but we don't need to track it here
Expand Down Expand Up @@ -57,7 +64,7 @@ const braveAppManagementStringsPartPath = path.resolve(path.join(srcDir, 'brave'
// brave_components_strings.grd maps to brave/components/resources/strings/brave_components_resources*.xtb
// messages.json localization is handled inside of brave-extension.
const braveSpecificGeneratedResourcesPath = path.resolve(path.join(srcDir, 'brave', 'app', 'brave_generated_resources.grd'))
const braveComponentsStringsPath = path.resolve(path.join(srcDir, 'brave', 'components', 'resources', 'brave_components_strings.grd'))
const braveResourcesComponentsStringsPath = path.resolve(path.join(srcDir, 'brave', 'components', 'resources', 'brave_components_strings.grd'))
const braveExtensionMessagesPath = path.resolve(path.join(srcDir, 'brave', 'components', 'brave_extension', 'extension', 'brave_extension', '_locales', 'en_US', 'messages.json'))
const braveRewardsExtensionMessagesPath = path.resolve(path.join(srcDir, 'brave', 'components', 'brave_rewards', 'resources', 'extension', 'brave_rewards', '_locales', 'en_US', 'messages.json'))

Expand All @@ -69,7 +76,9 @@ const braveRewardsExtensionMessagesPath = path.resolve(path.join(srcDir, 'brave'
const chromiumToAutoGeneratedBraveMapping = {
[chromiumStringsPath]: braveStringsPath,
[chromiumSettingsPartPath]: braveSettingsPartPath,
[chromiumComponentsStringsPath]: braveChromiumComponentsStringsPath,
[chromiumComponentsChromiumStringsPath]: braveComponentsBraveStringsPath,
[chromiumComponentsStringsPath]: braveComponentsStringsPath,
[chromiumBookmarksBarStringsPartPath]: braveBookmarksBarStringsPartPath,
[chromiumGeneratedResourcesPath]: braveGeneratedResourcesPath,
[chromiumBookmarksPartPath]: braveBookmarksPartPath,
[chromiumMediaRouterPartPath]: braveMediaRouterPartPath,
Expand All @@ -88,7 +97,7 @@ module.exports.autoGeneratedBraveToChromiumMapping = Object.keys(chromiumToAutoG

// All paths which are not generated
module.exports.braveNonGeneratedPaths = [
braveSpecificGeneratedResourcesPath, braveComponentsStringsPath, braveExtensionMessagesPath, braveRewardsExtensionMessagesPath
braveSpecificGeneratedResourcesPath, braveResourcesComponentsStringsPath, braveExtensionMessagesPath, braveRewardsExtensionMessagesPath
]

// All paths which are generated
Expand Down Expand Up @@ -149,4 +158,6 @@ const defaultReplacements = [
[/(?<!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'],
]

0 comments on commit 9360be7

Please sign in to comment.