Skip to content

Commit 017716b

Browse files
committed
Modify some string in Mako templetes for complete i18n support.
1 parent 17c5b27 commit 017716b

File tree

5 files changed

+100
-94
lines changed

5 files changed

+100
-94
lines changed

locale/zh/LC_MESSAGES/ginga.mo

658 Bytes
Binary file not shown.

locale/zh/LC_MESSAGES/ginga.po

+29-23
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ msgstr "Galaxy"
3333
msgid "Are you sure you want to delete the current history?"
3434
msgstr "确认要删除当前的历史记录吗?"
3535

36-
3736
#: templates/root/history.mako:38
3837
msgid "collapse all"
3938
msgstr "全部收缩"
4039

41-
4240
#: templates/root/index.mako:5
4341
msgid "Tools"
4442
msgstr "工具"
@@ -57,7 +55,6 @@ msgstr "ENCODE工具"
5755
msgid "Lift-Over"
5856
msgstr "版本转换"
5957

60-
6158
msgid "Text Manipulation"
6259
msgstr "文本操作"
6360

@@ -134,7 +131,7 @@ msgid "History Item Attributes"
134131
msgstr "历史项目属性"
135132

136133
#: templates/dataset/edit_attributes.mako:19
137-
msgid "Edit Attributes"
134+
msgid "Edit attributes"
138135
msgstr "编辑属性"
139136

140137
#: templates/dataset/edit_attributes.mako:64
@@ -148,21 +145,21 @@ msgid ""
148145
"Required metadata values are missing. Some of these values may not be "
149146
"editable by the user. Selecting \"Auto-detect\" will attempt to fix these "
150147
"values."
151-
msgstr "所需元数据值缺失。其中一些值可能无法被用户编辑。选择“自动检测”将修正这些值。"
148+
msgstr "缺少所需的metadata的值。用户可能无法对这些值进行编辑。选择“自动检测”来尝试修正这些值。"
152149

153150
#: templates/dataset/edit_attributes.mako:78
154151
msgid "Convert to new format"
155-
msgstr "转换成新格式"
152+
msgstr "转换为新格式"
156153

157154
#: templates/dataset/edit_attributes.mako:84
158155
msgid "Convert to"
159-
msgstr "转换"
156+
msgstr "转换为"
160157

161158
#: templates/dataset/edit_attributes.mako:95
162159
msgid ""
163160
"This will create a new dataset with the contents of this dataset converted "
164161
"to a new format."
165-
msgstr "这将创建一个新的数据集,内容是转换后的数据集。"
162+
msgstr "这将产生一个转换格式后的新数据集,"
166163

167164
#: templates/dataset/edit_attributes.mako:111
168165
msgid "Change data type"
@@ -177,27 +174,24 @@ msgid ""
177174
"This will change the datatype of the existing dataset but <i>not</i> modify "
178175
"its contents. Use this if Galaxy has incorrectly guessed the type of your "
179176
"dataset."
180-
msgstr "这将改变已有数据集的数据类型,但是<i>不</i>改变其内容。当Galaxy不能正确判断你的数据类型时,设置该参数。"
177+
msgstr "这将改变已有数据集的数据类型,<i>不</i>改变其内容。当Galaxy不能正确判断你的数据类型时,设置该参数。"
181178

182179
#: templates/dataset/edit_attributes.mako:137
183180
msgid "Copy History Item"
184181
msgstr "复制历史记录项"
185182

186183
#: templates/history/list.mako:3
187184
msgid "Saved Histories"
188-
msgstr "保存的历史记录"
185+
msgstr "已保存的历史"
189186

190-
#: templates/history/list.mako:19
191-
msgid "Stored Histories"
192-
msgstr "存储的历史记录"
193187

194188
#: templates/history/list.mako:21 templates/root/history.mako:239
195189
msgid "hide deleted"
196-
msgstr "隐藏已删除"
190+
msgstr "隐藏已删除的数据"
197191

198192
#: templates/history/list.mako:23
199193
msgid "show deleted"
200-
msgstr "显示已删除"
194+
msgstr "显示已删除的数据"
201195

