X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fmenu%2Flanguage-chooser.component.ts;h=b42e41855902228dc91a5f7a2f4a3257bdcea3b4;hb=1e9c1b1b44b4cbd4bc4b1e97e8e6ba2df93371de;hp=c9b775921d18346f8a70c5e8756052806e5b21db;hpb=d8d8de7f8723e47f5af9eddb19c240223d11b457;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/menu/language-chooser.component.ts b/client/src/app/menu/language-chooser.component.ts index c9b775921..b42e41855 100644 --- a/client/src/app/menu/language-chooser.component.ts +++ b/client/src/app/menu/language-chooser.component.ts @@ -1,9 +1,7 @@ -import { Component, ElementRef, ViewChild, Inject, LOCALE_ID } from '@angular/core' -import { I18N_LOCALES, getShortLocale } from '../../../../shared' +import { Component, ElementRef, Inject, LOCALE_ID, ViewChild } from '@angular/core' +import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' -import { sortBy } from '@app/shared/misc/utils' -import { getCompleteLocale } from '@shared/models/i18n' -import { isOnDevLocale, getDevLocale } from '@app/shared/i18n/i18n-utils' +import { getCompleteLocale, getShortLocale, I18N_LOCALES } from '@shared/core-utils/i18n' @Component({ selector: 'my-language-chooser', @@ -20,7 +18,7 @@ export class LanguageChooserComponent { @Inject(LOCALE_ID) private localeId: string ) { const l = Object.keys(I18N_LOCALES) - .map(k => ({ id: k, label: I18N_LOCALES[k] , iso: getShortLocale(k) })) + .map(k => ({ id: k, label: I18N_LOCALES[k], iso: getShortLocale(k) })) this.languages = sortBy(l, 'label') }