1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 23:03:32 +00:00

sort languages

This commit is contained in:
Kyle Spearrin
2018-07-23 22:45:58 -04:00
parent ad471ffde1
commit e6ba1ad934
2 changed files with 8 additions and 3 deletions

2
jslib

Submodule jslib updated: 790e50f2b6...6dc13e8579

View File

@@ -19,6 +19,8 @@ import { ConstantsService } from 'jslib/services/constants.service';
import { ElectronConstants } from 'jslib/electron/electronConstants';
import { Utils } from 'jslib/misc/utils';
@Component({
selector: 'app-settings',
templateUrl: 'settings.component.html',
@@ -55,10 +57,13 @@ export class SettingsComponent implements OnInit {
{ name: i18nService.t('never'), value: null },
];
this.localeOptions = [{ name: i18nService.t('default'), value: null }];
const localeOptions: any[] = [];
i18nService.supportedTranslationLocales.forEach((locale) => {
this.localeOptions.push({ name: locale, value: locale });
localeOptions.push({ name: locale, value: locale });
});
localeOptions.sort(Utils.getSortFunction(i18nService, 'name'));
localeOptions.splice(0, 0, { name: i18nService.t('default'), value: null });
this.localeOptions = localeOptions;
this.themeOptions = [
{ name: i18nService.t('default'), value: null },