Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation to the Table Menu #953

Merged
merged 1 commit into from Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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'
});