202196
#: templates/history/list.mako:27
203197
msgid "Name"
@@ -209,7 +203,7 @@ msgstr "大小"
209203

210204
#: templates/history/list.mako:27
211205
msgid "Last modified"
212-
msgstr "最后修改"
206+
msgstr "最后修改时间"
213207

214208
#: templates/history/list.mako:27
215209
msgid "Actions"
@@ -229,7 +223,7 @@ msgstr "删除"
229223

230224
#: templates/history/list.mako:49
231225
msgid "undelete"
232-
msgstr "取消删除"
226+
msgstr "还原"
233227

234228
#: templates/history/list.mako:55
235229
msgid "Action"
@@ -249,7 +243,7 @@ msgstr "删除"
249243

250244
#: templates/history/list.mako:58
251245
msgid "Undelete"
252-
msgstr "取消删除"
246+
msgstr "还原"
253247

254248
#: templates/history/list.mako:65
255249
msgid "You have no stored histories"
@@ -261,7 +255,7 @@ msgstr "历史记录选项"
261255

262256
#: templates/history/options.mako:9
263257
msgid "You must be "
264-
msgstr "你必须"
258+
msgstr "你必须成为"
265259

266260
#: templates/history/options.mako:9
267261
msgid "logged in"
@@ -290,7 +284,7 @@ msgstr "创建"
290284

291285
#: templates/history/options.mako:18
292286
msgid " a new empty history"
293-
msgstr " 一个新的空历史记录"
287+
msgstr " 一个新的空白历史记录"
294288

295289
#: templates/history/options.mako:20
296290
msgid "Construct workflow"
@@ -550,10 +544,10 @@ msgstr "数据安全性"
550544

551545

552546
msgid "Show Deleted Datasets"
553-
msgstr "显示已删除数据"
547+
msgstr "显示已删除的数据"
554548

555549
msgid "Show Hidden Datasets"
556-
msgstr "显示隐藏数据"
550+
msgstr "显示隐藏的数据"
557551

558552
msgid "Show Structure"
559553
msgstr "显示结构"
@@ -594,4 +588,16 @@ msgstr "用户"
594588

595589

596590
msgid "Register"
597-
msgstr "注册"
591+
msgstr "注册"
592+
593+
msgid "Support"
594+
msgstr "技术支持"
595+
596+
msgid "Galaxy Wiki"
597+
msgstr "Galaxy百科"
598+
599+
msgid "Video tutorials (screencasts)"
600+
msgstr "视频教程(动画演示)"
601+
602+
msgid "How to Cite Galaxy"
603+
msgstr "如何引用Galaxy"

templates/root/history_common.mako

