feat: internationalization Polish (#5117)

* Add Polish translations

* Add references to Polish translations in files

* Make a consistent translation of languages in Chinese translation

* Add missing language references to fr, it and zh

* Translation corrections

* Add missing language references to zh

* Translation corrections

* add latest translation keys

* Translation corrections and addition of some new ones

* translate auth requests exhausted

* add new untranslated keys

* Translation corrections, fix indentation

---------

Co-authored-by: Elio Bischof <[email protected]>
This commit is contained in:
uiopak
2023-02-13 12:03:34 +01:00
committed by GitHub
co-authored by Elio Bischof
parent 0e812cf0f4
commit 84fa20f1ce
26 changed files with 3691 additions and 37 deletions
+3 -3
View File
@@ -262,15 +262,15 @@ export class AppComponent implements OnDestroy {
}
private setLanguage(): void {
this.translate.addLangs(['en', 'de', 'zh']);
this.translate.addLangs(['en', 'de', 'fr', 'it', 'pl', 'zh']);
this.translate.setDefaultLang('en');
this.authService.user.subscribe((userprofile) => {
if (userprofile) {
const cropped = navigator.language.split('-')[0] ?? 'en';
const fallbackLang = cropped.match(/en|de|it|zh/) ? cropped : 'en';
const fallbackLang = cropped.match(/en|de|fr|it|pl|zh/) ? cropped : 'en';
const lang = userprofile?.human?.profile?.preferredLanguage.match(/en|de|it|zh/)
const lang = userprofile?.human?.profile?.preferredLanguage.match(/en|de|fr|it|pl|zh/)
? userprofile.human.profile?.preferredLanguage
: fallbackLang;
this.translate.use(lang);