Fix dev locale
This commit is contained in:
parent
5d128505dc
commit
c0ffdd0958
|
@ -71,7 +71,7 @@ export function metaFactory (serverService: ServerService): MetaLoader {
|
||||||
useFactory: (locale) => {
|
useFactory: (locale) => {
|
||||||
// On dev mode, test localization
|
// On dev mode, test localization
|
||||||
if (isOnDevLocale()) {
|
if (isOnDevLocale()) {
|
||||||
locale = getDevLocale()
|
locale = buildFileLocale(getDevLocale())
|
||||||
return require(`raw-loader!../locale/target/angular_${locale}.xml`)
|
return require(`raw-loader!../locale/target/angular_${locale}.xml`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ function isOnDevLocale () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDevLocale () {
|
function getDevLocale () {
|
||||||
return 'fr'
|
return 'fr-FR'
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { environment } from './environments/environment'
|
||||||
|
|
||||||
import { hmrBootstrap } from './hmr'
|
import { hmrBootstrap } from './hmr'
|
||||||
import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
|
import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
|
||||||
|
import { buildFileLocale } from '../../shared'
|
||||||
|
|
||||||
let providers = []
|
let providers = []
|
||||||
if (environment.production) {
|
if (environment.production) {
|
||||||
|
@ -14,7 +15,7 @@ if (environment.production) {
|
||||||
|
|
||||||
// Template translation, should be in the bootstrap step
|
// Template translation, should be in the bootstrap step
|
||||||
if (isOnDevLocale()) {
|
if (isOnDevLocale()) {
|
||||||
const locale = getDevLocale()
|
const locale = buildFileLocale(getDevLocale())
|
||||||
const translations = require(`raw-loader!./locale/target/angular_${locale}.xml`)
|
const translations = require(`raw-loader!./locale/target/angular_${locale}.xml`)
|
||||||
|
|
||||||
providers = [
|
providers = [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user