+19-19
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</div>
2020
<div style="float:left;" class="menubutton split popup" id="dataset-${dataset_id}-popup">
2121
%endif
22-
<a href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title="Download" class="icon-button disk tooltip"></a>
22+
<a href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title='${_("Download")}' class="icon-button disk tooltip"></a>
2323
%if meta_files:
2424
</div>
2525
%endif
@@ -75,7 +75,7 @@
7575
## TODO: Make these CSS, just adding a "disabled" class to the normal
7676
## links should be enough. However the number of datasets being uploaded
7777
## at a time is usually small so the impact of these images is also small.
78-
<span title='Display Data' class='icon-button display_disabled tooltip'></span>
78+
<span title='${_("Display Data")}' class='icon-button display_disabled tooltip'></span>
7979
%if for_editing:
8080
<span title='Edit Attributes' class='icon-button edit_disabled tooltip'></span>
8181
%endif
@@ -98,7 +98,7 @@
9898
%if data.purged:
9999
<span class="icon-button display_disabled tooltip" title="Cannot display datasets removed from disk"></span>
100100
%else:
101-
<a class="icon-button display tooltip" title="Display data in browser" href="${display_url}"
101+
<a class="icon-button display tooltip" title='${_("Display data in browser")}' href="${display_url}"
102102
%if for_editing:
103103
target="galaxy_main"
104104
%endif
@@ -110,13 +110,13 @@
110110
%elif data.purged:
111111
<span title="Cannot edit attributes of datasets removed from disk" class="icon-button edit_disabled tooltip"></span>
112112
%else:
113-
<a class="icon-button edit tooltip" title="Edit attributes" href="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" target="galaxy_main"></a>
113+
<a class="icon-button edit tooltip" title='${_("Edit attributes")}' href="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" target="galaxy_main"></a>
114114
%endif
115115
%endif
116116
%endif
117117
%if for_editing:
118118
%if can_edit:
119-
<a class="icon-button delete tooltip" title="Delete" href="${h.url_for( controller='dataset', action='delete', dataset_id=dataset_id, show_deleted_on_refresh=show_deleted_on_refresh )}" id="historyItemDeleter-${dataset_id}"></a>
119+
<a class="icon-button delete tooltip" title='${_("Delete")}' href="${h.url_for( controller='dataset', action='delete', dataset_id=dataset_id, show_deleted_on_refresh=show_deleted_on_refresh )}" id="historyItemDeleter-${dataset_id}"></a>
120120
%else:
121121
<span title="Dataset is already deleted" class="icon-button delete_disabled tooltip"></span>
122122
%endif
@@ -136,17 +136,17 @@
136136
%elif data_state == "queued":
137137
<div>${_('Job is waiting to run')}</div>
138138
<div>
139-
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a>
139+
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information tooltip"></a>
140140
%if for_editing:
141-
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>
141+
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a>
142142
%endif
143143
</div>
144144
%elif data_state == "running":
145145
<div>${_('Job is currently running')}</div>
146146
<div>
147-
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a>
147+
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information tooltip"></a>
148148
%if for_editing:
149-
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>
149+
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a>
150150
%endif
151151
</div>
152152
%elif data_state == "error":
@@ -163,9 +163,9 @@
163163
%if data.has_data():
164164
${render_download_links( data, dataset_id )}
165165
%endif
166-
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a>
166+
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information tooltip"></a>
167167
%if for_editing:
168-
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>
168+
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a>
169169
%endif
170170
</div>
171171
%elif data_state == "discarded":
@@ -177,9 +177,9 @@
177177
%elif data_state == "empty":
178178
<div>${_('No data: ')}<i>${data.display_info()}</i></div>
179179
<div>
180-
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a>
180+
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information tooltip"></a>
181181
%if for_editing:
182-
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>
182+
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a>
183183
%endif
184184
</div>
185185
%elif data_state in [ "ok", "failed_metadata" ]:
@@ -193,8 +193,8 @@
193193
%endif
194194
<div>
195195
${data.blurb}<br />
196-
format: <span class="${data.ext}">${data.ext}</span>,
197-
database:
196+
${_("format: ")} <span class="${data.ext}">${data.ext}</span>,
197+
${_("database: ")}
198198
%if data.dbkey == '?' and can_edit:
199199
<a href="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" target="galaxy_main">${_(data.dbkey)}</a>
200200
%else:
@@ -208,10 +208,10 @@
208208
%if data.has_data():
209209
${render_download_links( data, dataset_id )}
210210
211-
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a>
211+
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information tooltip"></a>
212212
213213
%if for_editing:
214-
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>
214+
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a>
215215
%if app.config.get_bool( 'enable_tracks', False ) and data.ext in app.datatypes_registry.get_available_tracks():
216216
<%
217217
if data.dbkey != '?':
@@ -266,8 +266,8 @@
266266
<br />
267267
%endfor
268268
%elif for_editing:
269-
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a>
270-
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>
269+
<a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information tooltip"></a>
270+
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a>
271271
%endif
272272
273273
</div>

templates/root/index.mako

