mirror of
https://github.com/documize/community.git
synced 2025-07-24 23:59:47 +02:00
add chinese language support
This commit is contained in:
parent
68d067ef7b
commit
dc26f063c8
7 changed files with 769 additions and 2 deletions
|
@ -9,7 +9,7 @@ import Service, { inject as service } from '@ember/service';
|
|||
import $ from 'jquery';
|
||||
|
||||
export default Service.extend({
|
||||
langs: { enUS: [], deDE: [] },
|
||||
langs: { enUS: [], deDE: [] , zhCN: [] },
|
||||
locales: [],
|
||||
session: service(),
|
||||
|
||||
|
@ -21,6 +21,9 @@ export default Service.extend({
|
|||
$.getJSON("/i18n/de-DE.json", (data) => {
|
||||
this.langs.deDE = data;
|
||||
});
|
||||
$.getJSON("/i18n/zh-CN.json", (data) => {
|
||||
this.langs.zhCN = data;
|
||||
});
|
||||
},
|
||||
|
||||
localize(key, ...args) {
|
||||
|
@ -33,6 +36,9 @@ export default Service.extend({
|
|||
case "de-DE":
|
||||
str = this.langs.deDE[key];
|
||||
break;
|
||||
case "zh-CN":
|
||||
str = this.langs.zhCN[key];
|
||||
break;
|
||||
}
|
||||
|
||||
if (_.isUndefined(str)) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{{#if (gt rootDocCount 0)}}
|
||||
<div class="item {{if (eq selectedFilter "uncategorized") "selected"}}" {{action "onDocumentFilter" "uncategorized" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">Uncategorized ({{rootDocCount}})</div>
|
||||
<div class="name">{{localize 'un_categorized'}} ({{rootDocCount}})</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue