Skip to content

Commit

Permalink
Add table translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon-Wei committed Jul 7, 2020
1 parent dec7467 commit a3d59c1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/runtime/edbml/functions/ts.ui.tablemenu.edbml
Expand Up @@ -5,6 +5,9 @@
var id = table.$instanceid;
@class = 'ts-table-menu ts-engine-' + gui.Client.agent;
@class += table.menuopen ? ' ts-open' : '';

var selectPageLabel = ts.ui.TableSpirit.localize('thisPage');
var selectAllLabel = ts.ui.TableSpirit.localize('allPages');

<aside @class id="${id}-menu" data-ts="Spirit">
<table>
Expand All @@ -22,10 +25,10 @@
if(table.menuopen) {
<th class="ts-table-choices">
<button data-action="select-page" class="ts-button ts-tertiary">
<span>This Page</span>
<span>${selectPageLabel}</span>
</button>
<button data-action="select-all" class="ts-button ts-tertiary">
<span>All Pages</span>
<span>${selectAllLabel}</span>
</button>
</th>
<th class="ts-table-choices-close">
Expand Down
8 changes: 8 additions & 0 deletions src/runtime/js/ts.ui/lang/ts-lang-zh-cn.js
Expand Up @@ -36,3 +36,11 @@ ts.ui.DatePicker.localize({
ts.ui.Footer.localize({
collaboration: '打开对话'
});
ts.ui.ToolBarSpirit.localize({
options: '选项',
more: '更多...'
});
ts.ui.TableSpirit.localize({
thisPage: '当前页',
allPages: '所有页'
});
8 changes: 8 additions & 0 deletions src/runtime/js/ts.ui/lang/ts-lang-zh.js
Expand Up @@ -36,3 +36,11 @@ ts.ui.DatePicker.localize({
ts.ui.Footer.localize({
collaboration: '打开对话'
});
ts.ui.ToolBarSpirit.localize({
options: '选项',
more: '更多...'
});
ts.ui.TableSpirit.localize({
thisPage: '当前页',
allPages: '所有页'
});
Expand Up @@ -2013,3 +2013,8 @@ ts.ui.TableSpirit = (function using(
ts.ui.PagerModel,
ts.ui.UNIT_DOUBLE
);

ts.ui.TableSpirit.localize({
thisPage: 'This Page',
allPages: 'All Pages'
});

0 comments on commit a3d59c1

Please sign in to comment.