aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/language-chooser.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 11:20:06 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 11:20:06 +0200
commita9155ee6dc632e860784c0c9969b594b80355276 (patch)
treebc9e279d25d5e5e649d72b991263ea8000663e74 /client/src/app/menu/language-chooser.component.ts
parentb18d4b9f368fd20d6990bd4e9459bb539141a2c1 (diff)
downloadPeerTube-a9155ee6dc632e860784c0c9969b594b80355276.tar.gz
PeerTube-a9155ee6dc632e860784c0c9969b594b80355276.tar.zst
PeerTube-a9155ee6dc632e860784c0c9969b594b80355276.zip
Add portuguese and swedish languages
Diffstat (limited to 'client/src/app/menu/language-chooser.component.ts')
-rw-r--r--client/src/app/menu/language-chooser.component.ts7
1 files changed, 5 insertions, 2 deletions
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 @@
1import { Component, ElementRef, ViewChild } from '@angular/core' 1import { Component, ElementRef, ViewChild } from '@angular/core'
2import { I18N_LOCALES } from '../../../../shared' 2import { I18N_LOCALES } from '../../../../shared'
3import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 3import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4import { sortBy } from '@app/shared/misc/utils'
4 5
5@Component({ 6@Component({
6 selector: 'my-language-chooser', 7 selector: 'my-language-chooser',
@@ -13,8 +14,10 @@ export class LanguageChooserComponent {
13 languages: { id: string, label: string }[] = [] 14 languages: { id: string, label: string }[] = []
14 15
15 constructor (private modalService: NgbModal) { 16 constructor (private modalService: NgbModal) {
16 this.languages = Object.keys(I18N_LOCALES) 17 const l = Object.keys(I18N_LOCALES)
17 .map(k => ({ id: k, label: I18N_LOCALES[k] })) 18 .map(k => ({ id: k, label: I18N_LOCALES[k] }))
19
20 this.languages = sortBy(l, 'label')
18 } 21 }
19 22
20 show () { 23 show () {