Add Chinese translations for medication management and personal settings

- Introduced new translation files for medication, personal, and weight management in Chinese.
- Updated the main index file to include the new translation modules.
- Enhanced the medication type definitions to include 'ointment'.
- Refactored workout type labels to utilize i18n for better localization support.
- Improved sleep quality descriptions and recommendations with i18n integration.
This commit is contained in:
richarjiang
2025-11-28 17:29:51 +08:00
parent fbe0c92f0f
commit bca6670390
42 changed files with 7972 additions and 6632 deletions

551
i18n/zh/diet.ts Normal file
View File

@@ -0,0 +1,551 @@
export const nutritionRecords = {
title: '营养记录',
listTitle: '今日餐食',
recordCount: '{{count}} 条记录',
empty: {
title: '今天还没有记录',
action: '记一笔',
},
footer: {
end: '- 已经到底啦 -',
loadMore: '加载更多',
},
delete: {
title: '确认删除',
message: '确定要删除这条营养记录吗?此操作无法撤销。',
cancel: '取消',
confirm: '删除',
},
mealTypes: {
breakfast: '早餐',
lunch: '午餐',
dinner: '晚餐',
snack: '加餐',
other: '其他',
},
nutrients: {
protein: '蛋白质',
fat: '脂肪',
carbs: '碳水',
unit: 'g',
caloriesUnit: '千卡',
},
overlay: {
title: '记录方式',
scan: 'AI识别',
foodLibrary: '食物库',
voiceRecord: '一句话记录',
},
chart: {
remaining: '还能吃',
formula: '还能吃 = 代谢 + 运动 - 饮食',
metabolism: '代谢',
exercise: '运动',
diet: '饮食',
},
};
export const foodCamera = {
title: '食物拍摄',
hint: '确保食物在取景框内',
permission: {
title: '需要相机权限',
description: '为了拍摄食物并进行AI识别需要访问您的相机',
button: '授权访问',
},
guide: {
title: '拍摄示例',
description: '请上传或拍摄清晰的食物照片,有助于提高识别准确率',
button: '知道了',
good: '光线充足,主体清晰',
bad: '模糊不清,光线昏暗',
},
buttons: {
album: '相册',
capture: '拍照',
help: '帮助',
},
alerts: {
captureFailed: {
title: '拍照失败',
message: '请重试',
},
pickFailed: {
title: '选择失败',
message: '请重试',
},
},
};
export const foodRecognition = {
title: '食物识别',
header: {
confirm: '确认食物',
recognizing: 'AI 识别中',
},
errors: {
noImage: '未找到图片',
generic: '食物识别失败,请重试',
unknown: '未知错误',
noFoodDetected: '识别失败:未检测到食物',
processError: '识别过程出错',
},
logs: {
uploading: '📤 正在上传图片到云端...',
uploadSuccess: '✅ 图片上传完成',
analyzing: '🤖 AI大模型分析中...',
analysisSuccess: '✅ AI分析完成',
confidence: '🎯 识别置信度: {{value}}%',
itemsFound: '🍽️ 识别到 {{count}} 种食物',
failed: '❌ 识别失败:未检测到食物',
error: '❌ 识别过程出错',
},
status: {
idle: {
title: '准备就绪',
subtitle: '请稍候...',
},
uploading: {
title: '上传图片',
subtitle: '正在上传图片到云端服务器...',
},
recognizing: {
title: 'AI 分析中',
subtitle: '智能模型正在分析食物成分...',
},
completed: {
title: '识别成功',
subtitle: '即将跳转到分析结果页面',
},
failed: {
title: '识别失败',
subtitle: '请检查网络或稍后重试',
},
processing: {
title: '处理中...',
subtitle: '请稍候...',
},
},
mealTypes: {
breakfast: '早餐',
lunch: '午餐',
dinner: '晚餐',
snack: '加餐',
unknown: '未知',
},
info: {
title: '智能食物识别',
description: 'AI 将分析照片,自动识别食物种类并估算营养成分,生成详细报告。',
},
actions: {
start: '开始识别',
retry: '返回重试',
logs: '处理日志',
logsPlaceholder: '准备开始...',
},
alerts: {
recognizing: {
title: '正在识别中',
message: '识别过程尚未完成,确定要返回吗?',
continue: '继续识别',
back: '返回',
},
},
};
export const foodAnalysisResult = {
title: '分析结果',
error: {
notFound: '未找到图片或识别结果',
},
placeholder: '营养记录',
nutrients: {
caloriesUnit: '千卡',
protein: '蛋白质',
fat: '脂肪',
carbs: '碳水',
unit: '克',
},
sections: {
recognitionResult: '识别结果',
foodIntake: '食物摄入',
},
nonFood: {
title: '未识别到食物',
suggestions: {
title: '建议:',
item1: '• 确保图片中包含食物',
item2: '• 尝试更清晰的照片角度',
item3: '• 避免过度模糊或光线不足',
},
},
actions: {
retake: '重新拍照',
record: '记录',
close: '关闭',
},
mealSelector: {
title: '选择餐次',
},
editModal: {
title: '编辑食物信息',
fields: {
name: '食物名称',
namePlaceholder: '输入食物名称',
amount: '重量 (克)',
amountPlaceholder: '输入重量',
calories: '卡路里 (千卡)',
caloriesPlaceholder: '输入卡路里',
},
actions: {
cancel: '取消',
save: '保存',
},
},
confidence: '置信度: {{value}}%',
dateFormats: {
today: 'YYYY年M月D日',
full: 'YYYY年M月D日 HH:mm',
},
};
export const foodLibrary = {
title: '食物库',
custom: '自定义',
search: {
placeholder: '搜索食物...',
loading: '搜索中...',
empty: '未找到相关食物',
noData: '暂无食物数据',
},
loading: '加载食物库中...',
retry: '重试',
mealTypes: {
breakfast: '早餐',
lunch: '午餐',
dinner: '晚餐',
snack: '加餐',
},
actions: {
record: '记录',
selectMeal: '选择餐次',
},
alerts: {
deleteFailed: {
title: '删除失败',
message: '删除食物时发生错误,请稍后重试',
},
createFailed: {
title: '创建失败',
message: '创建自定义食物时发生错误,请稍后重试',
},
},
};
export const createCustomFood = {
title: '创建自定义食物',
save: '保存',
preview: {
title: '效果预览',
defaultName: '食物名称',
},
basicInfo: {
title: '基本信息',
name: '食物名称',
namePlaceholder: '例如,汉堡',
defaultAmount: '默认数量',
calories: '食物热量',
},
optionalInfo: {
title: '可选信息',
photo: '照片',
addPhoto: '添加照片',
protein: '蛋白质',
fat: '脂肪',
carbohydrate: '碳水化合物',
},
units: {
kcal: '千卡',
g: 'g',
gram: '克',
},
alerts: {
permissionDenied: {
title: '权限不足',
message: '需要相册权限以选择照片',
},
uploadFailed: {
title: '上传失败',
message: '照片上传失败,请重试',
},
error: {
title: '发生错误',
message: '选择照片失败,请重试',
},
validation: {
title: '提示',
nameRequired: '请输入食物名称',
caloriesRequired: '请输入有效的热量值',
},
},
};
export const voiceRecord = {
title: '一句话记录',
intro: {
description: '通过语音描述您的饮食内容AI将智能分析营养成分和卡路里',
},
status: {
idle: '轻触麦克风开始录音',
listening: '正在聆听中,请开始说话...',
processing: 'AI正在处理语音内容...',
analyzing: 'AI大模型深度分析营养成分中...',
result: '语音识别完成,请确认结果',
},
hints: {
listening: '说出您想记录的食物内容',
},
examples: {
title: '记录示例:',
items: [
'今早吃了两个煎蛋、一片全麦面包和一杯牛奶',
'午饭吃了红烧肉约150克、米饭一小碗、青菜一份',
'晚饭吃了蒸蛋羹、紫菜蛋花汤、小米粥一碗',
],
},
analysis: {
progress: '分析进度: {{progress}}%',
hint: 'AI正在深度分析您的食物描述...',
},
result: {
label: '识别结果:',
},
actions: {
retry: '重新录音',
confirm: '确认使用',
},
alerts: {
noVoiceInput: '没有检测到语音输入,请重试',
networkError: '网络连接异常,请检查网络后重试',
voiceError: '语音识别出现问题,请重试',
noValidContent: '未识别到有效内容,请重新录音',
pleaseRecordFirst: '请先进行语音识别',
recordingFailed: '录音失败',
recordingPermissionError: '无法启动语音识别,请检查麦克风权限设置',
analysisFailed: '分析失败',
},
};
export const nutritionLabelAnalysis = {
title: '成分表分析',
camera: {
permissionDenied: '权限不足',
permissionMessage: '需要相机权限才能拍摄成分表',
},
actions: {
takePhoto: '拍摄',
selectFromAlbum: '相册',
startAnalysis: '开始分析',
close: '关闭',
},
placeholder: {
text: '拍摄或选择成分表照片',
},
status: {
uploading: '正在上传图片...',
analyzing: '正在分析成分表...',
},
errors: {
analysisFailed: {
title: '分析失败',
message: '分析图片时发生错误,请重试',
defaultMessage: '分析服务暂时不可用',
},
cannotRecognize: '无法识别成分表,请尝试拍摄更清晰的照片',
cameraPermissionDenied: '需要相机权限才能拍摄成分表',
},
results: {
title: '营养成分详细分析',
detailedAnalysis: '营养成分详细分析',
},
imageViewer: {
close: '关闭',
dateFormat: 'YYYY年M月D日 HH:mm',
},
};
export const nutritionAnalysisHistory = {
title: '历史记录',
dateFormat: 'YYYY年M月D日 HH:mm',
recognized: '识别 {{count}} 项营养素',
loadingMore: '加载更多...',
loading: '加载历史记录...',
filter: {
all: '全部',
},
filters: {
all: '全部',
success: '成功',
failed: '失败',
},
status: {
success: '成功',
failed: '失败',
processing: '处理中',
unknown: '未知',
},
nutrients: {
energy: '热量',
protein: '蛋白质',
carbs: '碳水',
fat: '脂肪',
},
delete: {
confirmTitle: '确认删除',
confirmMessage: '确定要删除这条记录吗?',
cancel: '取消',
delete: '删除',
successTitle: '删除成功',
successMessage: '记录已成功删除',
},
actions: {
expand: '展开详情',
collapse: '收起详情',
expandDetails: '展开详情',
collapseDetails: '收起详情',
confirmDelete: '确认删除',
delete: '删除',
cancel: '取消',
retry: '重试',
},
empty: {
title: '暂无历史记录',
subtitle: '开始识别营养成分表吧',
},
errors: {
error: '错误',
loadFailed: '加载失败',
unknownError: '未知错误',
fetchFailed: '获取历史记录失败',
fetchFailedRetry: '获取历史记录失败,请重试',
deleteFailed: '删除失败,请稍后重试',
},
loadingState: {
records: '加载历史记录...',
more: '加载更多...',
},
details: {
title: '详细营养成分',
nutritionDetails: '详细营养成分',
aiModel: 'AI 模型',
provider: '服务提供商',
serviceProvider: '服务提供商',
},
records: {
nutritionCount: '识别 {{count}} 项营养素',
},
imageViewer: {
close: '关闭',
},
};
export const waterDetail = {
title: '饮水详情',
waterRecord: '饮水记录',
today: '今日',
total: '总计:',
goal: '目标:',
noRecords: '暂无饮水记录',
noRecordsSubtitle: '点击"添加记录"开始记录饮水量',
deleteConfirm: {
title: '确认删除',
message: '确定要删除这条饮水记录吗?此操作无法撤销。',
cancel: '取消',
confirm: '删除',
},
deleteButton: '删除',
water: '水',
loadingUserPreferences: '加载用户偏好设置失败',
};
export const waterSettings = {
title: '饮水设置',
sections: {
dailyGoal: '每日饮水目标',
quickAdd: '快速添加默认值',
reminder: '喝水提醒',
},
descriptions: {
quickAdd: '设置点击"+"按钮时添加的默认饮水量',
reminder: '设置定时提醒您补充水分',
},
labels: {
ml: 'ml',
disabled: '已关闭',
},
alerts: {
goalSuccess: {
title: '设置成功',
message: '每日饮水目标已设置为 {{amount}}ml',
},
quickAddSuccess: {
title: '设置成功',
message: '快速添加默认值已设置为 {{amount}}ml',
},
quickAddFailed: {
title: '设置失败',
message: '无法保存快速添加默认值,请重试',
},
},
buttons: {
cancel: '取消',
confirm: '确定',
},
status: {
reminderEnabled: '{{startTime}}-{{endTime}}, 每{{interval}}分钟',
},
};
export const waterReminderSettings = {
title: '喝水提醒',
sections: {
notifications: '推送提醒',
timeRange: '提醒时间段',
interval: '提醒间隔',
},
descriptions: {
notifications: '开启后将在指定时间段内定期推送喝水提醒',
timeRange: '只在指定时间段内发送提醒,避免打扰您的休息',
interval: '选择提醒的频率建议30-120分钟为宜',
},
labels: {
startTime: '开始时间',
endTime: '结束时间',
interval: '提醒间隔',
saveSettings: '保存设置',
hours: '小时',
timeRangePreview: '时间段预览',
minutes: '分钟',
},
alerts: {
timeValidation: {
title: '时间设置提示',
startTimeInvalid: '开始时间不能晚于或等于结束时间,请重新选择',
endTimeInvalid: '结束时间不能早于或等于开始时间,请重新选择',
},
success: {
enabled: '设置成功',
enabledMessage: '喝水提醒已开启\n\n时间段{{timeRange}}\n提醒间隔{{interval}}\n\n我们将在指定时间段内定期提醒您喝水',
disabled: '设置成功',
disabledMessage: '喝水提醒已关闭',
},
error: {
title: '保存失败',
message: '无法保存喝水提醒设置,请重试',
},
},
buttons: {
confirm: '确定',
cancel: '取消',
},
};