mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-14 23:18:54 +00:00
Fix reference to build-localized-display-names script
This commit is contained in:
@@ -8,7 +8,7 @@ import * as Errors from '../ts/types/errors.std.js';
|
||||
import { redactAll } from '../ts/util/privacy.node.js';
|
||||
import { createLogger } from '../ts/logging/log.std.js';
|
||||
import { reallyJsonStringify } from '../ts/util/reallyJsonStringify.std.js';
|
||||
import type { LocaleType } from './locale.main.js';
|
||||
import type { LocaleType } from './locale.node.js';
|
||||
|
||||
const log = createLogger('global_errors');
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
import { join } from 'node:path';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { app } from 'electron';
|
||||
import lodash from 'lodash';
|
||||
import * as LocaleMatcher from '@formatjs/intl-localematcher';
|
||||
import { z } from 'zod';
|
||||
@@ -124,17 +123,19 @@ export function _getAvailableLocales(): Array<string> {
|
||||
}
|
||||
|
||||
export function load({
|
||||
preferredSystemLocales,
|
||||
localeOverride,
|
||||
localeDirectionTestingOverride,
|
||||
hourCyclePreference,
|
||||
isPackaged,
|
||||
localeDirectionTestingOverride,
|
||||
localeOverride,
|
||||
logger,
|
||||
preferredSystemLocales,
|
||||
}: {
|
||||
preferredSystemLocales: Array<string>;
|
||||
localeOverride: string | null;
|
||||
localeDirectionTestingOverride: LocaleDirection | null;
|
||||
hourCyclePreference: HourCyclePreference;
|
||||
isPackaged: boolean;
|
||||
localeDirectionTestingOverride: LocaleDirection | null;
|
||||
localeOverride: string | null;
|
||||
logger: LoggerType;
|
||||
preferredSystemLocales: Array<string>;
|
||||
}): LocaleType {
|
||||
if (preferredSystemLocales == null) {
|
||||
throw new TypeError('locale: `preferredSystemLocales` is required');
|
||||
@@ -163,7 +164,7 @@ export function load({
|
||||
const countryDisplayNames = getCountryDisplayNames();
|
||||
|
||||
let finalMessages: LocaleMessagesType;
|
||||
if (app.isPackaged) {
|
||||
if (isPackaged) {
|
||||
const matchedLocaleMessages = getCompactLocaleValues(matchedLocale);
|
||||
const englishMessages = getCompactLocaleValues('en');
|
||||
const keys = getCompactLocaleKeys();
|
||||
@@ -119,8 +119,8 @@ import { SettingsChannel } from '../ts/main/settingsChannel.main.js';
|
||||
import { maybeParseUrl, setUrlSearchParams } from '../ts/util/url.std.js';
|
||||
import { getHeicConverter } from '../ts/workers/heicConverterMain.main.js';
|
||||
|
||||
import type { LocaleDirection, LocaleType } from './locale.main.js';
|
||||
import { load as loadLocale } from './locale.main.js';
|
||||
import type { LocaleDirection, LocaleType } from './locale.node.js';
|
||||
import { load as loadLocale } from './locale.node.js';
|
||||
|
||||
import { HourCyclePreference } from '../ts/types/I18N.std.js';
|
||||
import { ScreenShareStatus } from '../ts/types/Calling.std.js';
|
||||
@@ -2075,11 +2075,12 @@ app.on('ready', async () => {
|
||||
|
||||
log.info('app.ready: preferred system locales:', preferredSystemLocales);
|
||||
resolvedTranslationsLocale = loadLocale({
|
||||
preferredSystemLocales,
|
||||
localeOverride,
|
||||
localeDirectionTestingOverride,
|
||||
hourCyclePreference,
|
||||
isPackaged: app.isPackaged,
|
||||
localeDirectionTestingOverride,
|
||||
localeOverride,
|
||||
logger: log,
|
||||
preferredSystemLocales,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user