diff options
author | Chocobozzz <me@florianbigard.com> | 2020-02-28 16:03:39 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-28 16:21:34 +0100 |
commit | bdd428a6d9138d751f8cde82867022a93f1a76cc (patch) | |
tree | c2b671c3d6a34daddd20e30656f573cf59905f13 /shared/models/i18n | |
parent | 9d94e5d7b96332d628ed835c67c2986289ead9b2 (diff) | |
download | PeerTube-bdd428a6d9138d751f8cde82867022a93f1a76cc.tar.gz PeerTube-bdd428a6d9138d751f8cde82867022a93f1a76cc.tar.zst PeerTube-bdd428a6d9138d751f8cde82867022a93f1a76cc.zip |
Update dependencies
Diffstat (limited to 'shared/models/i18n')
-rw-r--r-- | shared/models/i18n/i18n.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index 36688382d..27b911b75 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts | |||
@@ -69,11 +69,11 @@ export function peertubeTranslate (str: string, translations?: { [ id: string ]: | |||
69 | 69 | ||
70 | const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) | 70 | const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) |
71 | export function is18nPath (path: string) { | 71 | export function is18nPath (path: string) { |
72 | return possiblePaths.indexOf(path) !== -1 | 72 | return possiblePaths.includes(path) |
73 | } | 73 | } |
74 | 74 | ||
75 | export function is18nLocale (locale: string) { | 75 | export function is18nLocale (locale: string) { |
76 | return POSSIBLE_LOCALES.indexOf(locale) !== -1 | 76 | return POSSIBLE_LOCALES.includes(locale) |
77 | } | 77 | } |
78 | 78 | ||
79 | export function getCompleteLocale (locale: string) { | 79 | export function getCompleteLocale (locale: string) { |
@@ -85,7 +85,7 @@ export function getCompleteLocale (locale: string) { | |||
85 | } | 85 | } |
86 | 86 | ||
87 | export function getShortLocale (locale: string) { | 87 | export function getShortLocale (locale: string) { |
88 | if (locale.indexOf('-') === -1) return locale | 88 | if (locale.includes('-') === false) return locale |
89 | 89 | ||
90 | return locale.split('-')[0] | 90 | return locale.split('-')[0] |
91 | } | 91 | } |