mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
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 <eliobischof@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
@@ -4,6 +4,7 @@ import localeDe from '@angular/common/locales/de';
|
||||
import localeZh from '@angular/common/locales/zh';
|
||||
import localeFr from '@angular/common/locales/fr';
|
||||
import localeIt from '@angular/common/locales/it';
|
||||
import localePl from '@angular/common/locales/pl';
|
||||
import localeEn from '@angular/common/locales/en';
|
||||
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
@@ -66,6 +67,8 @@ registerLocaleData(localeFr);
|
||||
i18nIsoCountries.registerLocale(require('i18n-iso-countries/langs/fr.json'));
|
||||
registerLocaleData(localeIt);
|
||||
i18nIsoCountries.registerLocale(require('i18n-iso-countries/langs/it.json'));
|
||||
registerLocaleData(localePl);
|
||||
i18nIsoCountries.registerLocale(require('i18n-iso-countries/langs/pl.json'));
|
||||
registerLocaleData(localeEn);
|
||||
i18nIsoCountries.registerLocale(require('i18n-iso-countries/langs/en.json'));
|
||||
|
||||
|
@@ -109,7 +109,7 @@ export class LoginTextsComponent implements OnInit, OnDestroy {
|
||||
@Input() public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
|
||||
|
||||
public KeyNamesArray: string[] = KeyNamesArray;
|
||||
public LOCALES: string[] = ['en', 'de', 'it'];
|
||||
public LOCALES: string[] = ['en', 'de', 'it', 'fr', 'pl', 'zh'];
|
||||
|
||||
private sub: Subscription = new Subscription();
|
||||
|
||||
|
@@ -441,7 +441,7 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
|
||||
public locale: string = 'en';
|
||||
public LOCALES: string[] = ['en', 'de', 'it'];
|
||||
public LOCALES: string[] = ['en', 'de', 'it', 'fr', 'pl', 'zh'];
|
||||
private sub: Subscription = new Subscription();
|
||||
public canWrite$: Observable<boolean> = this.authService.isAllowed([
|
||||
this.serviceType === PolicyComponentServiceType.ADMIN
|
||||
|
@@ -59,7 +59,7 @@ export class OrgCreateComponent {
|
||||
public pwdForm?: UntypedFormGroup;
|
||||
|
||||
public genders: Gender[] = [Gender.GENDER_FEMALE, Gender.GENDER_MALE, Gender.GENDER_UNSPECIFIED];
|
||||
public languages: string[] = ['de', 'en', 'it', 'fr'];
|
||||
public languages: string[] = ['de', 'en', 'it', 'fr', 'pl', 'zh'];
|
||||
|
||||
public policy?: PasswordComplexityPolicy.AsObject;
|
||||
public usePassword: boolean = false;
|
||||
|
@@ -44,7 +44,7 @@ function passwordConfirmValidator(c: AbstractControl): any {
|
||||
export class UserCreateComponent implements OnInit, OnDestroy {
|
||||
public user: AddHumanUserRequest.AsObject = new AddHumanUserRequest().toObject();
|
||||
public genders: Gender[] = [Gender.GENDER_FEMALE, Gender.GENDER_MALE, Gender.GENDER_UNSPECIFIED];
|
||||
public languages: string[] = ['de', 'en', 'it', 'fr'];
|
||||
public languages: string[] = ['de', 'en', 'it', 'fr', 'pl', 'zh'];
|
||||
public selected: CountryPhoneCode | undefined;
|
||||
public countryPhoneCodes: CountryPhoneCode[] = [];
|
||||
public userForm!: UntypedFormGroup;
|
||||
|
@@ -31,7 +31,7 @@ import { formatPhone } from 'src/app/utils/formatPhone';
|
||||
export class AuthUserDetailComponent implements OnDestroy {
|
||||
public user?: User.AsObject;
|
||||
public genders: Gender[] = [Gender.GENDER_MALE, Gender.GENDER_FEMALE, Gender.GENDER_DIVERSE];
|
||||
public languages: string[] = ['de', 'en', 'fr', 'it', 'zh'];
|
||||
public languages: string[] = ['de', 'en', 'fr', 'it', 'pl', 'zh'];
|
||||
|
||||
private subscription: Subscription = new Subscription();
|
||||
|
||||
|
@@ -42,7 +42,7 @@ export class UserDetailComponent implements OnInit {
|
||||
public user!: User.AsObject;
|
||||
public metadata: Metadata.AsObject[] = [];
|
||||
public genders: Gender[] = [Gender.GENDER_MALE, Gender.GENDER_FEMALE, Gender.GENDER_DIVERSE];
|
||||
public languages: string[] = ['de', 'en', 'it', 'fr'];
|
||||
public languages: string[] = ['de', 'en', 'it', 'fr', 'pl', 'zh'];
|
||||
|
||||
public ChangeType: any = ChangeType;
|
||||
|
||||
|
@@ -22,7 +22,7 @@ export class LocalizedDatePipe implements PipeTransform {
|
||||
return moment(value).format(`${format}, HH:mm`);
|
||||
}
|
||||
} else {
|
||||
const lang = ['de', 'en', 'fr', 'it', 'zh'].includes(this.translateService.currentLang)
|
||||
const lang = ['de', 'en', 'fr', 'it', 'pl', 'zh'].includes(this.translateService.currentLang)
|
||||
? this.translateService.currentLang
|
||||
: 'en';
|
||||
const datePipe: DatePipe = new DatePipe(lang);
|
||||
|
@@ -973,7 +973,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "Chinese"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"SMTP": {
|
||||
"TITLE": "SMTP Einstellungen",
|
||||
@@ -1164,7 +1165,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "Chinese"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"KEYS": {
|
||||
"emailVerificationDoneText": "Email Verification erfolgreich",
|
||||
@@ -1938,7 +1940,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "Chinese"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"MEMBER": {
|
||||
"ADD": "Manager hinzufügen",
|
||||
|
@@ -973,7 +973,8 @@
|
||||
"it": "Italiano",
|
||||
"en": "English",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"SMTP": {
|
||||
"TITLE": "SMTP Settings",
|
||||
@@ -1164,7 +1165,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"KEYS": {
|
||||
"emailVerificationDoneText": "Email verification done",
|
||||
@@ -1938,7 +1940,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"MEMBER": {
|
||||
"ADD": "Add a Manager",
|
||||
|
@@ -973,7 +973,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"SMTP": {
|
||||
"TITLE": "Paramètres SMTP",
|
||||
@@ -1164,7 +1165,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"KEYS": {
|
||||
"emailVerificationDoneText": "Vérification de l'email effectuée",
|
||||
@@ -1926,7 +1928,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"MEMBER": {
|
||||
"ADD": "Ajouter un manager",
|
||||
|
@@ -974,7 +974,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"SMTP": {
|
||||
"TITLE": "Impostazioni SMTP",
|
||||
@@ -1165,7 +1166,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"KEYS": {
|
||||
"emailVerificationDoneText": "Verifica dell'e-mail terminata con successo.",
|
||||
@@ -1939,7 +1941,8 @@
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"MEMBER": {
|
||||
"ADD": "Aggiungi un manager",
|
||||
|
2027
console/src/assets/i18n/pl.json
Normal file
2027
console/src/assets/i18n/pl.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -973,7 +973,8 @@
|
||||
"it": "Italiano",
|
||||
"en": "English",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文"
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"SMTP": {
|
||||
"TITLE": "SMTP 设置",
|
||||
@@ -1159,11 +1160,12 @@
|
||||
"UNSAVED_DESCRIPTION": "您在未保存的情况下进行了更改。您现在要保存吗?",
|
||||
"LOCALE": "本地化",
|
||||
"LOCALES": {
|
||||
"de": "德语",
|
||||
"en": "英语",
|
||||
"it": "意大利语",
|
||||
"fr": "法语",
|
||||
"zh": "简体中文"
|
||||
"de": "Deutsch",
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"KEYS": {
|
||||
"emailVerificationDoneText": "电子邮件验证完成",
|
||||
@@ -1921,11 +1923,12 @@
|
||||
"3": "其他"
|
||||
},
|
||||
"LANGUAGES": {
|
||||
"de": "德语",
|
||||
"en": "英语",
|
||||
"it": "意大利语",
|
||||
"fr": "法语",
|
||||
"zh": "简体中文"
|
||||
"de": "Deutsch",
|
||||
"en": "English",
|
||||
"it": "Italiano",
|
||||
"fr": "Français",
|
||||
"zh": "简体中文",
|
||||
"pl": "Polski"
|
||||
},
|
||||
"MEMBER": {
|
||||
"ADD": "添加管理者",
|
||||
|
Reference in New Issue
Block a user