From c0ffdd09582fa320446a12ada1d382fedcfcd82a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 16 Aug 2018 11:48:48 +0200 Subject: Fix dev locale --- client/src/app/app.module.ts | 2 +- client/src/app/shared/i18n/i18n-utils.ts | 2 +- client/src/main.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 9d655c523..118831ed3 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -71,7 +71,7 @@ export function metaFactory (serverService: ServerService): MetaLoader { useFactory: (locale) => { // On dev mode, test localization if (isOnDevLocale()) { - locale = getDevLocale() + locale = buildFileLocale(getDevLocale()) return require(`raw-loader!../locale/target/angular_${locale}.xml`) } diff --git a/client/src/app/shared/i18n/i18n-utils.ts b/client/src/app/shared/i18n/i18n-utils.ts index 1838dc752..30d65a2a2 100644 --- a/client/src/app/shared/i18n/i18n-utils.ts +++ b/client/src/app/shared/i18n/i18n-utils.ts @@ -5,7 +5,7 @@ function isOnDevLocale () { } function getDevLocale () { - return 'fr' + return 'fr-FR' } export { diff --git a/client/src/main.ts b/client/src/main.ts index 061be17de..f456e89c5 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -6,6 +6,7 @@ import { environment } from './environments/environment' import { hmrBootstrap } from './hmr' import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' +import { buildFileLocale } from '../../shared' let providers = [] if (environment.production) { @@ -14,7 +15,7 @@ if (environment.production) { // Template translation, should be in the bootstrap step if (isOnDevLocale()) { - const locale = getDevLocale() + const locale = buildFileLocale(getDevLocale()) const translations = require(`raw-loader!./locale/target/angular_${locale}.xml`) providers = [ -- cgit v1.2.3