Browse Source

Merge pull request #857 in VISUAL/fineui from ~GUY/fineui:master to master

* commit '7545abd485302fe7d9e6fca05ca58dbadcf8d98d':
  国际化调整
es6
guy 6 years ago
parent
commit
5e5b1a2404
  1. 2
      Gruntfile.js
  2. 0
      _mobile/date.i18n.cn.js
  3. 54
      dist/2.0/fineui.ie.js
  4. 74
      dist/2.0/fineui.ie.min.js
  5. 54
      dist/2.0/fineui.js
  6. 62
      dist/2.0/fineui.min.js
  7. 54
      dist/bundle.ie.js
  8. 74
      dist/bundle.ie.min.js
  9. 54
      dist/bundle.js
  10. 62
      dist/bundle.min.js
  11. 54
      dist/core.js
  12. 54
      dist/fineui.ie.js
  13. 74
      dist/fineui.ie.min.js
  14. 54
      dist/fineui.js
  15. 62
      dist/fineui.min.js
  16. 54
      dist/fineui_without_jquery_polyfill.js
  17. BIN
      dist/resource/ZeroClipboard.swf
  18. 159
      dist/utils.js
  19. 8
      dist/utils.min.js
  20. 23
      src/core/base.js
  21. 30
      src/core/i18n.js

2
Gruntfile.js

@ -212,8 +212,8 @@ module.exports = function (grunt) {
"src/core/alias.js",
"src/core/inject.js",
"src/core/utils/*.js",
"i18n/date.i18n.cn.js",
"i18n/i18n.cn.js",
"_mobile/date.i18n.cn.js",
"src/data/data.js",
"src/data/**/*.js"
],

0
i18n/date.i18n.cn.js → _mobile/date.i18n.cn.js

54
dist/2.0/fineui.ie.js vendored

@ -10185,29 +10185,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18469,7 +18446,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

74
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

54
dist/2.0/fineui.js vendored

@ -10185,29 +10185,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18469,7 +18446,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

62
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

54
dist/bundle.ie.js vendored

@ -10185,29 +10185,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18469,7 +18446,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

74
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

54
dist/bundle.js vendored

@ -10185,29 +10185,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18469,7 +18446,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

62
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

54
dist/core.js vendored

@ -10185,29 +10185,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18469,7 +18446,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

54
dist/fineui.ie.js vendored

@ -10430,29 +10430,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18714,7 +18691,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

74
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

54
dist/fineui.js vendored

@ -10430,29 +10430,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18714,7 +18691,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

62
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

54
dist/fineui_without_jquery_polyfill.js vendored

@ -10185,29 +10185,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -18215,7 +18192,36 @@ _.extend(BI, {
}
return location;
}
});(function () {
});!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {

BIN
dist/resource/ZeroClipboard.swf vendored

Binary file not shown.

159
dist/utils.js vendored

@ -10964,29 +10964,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {
@ -15814,74 +15791,7 @@ BI.Region.prototype = {
pos.push(this.y + this.h / 2);
return pos;
}
};/**
* Created by astronaut007 on 2018/8/8
*/
// 牵扯到国际化这些常量在页面加载后再生效
// full day names
BI.Date = BI.Date || {};
BI.Date._DN = ["星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期日"];
// short day names
BI.Date._SDN = ["日",
"一",
"二",
"三",
"四",
"五",
"六",
"日"];
// Monday first, etc.
BI.Date._FD = 1;
// full month namesdat
BI.Date._MN = [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月"];
// short month names
BI.Date._SMN = [0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11];
BI.Date._QN = ["", "第1季度",
"第2季度",
"第3季度",
"第4季度"];
/** Adds the number of days array to the Date object. */
BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以
BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];
BI.i18n = {
};BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年/月/日",
@ -16071,6 +15981,73 @@ BI.i18n = {
"BI-Basic_No_Select": "不选",
"BI-Basic_Now": "此刻"
};/**
* Created by astronaut007 on 2018/8/8
*/
// 牵扯到国际化这些常量在页面加载后再生效
// full day names
BI.Date = BI.Date || {};
BI.Date._DN = ["星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期日"];
// short day names
BI.Date._SDN = ["日",
"一",
"二",
"三",
"四",
"五",
"六",
"日"];
// Monday first, etc.
BI.Date._FD = 1;
// full month namesdat
BI.Date._MN = [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月"];
// short month names
BI.Date._SMN = [0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11];
BI.Date._QN = ["", "第1季度",
"第2季度",
"第3季度",
"第4季度"];
/** Adds the number of days array to the Date object. */
BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以
BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];
/**
* 缓冲池
* @type {{Buffer: {}}}
*/

8
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

23
src/core/base.js

@ -38,29 +38,6 @@ if (!_global.BI) {
// Utility
_.extend(BI, {
i18nText: function (key) {
var localeText = (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
assert: function (v, is) {
if (this.isFunction(is)) {
if (!is(v)) {

30
src/core/i18n.js

@ -0,0 +1,30 @@
!(function () {
var i18nStore = {};
_.extend(BI, {
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
i18nText: function (key) {
var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || "";
if (!localeText) {
localeText = key;
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
}
});
})();
Loading…
Cancel
Save