refactor(i18n): 扁平化国际化语言配置结构

移除多层嵌套的语言对象层级,将翻译项直接挂载到顶层lang对象下,简化语言文件结构,提升维护性
This commit is contained in:
2026-07-03 11:50:21 +08:00
parent d1e6cc3122
commit b93badedd4
12 changed files with 140 additions and 201 deletions

View File

@@ -2,12 +2,10 @@ export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: 'File Preview', title: 'File Preview',
// file-preview/file-preview.vue page new translation items // file-preview/file-preview.vue page new translation items
filePreview: { // File URL does not exist
// File URL does not exist fileUrlNotExist: 'File URL does not exist',
fileUrlNotExist: 'File URL does not exist', // Video URL does not exist
// Video URL does not exist videoUrlNotExist: 'Video URL does not exist',
videoUrlNotExist: 'Video URL does not exist', // This file type preview is not supported
// This file type preview is not supported unsupportedFileType: 'This file type preview is not supported',
unsupportedFileType: 'This file type preview is not supported',
},
} }

View File

@@ -1,15 +1,11 @@
export const lang = { export const lang = {
// Form page // Form page
form: { // Page title
form: { title: 'Please fill in the form information',
// Page title // Submit success message
title: 'Please fill in the form information', submitSuccess: 'Submitted successfully',
// Submit success message // Form information not available
submitSuccess: 'Submitted successfully', noFormInfo: 'Form information not available',
// Form information not available
noFormInfo: 'Form information not available',
},
},
} }

View File

@@ -1,18 +1,13 @@
export const lang = { export const lang = {
// Form page - formdata // Form page - formdata
form: { title: 'Form Details',
formdata: { // Empty state messages
title: 'Form Details', submitSuccess: 'Submitted successfully',
// Empty state messages noFormInfo: 'Form information not available',
submitSuccess: 'Submitted successfully', // Form tip placeholder
noFormInfo: 'Form information not available', formTipPlaceholder: 'Please fill in the required form information',
// Form tip placeholder // Modal dialog
formTipPlaceholder: 'Please fill in the required form information', tip: 'Tip',
// Modal dialog paramError: 'Parameter error',
tip: 'Tip',
paramError: 'Parameter error',
}
}
} }

View File

@@ -1,27 +1,19 @@
export const lang = { export const lang = {
// Page title
// Seal detail title: 'Seal Details',
seal: { // Export image
medium: { exportImage: 'Export Image',
detail: { // Export PDF
// Page title exportPdf: 'Export PDF',
title: 'Seal Details', // Loading
// Export image loading: 'Loading',
exportImage: 'Export Image', // File does not exist
// Export PDF fileNotExist: 'File does not exist',
exportPdf: 'Export PDF', // Save success
// Loading saveSuccess: 'Saved successfully',
loading: 'Loading', // Save failed
// File does not exist saveFailed: 'Save failed',
fileNotExist: 'File does not exist', // Download failed
// Save success downloadFailed: 'Download failed',
saveSuccess: 'Saved successfully',
// Save failed
saveFailed: 'Save failed',
// Download failed
downloadFailed: 'Download failed',
}
}
}
} }

View File

@@ -1,24 +1,16 @@
export const lang = { export const lang = {
title: 'Medium Material Search',
// Seal search page // Search input placeholder
seal: { placeholder: 'Enter keywords to search',
medium: { // Search results title
search: { searchResult: 'Search Results',
title: 'Medium Material Search', // Empty data tip
// Search input placeholder noData: 'No Data',
placeholder: 'Enter keywords to search', // Modal title
// Search results title tip: 'Tip',
searchResult: 'Search Results', // Confirm delete all history
// Empty data tip confirmDeleteAllHistory: 'Are you sure you want to delete all search history?',
noData: 'No Data', // Confirm delete single history item
// Modal title confirmDeleteHistory: 'Are you sure you want to delete this search history?',
tip: 'Tip',
// Confirm delete all history
confirmDeleteAllHistory: 'Are you sure you want to delete all search history?',
// Confirm delete single history item
confirmDeleteHistory: 'Are you sure you want to delete this search history?',
}
}
}
} }

View File

@@ -2,26 +2,24 @@ export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: 'Structure Selection', title: 'Structure Selection',
// seal/structure.vue page new translation items // seal/structure.vue page new translation items
structure: { // Current choice prefix
// Current choice prefix currentChoicePrefix: 'Current choice: ',
currentChoicePrefix: 'Current choice: ', // Please select
// Please select pleaseSelect: 'Please select',
pleaseSelect: 'Please select', // Result prefix
// Result prefix resultPrefix: 'Selection result: ',
resultPrefix: 'Selection result: ', // Result file
// Result file resultFile: 'Result file',
resultFile: 'Result file', // Please select material
// Please select material selectMaterial: 'Please select material',
selectMaterial: 'Please select material', // Please select structure
// Please select structure selectStructure: 'Please select structure',
selectStructure: 'Please select structure', // Upload image
// Upload image uploadImage: 'Upload Image',
uploadImage: 'Upload Image', // Please upload image
// Please upload image pleaseUploadImage: 'Please upload image',
pleaseUploadImage: 'Please upload image', // Submit requirement
// Submit requirement submitRequirement: 'Submit Requirement',
submitRequirement: 'Submit Requirement', // Submit successful
// Submit successful submitSuccess: 'Submitted Successfully',
submitSuccess: 'Submitted Successfully',
},
} }

