Browse Source

Pull request #3479: 无jira chore: 补一下国际化

Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6

* commit 'cbf09bbf32129099f33e407a6c907a88cf7e239a':
  无jira fix: 国际化
es6
treecat-罗群 2 years ago
parent
commit
ae9815c2ad
  1. 2
      packages/fineui/src/case/loader/loader.list.js
  2. 4
      packages/fineui/src/case/pager/pager.detail.js
  3. 2
      packages/fineui/src/case/ztree/treeview.js
  4. 2
      packages/fineui/src/core/5.inject.js
  5. 23
      script/chinese.js

2
packages/fineui/src/case/loader/loader.list.js

@ -162,7 +162,7 @@ export class ListLoader extends Widget {
},
(...args) => {
if (args.length === 0) {
throw new Error("参数不能为空");
throw new Error("parameter cannot be empty");
}
this.populate(...args);
o.onLoaded();

4
packages/fineui/src/case/pager/pager.detail.js

@ -52,8 +52,8 @@ export class DetailPager extends Widget {
first: false, // 是否显示首页
last: false, // 是否显示尾页
prev: "上一页",
next: "下一页",
prev: BI.i18nText("BI-Previous_Page"),
next: BI.i18nText("BI-Next_Page"),
firstPage: 1,
lastPage() {

2
packages/fineui/src/case/ztree/treeview.js

@ -176,7 +176,7 @@ export class TreeView extends Pane {
return true;
}
Msg.toast("Please Wait", {
Msg.toast("Please Wait.", {
level: "warning",
}); // 不展开节点,也不触发onExpand事件

2
packages/fineui/src/core/5.inject.js

@ -18,7 +18,7 @@ const moduleInjection = {}, moduleInjectionMap = {
export function module(xtype, cls) {
if (isNotNull(moduleInjection[xtype])) {
_global.console && console.error(`module [${xtype}] already registered`);
_global.console && console.error(`module: [${xtype}] already registered`);
} else {
if (isFunction(cls)) {
cls = cls();

23
script/chinese.js

@ -0,0 +1,23 @@
const { tranvase } = require("./lib/utils");
const fs = require("fs");
const config = {
handler: filePath => {
if (filePath.includes("test") || filePath.includes("dist")) {
return;
}
let content = fs.readFileSync(filePath).toString();
let reg = /(['"`])(.*?)\1/g;
if (reg.test(content)) {
Array.from(content.matchAll(reg))
.map(el => el[2])
.forEach(el => {
if (Array.from(el).some(el => el.charCodeAt(0) > 255)) {
console.log(filePath, el);
}
});
}
},
};
tranvase(process.argv[2], config);
Loading…
Cancel
Save