aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.module.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-05 15:01:45 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 15:02:27 +0200
commite309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch)
tree41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/app.module.ts
parentd4d5853e65e584ca51c718f8df590b987f981047 (diff)
downloadPeerTube-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.ts6
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'
17import { SignupModule } from './signup' 17import { SignupModule } from './signup'
18import { VideosModule } from './videos' 18import { VideosModule } from './videos'
19import { buildFileLocale, getDefaultLocale } from '../../../shared/models/i18n' 19import { buildFileLocale, getDefaultLocale } from '../../../shared/models/i18n'
20import { environment } from '../environments/environment'
20 21
21export function metaFactory (serverService: ServerService): MetaLoader { 22export 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