diff --git a/lib/l10nUtil.js b/lib/l10nUtil.js index 0de6ef14beed0..858497efea620 100644 --- a/lib/l10nUtil.js +++ b/lib/l10nUtil.js @@ -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 @@ -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')) @@ -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, @@ -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 @@ -149,4 +158,6 @@ const defaultReplacements = [ [/(?