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

@ -42,7 +42,7 @@ export function format(
// locale strings coming from electron use a dash as separator
// but humanizeDuration uses an underscore
const locale: string = i18n.getLocale().replace('-', '_');
const locale: string = i18n.getLocale().replace(/-/g, '_');
const localeWithoutRegion: string = locale.split('_', 1)[0];
const fallbacks: Array<string> = [];
@ -56,6 +56,11 @@ export function format(
fallbacks.push('en');
}
// humanizeDuration only supports zh_CN and zh_TW
if (locale === 'zh_HK') {
fallbacks.push('zh_TW');
}
const allUnits: Array<Unit> = ['y', 'mo', 'w', 'd', 'h', 'm', 's'];
const defaultUnits: Array<Unit> =