X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fmain.ts;h=061be17deec6ea3bc5441c57124481122c09e15f;hb=8244e18719e10ab1a376506ee30f941e5725e8ed;hp=85c4c0672a0929a9e253f98319992c126b1c66c8;hpb=e309822b93d9b69f30cbe830ef3d09dfdb2c13b2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/main.ts b/client/src/main.ts index 85c4c0672..061be17de 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -5,14 +5,17 @@ import { AppModule } from './app/app.module' import { environment } from './environments/environment' import { hmrBootstrap } from './hmr' +import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' let providers = [] if (environment.production) { enableProdMode() } -if (environment.production === false && window.location.search === '?lang=fr') { - const translations = require(`raw-loader!./locale/target/messages_fr.xml`) +// Template translation, should be in the bootstrap step +if (isOnDevLocale()) { + const locale = getDevLocale() + const translations = require(`raw-loader!./locale/target/angular_${locale}.xml`) providers = [ { provide: TRANSLATIONS, useValue: translations },