diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-16 10:48:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-16 10:48:35 +0200 |
commit | 3dfa84940273619ae00f11a5f419a5e4876b2f53 (patch) | |
tree | bd31beeb985a9696af90e15ff6b767c4a0da03d9 /client/src/app/shared/i18n | |
parent | 4f1f6f038389ce9cdf0c77dfccdc63efc6948101 (diff) | |
download | PeerTube-3dfa84940273619ae00f11a5f419a5e4876b2f53.tar.gz PeerTube-3dfa84940273619ae00f11a5f419a5e4876b2f53.tar.zst PeerTube-3dfa84940273619ae00f11a5f419a5e4876b2f53.zip |
Translate subtitle langs in player
Diffstat (limited to 'client/src/app/shared/i18n')
-rw-r--r-- | client/src/app/shared/i18n/i18n-utils.ts | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/client/src/app/shared/i18n/i18n-utils.ts b/client/src/app/shared/i18n/i18n-utils.ts index 37180b930..1838dc752 100644 --- a/client/src/app/shared/i18n/i18n-utils.ts +++ b/client/src/app/shared/i18n/i18n-utils.ts | |||
@@ -1,9 +1,5 @@ | |||
1 | import { environment } from '../../../environments/environment' | 1 | import { environment } from '../../../environments/environment' |
2 | 2 | ||
3 | function peertubeTranslate (str: string, translations: { [ id: string ]: string }) { | ||
4 | return translations[str] ? translations[str] : str | ||
5 | } | ||
6 | |||
7 | function isOnDevLocale () { | 3 | function isOnDevLocale () { |
8 | return environment.production === false && window.location.search === '?lang=fr' | 4 | return environment.production === false && window.location.search === '?lang=fr' |
9 | } | 5 | } |
@@ -14,6 +10,5 @@ function getDevLocale () { | |||
14 | 10 | ||
15 | export { | 11 | export { |
16 | getDevLocale, | 12 | getDevLocale, |
17 | isOnDevLocale, | 13 | isOnDevLocale |
18 | peertubeTranslate | ||
19 | } | 14 | } |