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: 'File Preview',
// file-preview/file-preview.vue page new translation items
filePreview: {
// File URL does not exist
fileUrlNotExist: 'File URL does not exist',
// Video URL does not exist
videoUrlNotExist: 'Video URL does not exist',
// This file type preview is not supported
unsupportedFileType: 'This file type preview is not supported',
},
// File URL does not exist
fileUrlNotExist: 'File URL does not exist',
// Video URL does not exist
videoUrlNotExist: 'Video URL does not exist',
// This file type preview is not supported
unsupportedFileType: 'This file type preview is not supported',
}

View File

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

View File

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

View File

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

View File

@@ -1,24 +1,16 @@
export const lang = {
// Seal search page
seal: {
medium: {
search: {
title: 'Medium Material Search',
// Search input placeholder
placeholder: 'Enter keywords to search',
// Search results title
searchResult: 'Search Results',
// Empty data tip
noData: 'No Data',
// Modal title
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?',
}
}
}
title: 'Medium Material Search',
// Search input placeholder
placeholder: 'Enter keywords to search',
// Search results title
searchResult: 'Search Results',
// Empty data tip
noData: 'No Data',
// Modal title
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: 'Structure Selection',
// seal/structure.vue page new translation items
structure: {
// Current choice prefix
currentChoicePrefix: 'Current choice: ',
// Please select
pleaseSelect: 'Please select',
// Result prefix
resultPrefix: 'Selection result: ',
// Result file
resultFile: 'Result file',
// Please select material
selectMaterial: 'Please select material',
// Please select structure
selectStructure: 'Please select structure',
// Upload image
uploadImage: 'Upload Image',
// Please upload image
pleaseUploadImage: 'Please upload image',
// Submit requirement
submitRequirement: 'Submit Requirement',
// Submit successful
submitSuccess: 'Submitted Successfully',
},
// Current choice prefix
currentChoicePrefix: 'Current choice: ',
// Please select
pleaseSelect: 'Please select',
// Result prefix
resultPrefix: 'Selection result: ',
// Result file
resultFile: 'Result file',
// Please select material
selectMaterial: 'Please select material',
// Please select structure
selectStructure: 'Please select structure',
// Upload image
uploadImage: 'Upload Image',
// Please upload image
pleaseUploadImage: 'Please upload image',
// Submit requirement
submitRequirement: 'Submit Requirement',
// Submit successful
submitSuccess: 'Submitted Successfully',
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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