From a9155ee6dc632e860784c0c9969b594b80355276 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Aug 2018 11:20:06 +0200 Subject: Add portuguese and swedish languages --- client/src/app/menu/language-chooser.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/menu/language-chooser.component.ts b/client/src/app/menu/language-chooser.component.ts index 45fa73e76..8eb84673e 100644 --- a/client/src/app/menu/language-chooser.component.ts +++ b/client/src/app/menu/language-chooser.component.ts @@ -1,6 +1,7 @@ import { Component, ElementRef, ViewChild } from '@angular/core' import { I18N_LOCALES } from '../../../../shared' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { sortBy } from '@app/shared/misc/utils' @Component({ selector: 'my-language-chooser', @@ -13,8 +14,10 @@ export class LanguageChooserComponent { languages: { id: string, label: string }[] = [] constructor (private modalService: NgbModal) { - this.languages = Object.keys(I18N_LOCALES) - .map(k => ({ id: k, label: I18N_LOCALES[k] })) + const l = Object.keys(I18N_LOCALES) + .map(k => ({ id: k, label: I18N_LOCALES[k] })) + + this.languages = sortBy(l, 'label') } show () { -- cgit v1.2.3