]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix dev locale
authorChocobozzz <me@florianbigard.com>
Thu, 16 Aug 2018 09:48:48 +0000 (11:48 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 27 Aug 2018 07:41:54 +0000 (09:41 +0200)
client/src/app/app.module.ts
client/src/app/shared/i18n/i18n-utils.ts
client/src/main.ts

index 9d655c5237155ff2a5e3169ea4ac17d00ec56262..118831ed3ce34f5b1a6d62e91da109a96a0bac8a 100644 (file)
@@ -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`)
         }
 
index 1838dc75226b4c5ff4279aa8fc9799e42ccfa9b1..30d65a2a2853dbc1a97fa0acf6dafca945df8680 100644 (file)
@@ -5,7 +5,7 @@ function isOnDevLocale () {
 }
 
 function getDevLocale () {
-  return 'fr'
+  return 'fr-FR'
 }
 
 export {
index 061be17deec6ea3bc5441c57124481122c09e15f..f456e89c5d799e6097ae1a78a5b11468bb24a6ed 100644 (file)
@@ -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 = [