feat: internationalization Chinese (#4222)

* feat: internationalization chinese

* typo: optimize the semantic expression of copywriting

* Update internal/api/ui/login/static/i18n/zh.yaml

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/it.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/en.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/zh.json

Co-authored-by: Silvan <[email protected]>

* Update internal/api/ui/login/static/i18n/zh.yaml

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/it.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/it.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/fr.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/en.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/en.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/fr.json

Co-authored-by: Silvan <[email protected]>

* Update console/src/assets/i18n/fr.json

Co-authored-by: Silvan <[email protected]>

* minor: add Chinese to other language file

* Update console/src/app/app.module.ts

Co-authored-by: Max Peintner <[email protected]>

* Update console/src/app/app.module.ts

Co-authored-by: Max Peintner <[email protected]>

Co-authored-by: Silvan <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
George
2022-09-08 15:15:31 +02:00
committed by GitHub
co-authored by Silvan Max Peintner
parent 5052aa1c12
commit 8ab85afd15
17 changed files with 3259 additions and 23 deletions
@@ -22,11 +22,8 @@ export class LocalizedDatePipe implements PipeTransform {
return moment(value).format(`${format}, HH:mm`);
}
} else {
const lang = this.translateService.currentLang === ('de' || 'it' || 'en') ? this.translateService.currentLang : 'en';
const datePipe: DatePipe = new DatePipe(
lang,
// ['de', 'it', 'en'].includes(this.translateService.currentLang) ? this.translateService.currentLang : 'en',
);
const lang = ['de', 'en', 'fr', 'it', 'zh'].includes(this.translateService.currentLang) ? this.translateService.currentLang : 'en';
const datePipe: DatePipe = new DatePipe(lang);
return datePipe.transform(value, pattern ?? 'mediumDate');
}
}