+23-23
Original file line numberDiff line numberDiff line change
@@ -11,71 +11,71 @@
1111
// Init history options.
1212
$("#history-options-button").css( "position", "relative" );
1313
make_popupmenu( $("#history-options-button"), {
14-
"History Lists": null,
15-
"Saved Histories": function() {
14+
"${_("History Lists")}": null,
15+
"${_("Saved Histories")}": function() {
1616
galaxy_main.location = "${h.url_for( controller='history', action='list')}";
1717
},
18-
"Histories Shared with Me": function() {
18+
"${_("Histories Shared with Me")}": function() {
1919
galaxy_main.location = "${h.url_for( controller='history', action='list_shared')}";
2020
},
21-
"Current History": null,
22-
"Create New": function() {
21+
"${_("Current History")}": null,
22+
"${_("Create New")}": function() {
2323
galaxy_history.location = "${h.url_for( controller='root', action='history_new' )}";
2424
},
25-
"Clone": function() {
25+
"${_("Clone")}": function() {
2626
galaxy_main.location = "${h.url_for( controller='history', action='clone')}";
2727
},
28-
"Copy Datasets": function() {
28+
"${_("Copy Datasets")}": function() {
2929
galaxy_main.location = "${h.url_for( controller='dataset', action='copy_datasets' )}";
3030
},
31-
"Share or Publish": function() {
31+
"${_("Share or Publish")}": function() {
3232
galaxy_main.location = "${h.url_for( controller='history', action='sharing' )}";
3333
},
34-
"Extract Workflow": function() {
34+
"${_("Extract Workflow")}": function() {
3535
galaxy_main.location = "${h.url_for( controller='workflow', action='build_from_current_history' )}";
3636
},
37-
"Dataset Security": function() {
37+
"${_("Dataset Security")}": function() {
3838
galaxy_main.location = "${h.url_for( controller='root', action='history_set_default_permissions' )}";
3939
},
40-
"Show Deleted Datasets": function() {
40+
"${_("Show Deleted Datasets")}": function() {
4141
galaxy_history.location = "${h.url_for( controller='root', action='history', show_deleted=True)}";
4242
},
43-
"Show Hidden Datasets": function() {
43+
"${_("Show Hidden Datasets")}": function() {
4444
galaxy_history.location = "${h.url_for( controller='root', action='history', show_hidden=True)}";
4545
},
46-
"Purge Deleted Datasets": function() {
46+
"${_("Purge Deleted Datasets")}": function() {
4747
if ( confirm( "Really delete all deleted datasets permanently? This cannot be undone." ) ) {
4848
galaxy_main.location = "${h.url_for( controller='history', action='purge_deleted_datasets' )}";
4949
}
5050
},
51-
"Show Structure": function() {
51+
"${_("Show Structure")}": function() {
5252
galaxy_main.location = "${h.url_for( controller='history', action='display_structured' )}";
5353
},
54-
"Export to File": function() {
54+
"${_("Export to File")}": function() {
5555
galaxy_main.location = "${h.url_for( controller='history', action='export_archive' )}";
5656
},
57-
"Delete": function() {
57+
"${_("Delete")}": function() {
5858
if ( confirm( "Really delete the current history?" ) ) {
5959
galaxy_main.location = "${h.url_for( controller='history', action='delete_current' )}";
6060
}
6161
},
62-
"Delete Permanently": function() {
62+
"${_("Delete Permanently")}": function() {
6363
if ( confirm( "Really delete the current history permanently? This cannot be undone." ) ) {
6464
galaxy_main.location = "${h.url_for( controller='history', action='delete_current', purge=True )}";
6565
}
6666
},
67-
"Other Actions": null,
68-
"Import from File": function() {
67+
"${_("Other Actions")}": null,
68+
"${_("Import from File")}": function() {
6969
galaxy_main.location = "${h.url_for( controller='history', action='import_archive' )}";
7070
}
7171
});
7272
7373
var menu_options = {}; // Holds dictionary of { label: toggle_fn }
7474
75-
SHOW_TOOL = "Show Tool Search";
76-
HIDE_TOOL = "Hide Tool Search";
77-
SHOW_RECENT = "Show Recently Used";
78-
HIDE_RECENT = "Hide Recently Used";
75+
SHOW_TOOL = "${_("Show Tool Search")}";
76+
HIDE_TOOL = "${_("Hide Tool Search")}";
77+
SHOW_RECENT = "${_("Show Recently Used")}";
78+
HIDE_RECENT = "${_("Hide Recently Used")}";
7979
8080
var toggle_tool_search_fn = function() {
8181
// Show/hide menu and update vars, user preferences.

0 commit comments

Comments
 (0)