View File

@@ -2,12 +2,10 @@ export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '文件预览', title: '文件预览',
// file-preview/file-preview.vue 页面新增翻译项 // file-preview/file-preview.vue 页面新增翻译项
filePreview: { // 文件地址不存在
// 文件地址不存在 fileUrlNotExist: '文件地址不存在',
fileUrlNotExist: '文件地址不存在', // 视频地址不存在
// 视频地址不存在 videoUrlNotExist: '视频地址不存在',
videoUrlNotExist: '视频地址不存在', // 暂不支持该类型文件预览
// 暂不支持该类型文件预览 unsupportedFileType: '暂不支持该类型文件预览',
unsupportedFileType: '暂不支持该类型文件预览',
},
} }

View File

@@ -1,15 +1,9 @@
export const lang = { export const lang = {
// 表单页面 // 表单页面
form: { // 页面标题
form: { title: '请填写表单所需信息',
// 页面标题 // 提交成功提示
title: '请填写表单所需信息', submitSuccess: '提交成功',
// 提交成功提示 // 未获取到表单信息
submitSuccess: '提交成功', noFormInfo: '未获取到表单信息',
// 未获取到表单信息
noFormInfo: '未获取到表单信息',
},
},
} }

View File

@@ -1,18 +1,12 @@
export const lang = { export const lang = {
// 表单页面 - formdata // 表单页面 - formdata
form: { title: '表单详情',
formdata: { // 空状态提示
title: '表单详情', submitSuccess: '提交成功',
// 空状态提示 noFormInfo: '未获取到表单信息',
submitSuccess: '提交成功', // 表单提示文案默认值
noFormInfo: '未获取到表单信息', formTipPlaceholder: '请填写表单所需信息',
// 表单提示文案默认值 // 弹窗
formTipPlaceholder: '请填写表单所需信息', tip: '提示',
// 弹窗 paramError: '参数错误',
tip: '提示',
paramError: '参数错误',
}
}
} }

View File

@@ -1,27 +1,19 @@
export const lang = { export const lang = {
// 页面标题
// 印章详情 title: '介质材料详情',
seal: { // 导出图片
medium: { exportImage: '导出图片',
detail: { // 导出PDF
// 页面标题 exportPdf: '导出PDF',
title: '印章详情', // 加载中
// 导出图片 loading: '加载中',
exportImage: '导出图片', // 文件不存在
// 导出PDF fileNotExist: '文件不存在',
exportPdf: '导出PDF', // 保存成功
// 加载中 saveSuccess: '保存成功',
loading: '加载中', // 保存失败
// 文件不存在 saveFailed: '保存失败',
fileNotExist: '文件不存在', // 下载失败
// 保存成功 downloadFailed: '下载失败',
saveSuccess: '保存成功',
// 保存失败
saveFailed: '保存失败',
// 下载失败
downloadFailed: '下载失败',
}
}
}
} }

View File

@@ -1,24 +1,16 @@
export const lang = { export const lang = {
title: '介质材料搜索',
// 印章搜索页 // 搜索框占位符
seal: { placeholder: '请输入关键词搜索',
medium: { // 搜索结果标题
search: { searchResult: '搜索结果',
title: '介质材料搜索', // 空数据提示
// 搜索框占位符 noData: '暂无数据',
placeholder: '请输入关键词搜索', // 弹窗标题
// 搜索结果标题 tip: '提示',
searchResult: '搜索结果', // 确认删除全部历史记录
// 空数据提示 confirmDeleteAllHistory: '确定要删除全部搜索历史吗?',
noData: '暂无数据', // 确认删除单条历史记录
// 弹窗标题 confirmDeleteHistory: '确定要删除这条搜索历史吗?',
tip: '提示',
// 确认删除全部历史记录
confirmDeleteAllHistory: '确定要删除全部搜索历史吗?',
// 确认删除单条历史记录
confirmDeleteHistory: '确定要删除这条搜索历史吗?',
}
}
}
} }

View File

@@ -2,26 +2,24 @@ export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '结构选型', title: '结构选型',
// seal/structure.vue 页面新增翻译项 // seal/structure.vue 页面新增翻译项
structure: { // 当前选择前缀
// 当前选择前缀 currentChoicePrefix: '当前选择:',
currentChoicePrefix: '当前选择:', // 请选择
// 请选择 pleaseSelect: '请选择',
pleaseSelect: '请选择', // 选型结果前缀
// 选型结果前缀 resultPrefix: '选型结果:',
resultPrefix: '选型结果:', // 结果文件
// 结果文件 resultFile: '结果文件',
resultFile: '结果文件', // 请选择材质
// 请选择材质 selectMaterial: '请选择材质',
selectMaterial: '请选择材质', // 请选择结构
// 请选择结构 selectStructure: '请选择结构',
selectStructure: '请选择结构', // 上传图片
// 上传图片 uploadImage: '上传图片',
uploadImage: '上传图片', // 请上传图片
// 请上传图片 pleaseUploadImage: '请上传图片',
pleaseUploadImage: '请上传图片', // 提交需求
// 提交需求 submitRequirement: '提交需求',
submitRequirement: '提交需求', // 提交成功
// 提交成功 submitSuccess: '提交成功',
submitSuccess: '提交成功',
},
} }