mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
sort languages
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 790e50f2b6...6dc13e8579
@@ -19,6 +19,8 @@ import { ConstantsService } from 'jslib/services/constants.service';
|
|||||||
|
|
||||||
import { ElectronConstants } from 'jslib/electron/electronConstants';
|
import { ElectronConstants } from 'jslib/electron/electronConstants';
|
||||||
|
|
||||||
|
import { Utils } from 'jslib/misc/utils';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-settings',
|
selector: 'app-settings',
|
||||||
templateUrl: 'settings.component.html',
|
templateUrl: 'settings.component.html',
|
||||||
@@ -55,10 +57,13 @@ export class SettingsComponent implements OnInit {
|
|||||||
{ name: i18nService.t('never'), value: null },
|
{ name: i18nService.t('never'), value: null },
|
||||||
];
|
];
|
||||||
|
|
||||||
this.localeOptions = [{ name: i18nService.t('default'), value: null }];
|
const localeOptions: any[] = [];
|
||||||
i18nService.supportedTranslationLocales.forEach((locale) => {
|
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 = [
|
this.themeOptions = [
|
||||||
{ name: i18nService.t('default'), value: null },
|
{ name: i18nService.t('default'), value: null },
|
||||||
|
|||||||
Reference in New Issue
Block a user