1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-29 07:59:42 +01:00

show locale name for language selection

This commit is contained in:
Kyle Spearrin 2019-09-06 09:33:35 -04:00
parent 2dc74b26f3
commit 85cc2865b6
2 changed files with 6 additions and 2 deletions

2
jslib

@ -1 +1 @@
Subproject commit b74ee7b3ee823a820854623cc32c8522a09e9f4d Subproject commit 255bd3962d268bec8f66411676049803bb29e0d3

View File

@ -49,7 +49,11 @@ export class OptionsComponent implements OnInit {
const localeOptions: any[] = []; const localeOptions: any[] = [];
i18nService.supportedTranslationLocales.forEach((locale) => { i18nService.supportedTranslationLocales.forEach((locale) => {
localeOptions.push({ name: locale, value: locale }); let name = locale;
if (i18nService.localeNames.has(locale)) {
name += (' - ' + i18nService.localeNames.get(locale));
}
localeOptions.push({ name: name, value: locale });
}); });
localeOptions.sort(Utils.getSortFunction(i18nService, 'name')); localeOptions.sort(Utils.getSortFunction(i18nService, 'name'));
localeOptions.splice(0, 0, { name: i18nService.t('default'), value: null }); localeOptions.splice(0, 0, { name: i18nService.t('default'), value: null });