mirror of
https://github.com/documize/community.git
synced 2025-07-19 05:09:42 +02:00
Merge pull request #1 from armando-marra/patch-1-it-lang
Update i18n.js
This commit is contained in:
commit
a8a82963fa
1 changed files with 7 additions and 1 deletions
|
@ -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)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue