diff options
Diffstat (limited to 'shared/models/i18n/i18n.ts')
-rw-r--r-- | shared/models/i18n/i18n.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index e2b440900..14b02a01d 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | export const LOCALE_FILES = [ 'player', 'server' ] | 1 | export const LOCALE_FILES = [ 'player', 'server' ] |
2 | 2 | ||
3 | export const I18N_LOCALES = { | 3 | export const I18N_LOCALES = { |
4 | 'en-US': 'English (US)', | 4 | 'en-US': 'English', |
5 | 'fr-FR': 'Français (France)' | 5 | 'fr-FR': 'Français' |
6 | } | 6 | } |
7 | 7 | ||
8 | const I18N_LOCALE_ALIAS = { | 8 | const I18N_LOCALE_ALIAS = { |
@@ -13,8 +13,6 @@ const I18N_LOCALE_ALIAS = { | |||
13 | export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES) | 13 | export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES) |
14 | .concat(Object.keys(I18N_LOCALE_ALIAS)) | 14 | .concat(Object.keys(I18N_LOCALE_ALIAS)) |
15 | 15 | ||
16 | const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) | ||
17 | |||
18 | export function getDefaultLocale () { | 16 | export function getDefaultLocale () { |
19 | return 'en-US' | 17 | return 'en-US' |
20 | } | 18 | } |
@@ -23,6 +21,7 @@ export function isDefaultLocale (locale: string) { | |||
23 | return getCompleteLocale(locale) === getCompleteLocale(getDefaultLocale()) | 21 | return getCompleteLocale(locale) === getCompleteLocale(getDefaultLocale()) |
24 | } | 22 | } |
25 | 23 | ||
24 | const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) | ||
26 | export function is18nPath (path: string) { | 25 | export function is18nPath (path: string) { |
27 | return possiblePaths.indexOf(path) !== -1 | 26 | return possiblePaths.indexOf(path) !== -1 |
28 | } | 27 | } |