Skip to content

Commit 0b96168

Browse files
committed
1. 调整语言包参数名称
2. Q.Uploader.UI.js 中的语言设置统一到 Q.Uploader.Lang 对象 Signed-off-by: Devin <[email protected]>
1 parent 42470c4 commit 0b96168

8 files changed

+57
-55
lines changed

Diff for: Q.Uploader.all.js

+18-17
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
* Q.Uploader.js 文件上传管理器 1.0
374374
* https://github.com/devin87/web-uploader
375375
376-
* update:2017/02/04 11:17
376+
* update:2017/02/09 09:03
377377
*/
378378
(function (window, undefined) {
379379
"use strict";
@@ -429,13 +429,13 @@
429429
var LANG = Uploader.Lang;
430430

431431
switch (state) {
432-
case UPLOAD_STATE_READY: return LANG.ready;
433-
case UPLOAD_STATE_PROCESSING: return LANG.processing;
434-
case UPLOAD_STATE_COMPLETE: return LANG.complete;
432+
case UPLOAD_STATE_READY: return LANG.status_ready;
433+
case UPLOAD_STATE_PROCESSING: return LANG.status_processing;
434+
case UPLOAD_STATE_COMPLETE: return LANG.status_complete;
435435

436-
case UPLOAD_STATE_SKIP: return LANG.skip;
437-
case UPLOAD_STATE_CANCEL: return LANG.cancel;
438-
case UPLOAD_STATE_ERROR: return LANG.error;
436+
case UPLOAD_STATE_SKIP: return LANG.status_skip;
437+
case UPLOAD_STATE_CANCEL: return LANG.status_cancel;
438+
case UPLOAD_STATE_ERROR: return LANG.status_error;
439439
}
440440

441441
return state;
@@ -1225,12 +1225,12 @@
12251225

12261226
//默认语言
12271227
Lang: {
1228-
ready: "准备中",
1229-
processing: "上传中",
1230-
complete: "已完成",
1231-
skip: "已跳过",
1232-
cancel: "已取消",
1233-
error: "已失败"
1228+
status_ready: "准备中",
1229+
status_processing: "上传中",
1230+
status_complete: "已完成",
1231+
status_skip: "已跳过",
1232+
status_cancel: "已取消",
1233+
status_error: "已失败"
12341234
},
12351235

12361236
getStatusText: get_upload_status_text
@@ -1243,7 +1243,7 @@
12431243
/*
12441244
* Q.Uploader.UI.js 上传管理器界面
12451245
1246-
* update:2015/10/16 11:30
1246+
* update:2017/02/09 09:06
12471247
*/
12481248
(function (window, undefined) {
12491249
"use strict";
@@ -1260,7 +1260,8 @@
12601260
E = Q.event,
12611261
addEvent = E.add,
12621262

1263-
Uploader = Q.Uploader;
1263+
Uploader = Q.Uploader,
1264+
Lang = Uploader.Lang;
12641265

12651266
//追加css样式名
12661267
function addClass(ele, className) {
@@ -1291,8 +1292,8 @@
12911292

12921293
var ops_button = ops.button || {},
12931294

1294-
text_button_cancel = def(ops_button.cancel, "取消"),
1295-
text_button_remove = def(ops_button.remove, "删除"),
1295+
text_button_cancel = def(Lang.cancel || ops_button.cancel, "取消"),
1296+
text_button_remove = def(Lang.remove || ops_button.remove, "删除"),
12961297

12971298
name = task.name;
12981299

Diff for: Q.Uploader.image.all.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
* Q.Uploader.js 文件上传管理器 1.0
374374
* https://github.com/devin87/web-uploader
375375
376-
* update:2017/02/04 11:17
376+
* update:2017/02/09 09:03
377377
*/
378378
(function (window, undefined) {
379379
"use strict";
@@ -429,13 +429,13 @@
429429
var LANG = Uploader.Lang;
430430

431431
switch (state) {
432-
case UPLOAD_STATE_READY: return LANG.ready;
433-
case UPLOAD_STATE_PROCESSING: return LANG.processing;
434-
case UPLOAD_STATE_COMPLETE: return LANG.complete;
432+
case UPLOAD_STATE_READY: return LANG.status_ready;
433+
case UPLOAD_STATE_PROCESSING: return LANG.status_processing;
434+
case UPLOAD_STATE_COMPLETE: return LANG.status_complete;
435435

436-
case UPLOAD_STATE_SKIP: return LANG.skip;
437-
case UPLOAD_STATE_CANCEL: return LANG.cancel;
438-
case UPLOAD_STATE_ERROR: return LANG.error;
436+
case UPLOAD_STATE_SKIP: return LANG.status_skip;
437+
case UPLOAD_STATE_CANCEL: return LANG.status_cancel;
438+
case UPLOAD_STATE_ERROR: return LANG.status_error;
439439
}
440440

441441
return state;
@@ -1225,12 +1225,12 @@
12251225

12261226
//默认语言
12271227
Lang: {
1228-
ready: "准备中",
1229-
processing: "上传中",
1230-
complete: "已完成",
1231-
skip: "已跳过",
1232-
cancel: "已取消",
1233-
error: "已失败"
1228+
status_ready: "准备中",
1229+
status_processing: "上传中",
1230+
status_complete: "已完成",
1231+
status_skip: "已跳过",
1232+
status_cancel: "已取消",
1233+
status_error: "已失败"
12341234
},
12351235

12361236
getStatusText: get_upload_status_text

Diff for: dist/Q.Uploader.all.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/Q.Uploader.image.all.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/js/Q.Uploader.UI.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/js/Q.Uploader.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/Q.Uploader.UI.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Q.Uploader.UI.js 上传管理器界面
44
5-
* update:2015/10/16 11:30
5+
* update:2017/02/09 09:06
66
*/
77
(function (window, undefined) {
88
"use strict";
@@ -19,7 +19,8 @@
1919
E = Q.event,
2020
addEvent = E.add,
2121

22-
Uploader = Q.Uploader;
22+
Uploader = Q.Uploader,
23+
Lang = Uploader.Lang;
2324

2425
//追加css样式名
2526
function addClass(ele, className) {
@@ -50,8 +51,8 @@
5051

5152
var ops_button = ops.button || {},
5253

53-
text_button_cancel = def(ops_button.cancel, "取消"),
54-
text_button_remove = def(ops_button.remove, "删除"),
54+
text_button_cancel = def(Lang.cancel || ops_button.cancel, "取消"),
55+
text_button_remove = def(Lang.remove || ops_button.remove, "删除"),
5556

5657
name = task.name;
5758

Diff for: js/Q.Uploader.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Q.Uploader.js 文件上传管理器 1.0
55
* https://github.com/devin87/web-uploader
66
7-
* update:2017/02/04 11:17
7+
* update:2017/02/09 09:03
88
*/
99
(function (window, undefined) {
1010
"use strict";
@@ -60,13 +60,13 @@
6060
var LANG = Uploader.Lang;
6161

6262
switch (state) {
63-
case UPLOAD_STATE_READY: return LANG.ready;
64-
case UPLOAD_STATE_PROCESSING: return LANG.processing;
65-
case UPLOAD_STATE_COMPLETE: return LANG.complete;
63+
case UPLOAD_STATE_READY: return LANG.status_ready;
64+
case UPLOAD_STATE_PROCESSING: return LANG.status_processing;
65+
case UPLOAD_STATE_COMPLETE: return LANG.status_complete;
6666

67-
case UPLOAD_STATE_SKIP: return LANG.skip;
68-
case UPLOAD_STATE_CANCEL: return LANG.cancel;
69-
case UPLOAD_STATE_ERROR: return LANG.error;
67+
case UPLOAD_STATE_SKIP: return LANG.status_skip;
68+
case UPLOAD_STATE_CANCEL: return LANG.status_cancel;
69+
case UPLOAD_STATE_ERROR: return LANG.status_error;
7070
}
7171

7272
return state;
@@ -856,12 +856,12 @@
856856

857857
//默认语言
858858
Lang: {
859-
ready: "准备中",
860-
processing: "上传中",
861-
complete: "已完成",
862-
skip: "已跳过",
863-
cancel: "已取消",
864-
error: "已失败"
859+
status_ready: "准备中",
860+
status_processing: "上传中",
861+
status_complete: "已完成",
862+
status_skip: "已跳过",
863+
status_cancel: "已取消",
864+
status_error: "已失败"
865865
},
866866

867867
getStatusText: get_upload_status_text

0 commit comments

Comments
 (0)