1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-18 20:59:43 +02:00

Merge pull request #1 from armando-marra/patch-1-it-lang

Update i18n.js
This commit is contained in:
Armando Marra 2023-09-08 09:07:42 +02:00 committed by GitHub
commit a8a82963fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ import Service, { inject as service } from '@ember/service';
import $ from 'jquery'; import $ from 'jquery';
export default Service.extend({ export default Service.extend({
langs: { enUS: [], deDE: [] , zhCN: [], ptBR: [], frFR: [], jaJP: [] }, langs: { enUS: [], deDE: [] , zhCN: [], ptBR: [], frFR: [], jaJP: [], itIT: [] },
locales: [], locales: [],
session: service(), session: service(),
@ -33,6 +33,9 @@ export default Service.extend({
$.getJSON("/i18n/ja-JP.json", (data) => { $.getJSON("/i18n/ja-JP.json", (data) => {
this.langs.jaJP = data; this.langs.jaJP = data;
}); });
$.getJSON("/i18n/it-IT.json", (data) => {
this.langs.itIT = data;
});
}, },
localize(key, ...args) { localize(key, ...args) {
@ -57,6 +60,9 @@ export default Service.extend({
case "ja-JP": case "ja-JP":
str = this.langs.jaJP[key]; str = this.langs.jaJP[key];
break; break;
case "it-IT":
str = this.langs.itIT[key];
break;
} }
if (_.isUndefined(str)) { if (_.isUndefined(str)) {