aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.module.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-12 10:40:04 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 10:28:30 +0200
commit66357162f8e1227495f09bd4f68446aad7071c6d (patch)
tree7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/app.module.ts
parent8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff)
downloadPeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz
PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst
PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip
Migrate to $localize
* Remove i18n polyfill to translate things in components * Reduce bundle sizes * Improve runtime perf * Reduce a lot the time to make a full client build * Reduce client build complexity * We don't need a service to translate things anymore (so we will be able to translate title pages etc) Unfortunately we may loose some translations in the migration process. I'll put a message on weblate to notify translators
Diffstat (limited to 'client/src/app/app.module.ts')
-rw-r--r--client/src/app/app.module.ts16
1 files changed, 1 insertions, 15 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts
index b35cc1716..5c4616153 100644
--- a/client/src/app/app.module.ts
+++ b/client/src/app/app.module.ts
@@ -81,21 +81,7 @@ registerLocaleData(localeOc, 'oc')
81 { 81 {
82 provide: APP_BASE_HREF, 82 provide: APP_BASE_HREF,
83 useValue: '/' 83 useValue: '/'
84 }, 84 }
85
86 {
87 provide: TRANSLATIONS,
88 useFactory: (locale: string) => {
89 // Default locale, nothing to translate
90 const completeLocale = getCompleteLocale(locale)
91 if (isDefaultLocale(completeLocale)) return ''
92
93 const fileLocale = buildFileLocale(locale)
94 return require(`raw-loader!../locale/angular.${fileLocale}.xlf`).default
95 },
96 deps: [ LOCALE_ID ]
97 },
98 { provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }
99 ] 85 ]
100}) 86})
101export class AppModule {} 87export class AppModule {}