Move to smartling for translation services

This commit is contained in:
Scott Nonnenberg 2022-09-27 14:01:06 -07:00 committed by GitHub
parent 620067342a
commit 5957c111cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 1394 additions and 64465 deletions

View file

@ -10,6 +10,11 @@ import { MINUTE } from '../../util/durations';
import type { SystemTrayServiceOptionsType } from '../../../app/SystemTrayService';
import { SystemTrayService } from '../../../app/SystemTrayService';
import { setupI18n } from '../../util/setupI18n';
import enMessages from '../../../_locales/en/messages.json';
const i18n = setupI18n('en', enMessages);
describe('SystemTrayService', function thisNeeded() {
// These tests take more time on CI in some cases, so we increase the timeout.
@ -28,12 +33,7 @@ describe('SystemTrayService', function thisNeeded() {
options?: Partial<SystemTrayServiceOptionsType>
): SystemTrayService {
const result = new SystemTrayService({
messages: {
hide: { message: 'Hide' },
quit: { message: 'Quit' },
show: { message: 'Show' },
signalDesktop: { message: 'Signal' },
},
i18n,
...options,
});
servicesCreated.add(result);

View file

@ -196,7 +196,7 @@ const PLATFORMS = [
];
describe('createTemplate', () => {
const { messages } = loadLocale({
const { i18n } = loadLocale({
appLocale: 'en',
logger: {
error(arg: unknown) {
@ -237,7 +237,7 @@ describe('createTemplate', () => {
...actions,
};
const actual = createTemplate(options, messages);
const actual = createTemplate(options, i18n);
assert.deepEqual(actual, expectedDefault);
});
@ -265,7 +265,7 @@ describe('createTemplate', () => {
return menuItem;
});
const actual = createTemplate(options, messages);
const actual = createTemplate(options, i18n);
assert.deepEqual(actual, expected);
});
});