X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fassets%2Fplayer%2Ftranslations-manager.ts;h=d5a09a31a71bfc71ee8c4088533a0d66a27e7220;hb=26171379d0196ac645923e72b12e1cf29089835b;hp=2bde7d6caa9694c02611b0a7f58a6d137073730f;hpb=583eb04b541175035d6d452ca626a96ebf2b7437;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/assets/player/translations-manager.ts b/client/src/assets/player/translations-manager.ts index 2bde7d6ca..d5a09a31a 100644 --- a/client/src/assets/player/translations-manager.ts +++ b/client/src/assets/player/translations-manager.ts @@ -1,9 +1,9 @@ -import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '@shared/models' +import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '@shared/core-utils/i18n' export class TranslationsManager { private static videojsLocaleCache: { [ path: string ]: any } = {} - static getServerTranslations (serverUrl: string, locale: string) { + static getServerTranslations (serverUrl: string, locale: string): Promise<{ [id: string]: string }> { const path = TranslationsManager.getLocalePath(serverUrl, locale) // It is the default locale, nothing to translate if (!path) return Promise.resolve(undefined)