diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:01:45 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:02:27 +0200 |
commit | e309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch) | |
tree | 41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/app.module.ts | |
parent | d4d5853e65e584ca51c718f8df590b987f981047 (diff) | |
download | PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.gz PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.zst PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.zip |
Add form validator translations
Diffstat (limited to 'client/src/app/app.module.ts')
-rw-r--r-- | client/src/app/app.module.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 44552021f..9992b9c44 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -17,6 +17,7 @@ import { SharedModule } from './shared' | |||
17 | import { SignupModule } from './signup' | 17 | import { SignupModule } from './signup' |
18 | import { VideosModule } from './videos' | 18 | import { VideosModule } from './videos' |
19 | import { buildFileLocale, getDefaultLocale } from '../../../shared/models/i18n' | 19 | import { buildFileLocale, getDefaultLocale } from '../../../shared/models/i18n' |
20 | import { environment } from '../environments/environment' | ||
20 | 21 | ||
21 | export function metaFactory (serverService: ServerService): MetaLoader { | 22 | export function metaFactory (serverService: ServerService): MetaLoader { |
22 | return new MetaStaticLoader({ | 23 | return new MetaStaticLoader({ |
@@ -66,6 +67,11 @@ export function metaFactory (serverService: ServerService): MetaLoader { | |||
66 | { | 67 | { |
67 | provide: TRANSLATIONS, | 68 | provide: TRANSLATIONS, |
68 | useFactory: (locale) => { | 69 | useFactory: (locale) => { |
70 | // On dev mode, test locales | ||
71 | if (environment.production === false && window.location.search === '?lang=fr') { | ||
72 | return require(`raw-loader!../locale/target/messages_fr.xml`) | ||
73 | } | ||
74 | |||
69 | const fileLocale = buildFileLocale(locale) | 75 | const fileLocale = buildFileLocale(locale) |
70 | 76 | ||
71 | // Default locale, nothing to translate | 77 | // Default locale, nothing to translate |