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: {
form: {
// Page title // Page title
title: 'Please fill in the form information', title: 'Please fill in the form information',
// Submit success message // Submit success message
submitSuccess: 'Submitted successfully', submitSuccess: 'Submitted successfully',
// Form information not available // Form information not available
noFormInfo: 'Form information not available', noFormInfo: 'Form information not available',
},
},
} }

View File

@@ -1,8 +1,6 @@
export const lang = { export const lang = {
// Form page - formdata // Form page - formdata
form: {
formdata: {
title: 'Form Details', title: 'Form Details',
// Empty state messages // Empty state messages
submitSuccess: 'Submitted successfully', submitSuccess: 'Submitted successfully',
@@ -13,6 +11,3 @@ export const lang = {
tip: 'Tip', tip: 'Tip',
paramError: 'Parameter error', paramError: 'Parameter error',
} }
}
}

View File

@@ -1,9 +1,4 @@
export const lang = { export const lang = {
// Seal detail
seal: {
medium: {
detail: {
// Page title // Page title
title: 'Seal Details', title: 'Seal Details',
// Export image // Export image
@@ -20,8 +15,5 @@ export const lang = {
saveFailed: 'Save failed', saveFailed: 'Save failed',
// Download failed // Download failed
downloadFailed: 'Download failed', downloadFailed: 'Download failed',
}
}
}
} }

View File

@@ -1,9 +1,4 @@
export const lang = { export const lang = {
// Seal search page
seal: {
medium: {
search: {
title: 'Medium Material Search', title: 'Medium Material Search',
// Search input placeholder // Search input placeholder
placeholder: 'Enter keywords to search', placeholder: 'Enter keywords to search',
@@ -17,8 +12,5 @@ export const lang = {
confirmDeleteAllHistory: 'Are you sure you want to delete all search history?', confirmDeleteAllHistory: 'Are you sure you want to delete all search history?',
// Confirm delete single history item // Confirm delete single history item
confirmDeleteHistory: 'Are you sure you want to delete this search history?', confirmDeleteHistory: 'Are you sure you want to delete this search history?',
}
}
}
} }

View File

@@ -2,7 +2,6 @@ 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
@@ -23,5 +22,4 @@ export const lang = {
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,8 +1,5 @@
export const lang = { export const lang = {
// 表单页面 - formdata // 表单页面 - formdata
form: {
formdata: {
title: '表单详情', title: '表单详情',
// 空状态提示 // 空状态提示
submitSuccess: '提交成功', submitSuccess: '提交成功',
@@ -13,6 +10,3 @@ export const lang = {
tip: '提示', tip: '提示',
paramError: '参数错误', paramError: '参数错误',
} }
}
}

View File

@@ -1,11 +1,6 @@
export const lang = { export const lang = {
// 印章详情
seal: {
medium: {
detail: {
// 页面标题 // 页面标题
title: '印章详情', title: '介质材料详情',
// 导出图片 // 导出图片
exportImage: '导出图片', exportImage: '导出图片',
// 导出PDF // 导出PDF
@@ -20,8 +15,5 @@ export const lang = {
saveFailed: '保存失败', saveFailed: '保存失败',
// 下载失败 // 下载失败
downloadFailed: '下载失败', downloadFailed: '下载失败',
}
}
}
} }

View File

@@ -1,9 +1,4 @@
export const lang = { export const lang = {
// 印章搜索页
seal: {
medium: {
search: {
title: '介质材料搜索', title: '介质材料搜索',
// 搜索框占位符 // 搜索框占位符
placeholder: '请输入关键词搜索', placeholder: '请输入关键词搜索',
@@ -17,8 +12,5 @@ export const lang = {
confirmDeleteAllHistory: '确定要删除全部搜索历史吗?', confirmDeleteAllHistory: '确定要删除全部搜索历史吗?',
// 确认删除单条历史记录 // 确认删除单条历史记录
confirmDeleteHistory: '确定要删除这条搜索历史吗?', confirmDeleteHistory: '确定要删除这条搜索历史吗?',
}
}
}
} }

View File

@@ -2,7 +2,6 @@ export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '结构选型', title: '结构选型',
// seal/structure.vue 页面新增翻译项 // seal/structure.vue 页面新增翻译项
structure: {
// 当前选择前缀 // 当前选择前缀
currentChoicePrefix: '当前选择:', currentChoicePrefix: '当前选择:',
// 请选择 // 请选择
@@ -23,5 +22,4 @@ export const lang = {
submitRequirement: '提交需求', submitRequirement: '提交需求',
// 提交成功 // 提交成功
submitSuccess: '提交成功', submitSuccess: '提交成功',
},
} }