i18n: replace hardcoded strings with language translations

批量将项目中多处硬编码的文本替换为多语言翻译条目,统一项目文案管理,提升多语言适配效率,包括导航提示、操作反馈、空状态提示、表单占位符等各类文本内容。
This commit is contained in:
2026-06-22 17:59:25 +08:00
parent 4715f06b2f
commit b30ba914b9
59 changed files with 212 additions and 213 deletions

View File

@@ -139,7 +139,7 @@ export default {
// 提交按钮文字:与后端 design.html <button>提交</button> 默认对齐,开放给 formConfig 覆盖
// 走 mergedFormConfig(兼容 camelCase / snake_case),让 formConfig.submitText 能正确覆盖
submitText() {
return this.mergedFormConfig.submitText || '提交';
return this.mergedFormConfig.submitText || this.$lang('form.submit');
},
// 后端把表单样式配置统一存放在 data.formConfig 子对象中(与后端 design.js getDefaultFormData().formConfig 字段名一致)。
// 这里做一次归一化:优先取 formConfig;如果历史数据是扁平结构(直接挂在 value 上),也做兼容。
@@ -298,12 +298,12 @@ export default {
form_id: this.value.form_id || 0,
form_data: JSON.stringify(submitData),
component_id: this.value.id || '',
form_name: this.value.form_name || '默认表单'
form_name: this.value.form_name || this.$lang('form.defaultForm')
},
success: function(res) {
if (res.code === 0) {
uni.showToast({
title: '提交成功',
title: self.$lang('form.submitSuccess'),
icon: 'success'
});
// 重置表单
@@ -312,7 +312,7 @@ export default {
}
} else {
uni.showToast({
title: res.message || '提交失败',
title: res.message || self.$lang('form.submitFailed'),
icon: 'none'
});
}