Prefix preferred system locales with l10n_util logic
This commit is contained in:
parent
e51f582bfb
commit
ab7ab91429
2 changed files with 12 additions and 4 deletions
|
@ -1619,7 +1619,11 @@ ipc.on('database-error', (_event: Electron.Event, error: string) => {
|
|||
function loadPreferredSystemLocales(): Array<string> {
|
||||
return getEnvironment() === Environment.Test
|
||||
? ['en']
|
||||
: app.getPreferredSystemLanguages();
|
||||
: [
|
||||
// TODO(DESKTOP-4929): Temp fix to inherit Chromium's l10n_util logic
|
||||
app.getLocale(),
|
||||
...app.getPreferredSystemLanguages(),
|
||||
];
|
||||
}
|
||||
|
||||
async function getDefaultLoginItemSettings(): Promise<LoginItemSettingsOptions> {
|
||||
|
@ -1676,7 +1680,7 @@ app.on('ready', async () => {
|
|||
logger.info(
|
||||
`app.ready: preferred system locales: ${preferredSystemLocales.join(
|
||||
', '
|
||||
)}}`
|
||||
)}`
|
||||
);
|
||||
resolvedTranslationsLocale = loadLocale({
|
||||
preferredSystemLocales,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue