diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-27 11:20:06 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 11:20:06 +0200 |
commit | a9155ee6dc632e860784c0c9969b594b80355276 (patch) | |
tree | bc9e279d25d5e5e649d72b991263ea8000663e74 /client/src/app | |
parent | b18d4b9f368fd20d6990bd4e9459bb539141a2c1 (diff) | |
download | PeerTube-a9155ee6dc632e860784c0c9969b594b80355276.tar.gz PeerTube-a9155ee6dc632e860784c0c9969b594b80355276.tar.zst PeerTube-a9155ee6dc632e860784c0c9969b594b80355276.zip |
Add portuguese and swedish languages
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/menu/language-chooser.component.ts | 7 |
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 @@ | |||
1 | import { Component, ElementRef, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, ViewChild } from '@angular/core' |
2 | import { I18N_LOCALES } from '../../../../shared' | 2 | import { I18N_LOCALES } from '../../../../shared' |
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
4 | import { 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 () { |