aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/i18n
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-16 10:48:35 +0200
committerChocobozzz <me@florianbigard.com>2018-08-16 10:48:35 +0200
commit3dfa84940273619ae00f11a5f419a5e4876b2f53 (patch)
treebd31beeb985a9696af90e15ff6b767c4a0da03d9 /client/src/app/shared/i18n
parent4f1f6f038389ce9cdf0c77dfccdc63efc6948101 (diff)
downloadPeerTube-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.ts7
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 @@
1import { environment } from '../../../environments/environment' 1import { environment } from '../../../environments/environment'
2 2
3function peertubeTranslate (str: string, translations: { [ id: string ]: string }) {
4 return translations[str] ? translations[str] : str
5}
6
7function isOnDevLocale () { 3function 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
15export { 11export {
16 getDevLocale, 12 getDevLocale,
17 isOnDevLocale, 13 isOnDevLocale
18 peertubeTranslate
19} 14}