diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-06 18:04:33 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-06 18:04:33 +0200 |
commit | 9f16472264b74345cb8c13dde98a5950253854ad (patch) | |
tree | 76f2cc81fd87d8b0065cabc57d9268136cf0bb0b /shared/models | |
parent | 74b7c6d48e9ca377fe938c8134ed74b612e62ba0 (diff) | |
download | PeerTube-9f16472264b74345cb8c13dde98a5950253854ad.tar.gz PeerTube-9f16472264b74345cb8c13dde98a5950253854ad.tar.zst PeerTube-9f16472264b74345cb8c13dde98a5950253854ad.zip |
Rename fr locale -> fr-FR
Diffstat (limited to 'shared/models')
-rw-r--r-- | shared/models/i18n/i18n.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index be1420150..e0e5982f9 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts | |||
@@ -2,11 +2,12 @@ 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 (US)', |
5 | fr: 'French' | 5 | 'fr-FR': 'French (France)' |
6 | } | 6 | } |
7 | 7 | ||
8 | const I18N_LOCALE_ALIAS = { | 8 | const I18N_LOCALE_ALIAS = { |
9 | 'en': 'en-US' | 9 | 'en': 'en-US', |
10 | 'fr': 'fr-FR' | ||
10 | } | 11 | } |
11 | 12 | ||
12 | export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES) | 13 | export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES) |
@@ -38,6 +39,12 @@ export function getCompleteLocale (locale: string) { | |||
38 | return locale | 39 | return locale |
39 | } | 40 | } |
40 | 41 | ||
42 | export function getShortLocale (locale: string) { | ||
43 | if (locale.indexOf('-') === -1) return locale | ||
44 | |||
45 | return locale.split('-')[0] | ||
46 | } | ||
47 | |||
41 | export function buildFileLocale (locale: string) { | 48 | export function buildFileLocale (locale: string) { |
42 | const completeLocale = getCompleteLocale(locale) | 49 | const completeLocale = getCompleteLocale(locale) |
43 | 50 | ||