Skip to content

Commit

Permalink
更新国际化
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Aug 24, 2024
1 parent fc8268e commit 77b9840
Show file tree
Hide file tree
Showing 13 changed files with 248 additions and 86 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"style": "lib/style.css",
"typings": "types/index.d.ts",
"dependencies": {
"vxe-pc-ui": "^4.1.2"
"vxe-pc-ui": "^4.1.4"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
12 changes: 5 additions & 7 deletions packages/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ export function install (app: App, options?: VxeGlobalConfig) {
}

// 保留兼容老版本
if (!VxeUI.hasLanguage('zh-CN')) {
const defaultLanguage = 'zh-CN'
VxeUI.setI18n(defaultLanguage, zhCN)
VxeUI.setLanguage(defaultLanguage)
}
VxeUI.setTheme('light')
setTimeout(() => {
if (!VxeUI.hasLanguage('zh-CN')) {
const defaultLanguage = 'zh-CN'
VxeUI.setI18n(defaultLanguage, zhCN)
VxeUI.setLanguage(defaultLanguage)
}
})

export * from './ui'

Expand Down
23 changes: 20 additions & 3 deletions packages/locale/lang/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
text: 'Loading...'
},
error: {
downErr: 'Download failed.',
groupFixed: 'If you use group headers, the freeze columns must be set by group.',
groupMouseRange: 'Grouping headers and "{0}" cannot be used at the same time, which may cause errors.',
groupTag: 'Grouping column header should use "{0}" instead of "{1}", which may cause errors.',
Expand All @@ -34,7 +35,8 @@ export default {
noTree: 'The tree structure does not support "{0}".',
notProp: 'Unsupported parameters "{0}"',
checkProp: 'The checkbox may stall when the amount of data is too large, it is recommended to set the parameter "{0}" to increase the rendering speed ',
coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error',
coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error.',
uniField: 'The field "{0}" is repeatedly defined, which may cause an error.',
delFunc: 'The function "{0}" is deprecated, please use "{1}".',
delProp: 'The property "{0}" is deprecated, please use "{1}".',
delEvent: 'The event "{0}" is deprecated, please use "{1}"',
Expand Down Expand Up @@ -84,6 +86,7 @@ export default {
},
pager: {
goto: 'Go to',
gotoTitle: 'Number',
pagesize: '{0}/page',
total: 'Total {0} record',
pageClassifier: '',
Expand Down Expand Up @@ -315,6 +318,10 @@ export default {
defFormTitle: 'Unnamed form',
widgetPropTab: 'Field property',
widgetFormTab: 'Form property',
error: {
wdFormUni: 'Only one control of this type is allowed to be added to the form.',
wdSubUni: 'Only one control of this type is allowed to be added to a sub table.'
},
styleSetting: {
btn: 'Style setting',
title: 'Form style setting',
Expand All @@ -340,6 +347,8 @@ export default {
base: 'Base control',
layout: 'Layout control',
system: 'System control',
module: 'Module control',
chart: 'Chart control',
advanced: 'Advanced control'
},
copyTitle: 'Copy_{0}',
Expand Down Expand Up @@ -422,11 +431,19 @@ export default {
}
},
listDesign: {
fieldSettingTab: 'Field setting',
listSettingTab: 'List setting',
fieldSettingTab: 'Field',
listSettingTab: 'Parameter',
searchTitle: 'Search',
listTitle: 'List',
searchField: 'Search field',
listField: 'List field',
activeBtn: {
ActionButtonUpdate: 'Edit',
ActionButtonDelete: 'Delete'
},
search: {
addBtn: 'Edit',
emptyText: 'No filter condition is configured.'
}
},
text: {
Expand Down
23 changes: 20 additions & 3 deletions packages/locale/lang/es-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
text: 'Cargando...'
},
error: {
downErr: 'Download failed.',
groupFixed: 'If you use group headers, the freeze columns must be set by group.',
groupMouseRange: 'Los encabezados de agrupación y "{0}" no pueden ser utilizados al mismo tiempo, lo que puede causar errores.',
groupTag: 'El encabezado de columna de agrupación debería utilizar "{0}" en lugar de "{1}", lo que puede causar errores.',
Expand All @@ -34,7 +35,8 @@ export default {
noTree: 'La estructura de árbol no soporta "{0}".',
notProp: 'Parámetros no compatibles "{0}"',
checkProp: 'La casilla de verificación puede detenerse cuando la cantidad de datos es demasiado grande, se recomienda establecer el parámetro "{0}" para aumentar la velocidad de representación',
coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error',
coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error.',
uniField: 'The field "{0}" is repeatedly defined, which may cause an error.',
delFunc: 'La función "{0}" está en desuso, por favor use "{1}".',
delProp: 'La propiedad "{0}" está en desuso, por favor use "{1}".',
delEvent: 'El evento "{0}" está en desuso, por favor use "{1}"',
Expand Down Expand Up @@ -84,6 +86,7 @@ export default {
},
pager: {
goto: 'Ir a',
gotoTitle: 'Number',
pagesize: '{0}/página',
total: 'Total {0} registro',
pageClassifier: '',
Expand Down Expand Up @@ -315,6 +318,10 @@ export default {
defFormTitle: 'Unnamed form',
widgetPropTab: 'Field property',
widgetFormTab: 'Form property',
error: {
wdFormUni: '该类型的控件在表单中只允许添加一个',
wdSubUni: '该类型的控件在子表中只允许添加一个'
},
styleSetting: {
btn: 'Style setting',
title: 'Form style setting',
Expand All @@ -340,6 +347,8 @@ export default {
base: 'Base control',
layout: 'Layout control',
system: 'System control',
module: 'Module control',
chart: 'Chart control',
advanced: 'Advanced control'
},
copyTitle: 'Copy_{0}',
Expand Down Expand Up @@ -422,11 +431,19 @@ export default {
}
},
listDesign: {
fieldSettingTab: 'Field setting',
listSettingTab: 'List setting',
fieldSettingTab: 'Field',
listSettingTab: 'Parameter',
searchTitle: 'Search',
listTitle: 'List',
searchField: 'Search field',
listField: 'List field',
activeBtn: {
ActionButtonUpdate: 'Edit',
ActionButtonDelete: 'Delete'
},
search: {
addBtn: 'Edit',
emptyText: 'No filter condition is configured.'
}
},
text: {
Expand Down
23 changes: 22 additions & 1 deletion packages/locale/lang/hu-HU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
text: '加载中...'
},
error: {
downErr: '下载失败',
groupFixed: '如果使用分组表头,冻结列必须按组设置',
groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误',
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
Expand All @@ -35,6 +36,7 @@ export default {
notProp: '不支持的参数 "{0}"',
checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',
uniField: '字段名 "{0}" 重复定义,这可能会出现错误',
delFunc: '方法 "{0}" 已废弃,请使用 "{1}"',
delProp: '参数 "{0}" 已废弃,请使用 "{1}"',
delEvent: '事件 "{0}" 已废弃,请使用 "{1}"',
Expand Down Expand Up @@ -83,6 +85,7 @@ export default {
},
pager: {
goto: '前往',
gotoTitle: '页数',
pagesize: '{0}条/页',
total: '共 {0} 条记录',
pageClassifier: '页',
Expand Down Expand Up @@ -314,6 +317,10 @@ export default {
defFormTitle: '未命名的表单',
widgetPropTab: '控件属性',
widgetFormTab: '表单属性',
error: {
wdFormUni: '该类型的控件在表单中只允许添加一个',
wdSubUni: '该类型的控件在子表中只允许添加一个'
},
styleSetting: {
btn: '样式设置',
title: '表单的样式设置',
Expand All @@ -339,6 +346,8 @@ export default {
base: '基础控件',
layout: '布局控件',
system: '系统控件',
module: '模块控件',
chart: '图表控件',
advanced: '高级控件'
},
copyTitle: '副本_{0}',
Expand Down Expand Up @@ -421,7 +430,19 @@ export default {
},
listDesign: {
fieldSettingTab: '字段设置',
listSettingTab: '列表设置'
listSettingTab: '参数设置',
searchTitle: '查询条件',
listTitle: '列表字段',
searchField: '查询字段',
listField: '列表字段',
activeBtn: {
ActionButtonUpdate: '编辑',
ActionButtonDelete: '删除'
},
search: {
addBtn: '编辑',
emptyText: '未配置查询条件'
}
},

/**
Expand Down
21 changes: 19 additions & 2 deletions packages/locale/lang/ja-JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
text: 'Loading...'
},
error: {
downErr: '下载失败',
groupFixed: 'ヘッダー結合を使用する場合、固定列はグループで設定しなければなりません',
groupMouseRange: 'ヘッダー結合と「{0}」は同時に使用できません。これによりエラーが発生する可能性があります',
groupTag: 'ヘッダー結合は "{0}" を使ってください。 "{1}" はエラーが発生する可能性があります',
Expand All @@ -35,6 +36,7 @@ export default {
notProp: 'サポートされていないパラメータ "{0}"',
checkProp: 'パフマンス低下になる可能性があります。パラメータ "{0}" の値を指定してください',
coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error',
uniField: '字段名 "{0}" 重复定义,这可能会出现错误',
delFunc: '"{0}" functionが非推奨です。"{1}"を使用してください',
delProp: '"{0}" propertyが非推奨です。"{1}"を使用してください',
delEvent: 'イベント "{0}" が廃止されました。 "{1}" を使用してください',
Expand Down Expand Up @@ -84,6 +86,7 @@ export default {
},
pager: {
goto: '移動',
gotoTitle: '页数',
pagesize: '{0}件/ページ',
total: '全 {0} 件',
pageClassifier: 'ページ',
Expand Down Expand Up @@ -315,6 +318,10 @@ export default {
defFormTitle: 'Unnamed form',
widgetPropTab: 'Field property',
widgetFormTab: 'Form property',
error: {
wdFormUni: '该类型的控件在表单中只允许添加一个',
wdSubUni: '该类型的控件在子表中只允许添加一个'
},
styleSetting: {
btn: 'Style setting',
title: 'Form style setting',
Expand All @@ -340,6 +347,8 @@ export default {
base: 'Base control',
layout: 'Layout control',
system: 'System control',
module: 'Module control',
chart: 'Chart control',
advanced: 'Advanced control'
},
copyTitle: 'Copy_{0}',
Expand Down Expand Up @@ -422,11 +431,19 @@ export default {
}
},
listDesign: {
fieldSettingTab: 'Field setting',
listSettingTab: 'List setting',
fieldSettingTab: 'Field',
listSettingTab: 'Parameter',
searchTitle: 'Search',
listTitle: 'List',
searchField: 'Search field',
listField: 'List field',
activeBtn: {
ActionButtonUpdate: 'Edit',
ActionButtonDelete: 'Delete'
},
search: {
addBtn: 'Edit',
emptyText: 'No filter condition is configured.'
}
},
text: {
Expand Down
19 changes: 18 additions & 1 deletion packages/locale/lang/ko-KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
text: '加载中...'
},
error: {
downErr: '下载失败',
groupFixed: '如果使用分组表头,冻结列必须按组设置',
groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误',
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
Expand All @@ -35,6 +36,7 @@ export default {
notProp: '不支持的参数 "{0}"',
checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',
uniField: '字段名 "{0}" 重复定义,这可能会出现错误',
delFunc: '方法 "{0}" 已废弃,请使用 "{1}"',
delProp: '参数 "{0}" 已废弃,请使用 "{1}"',
delEvent: '事件 "{0}" 已废弃,请使用 "{1}"',
Expand Down Expand Up @@ -84,6 +86,7 @@ export default {
},
pager: {
goto: '前往',
gotoTitle: '页数',
pagesize: '{0}条/页',
total: '共 {0} 条记录',
pageClassifier: '页',
Expand Down Expand Up @@ -315,6 +318,10 @@ export default {
defFormTitle: '未命名的表单',
widgetPropTab: '控件属性',
widgetFormTab: '表单属性',
error: {
wdFormUni: '该类型的控件在表单中只允许添加一个',
wdSubUni: '该类型的控件在子表中只允许添加一个'
},
styleSetting: {
btn: '样式设置',
title: '表单的样式设置',
Expand All @@ -340,6 +347,8 @@ export default {
base: '基础控件',
layout: '布局控件',
system: '系统控件',
module: '模块控件',
chart: '图表控件',
advanced: '高级控件'
},
copyTitle: '副本_{0}',
Expand Down Expand Up @@ -423,10 +432,18 @@ export default {
},
listDesign: {
fieldSettingTab: '字段设置',
listSettingTab: '列表设置',
listSettingTab: '参数设置',
searchTitle: '查询条件',
listTitle: '列表字段',
searchField: '查询字段',
listField: '列表字段',
activeBtn: {
ActionButtonUpdate: '编辑',
ActionButtonDelete: '删除'
},
search: {
addBtn: '编辑',
emptyText: '未配置查询条件'
}
},
text: {
Expand Down
Loading

0 comments on commit 77b9840

Please sign in to comment.