- 新增 i18n 翻译资源,覆盖睡眠、饮水、体重、锻炼、用药 AI 识别、步数、健身圆环、基础代谢及设置等核心模块 - 重构相关页面及组件(如 SleepDetail, WaterDetail, WorkoutHistory 等)使用 `useI18n` 钩子替换硬编码文本 - 升级 `utils/date` 工具库与 `DateSelector` 组件,支持基于语言环境的日期格式化与显示 - 完善登录页、注销流程及权限申请弹窗的双语提示信息 - 优化部分页面的 UI 细节与字体样式以适配多语言显示
3511 lines
116 KiB
TypeScript
3511 lines
116 KiB
TypeScript
import * as Localization from 'expo-localization';
|
||
import i18n from 'i18next';
|
||
import { initReactI18next } from 'react-i18next';
|
||
|
||
import { getItemSync, setItem } from '@/utils/kvStore';
|
||
|
||
export const LANGUAGE_PREFERENCE_KEY = 'app_language_preference';
|
||
export const SUPPORTED_LANGUAGES = ['zh', 'en'] as const;
|
||
export type AppLanguage = typeof SUPPORTED_LANGUAGES[number];
|
||
|
||
const fallbackLanguage: AppLanguage = 'zh';
|
||
|
||
const personalScreenResources = {
|
||
edit: '编辑',
|
||
login: '登录',
|
||
memberNumber: '会员编号: {{number}}',
|
||
aiUsage: '免费AI次数: {{value}}',
|
||
aiUsageUnlimited: '无限',
|
||
fishRecord: '能量记录',
|
||
badgesPreview: {
|
||
title: '我的勋章',
|
||
subtitle: '记录你的荣耀时刻',
|
||
cta: '查看全部',
|
||
loading: '正在同步勋章...',
|
||
empty: '完成睡眠或挑战任务即可解锁首枚勋章',
|
||
lockedHint: '坚持训练即可点亮更多勋章',
|
||
},
|
||
stats: {
|
||
height: '身高',
|
||
weight: '体重',
|
||
age: '年龄',
|
||
ageSuffix: '岁',
|
||
},
|
||
membership: {
|
||
badge: '尊享会员',
|
||
planFallback: 'VIP 会员',
|
||
expiryLabel: '会员有效期',
|
||
changeButton: '更改会员套餐',
|
||
validForever: '长期有效',
|
||
dateFormat: 'YYYY年MM月DD日',
|
||
},
|
||
sections: {
|
||
notifications: '通知',
|
||
developer: '开发者',
|
||
other: '其他',
|
||
account: '账号与安全',
|
||
language: '语言',
|
||
healthData: '健康数据授权',
|
||
medicalSources: '医学建议来源',
|
||
customization: '个性化',
|
||
},
|
||
menu: {
|
||
notificationSettings: '通知设置',
|
||
developerOptions: '开发者选项',
|
||
pushSettings: '推送通知设置',
|
||
privacyPolicy: '隐私政策',
|
||
feedback: '意见反馈',
|
||
userAgreement: '用户协议',
|
||
logout: '退出登录',
|
||
deleteAccount: '注销帐号',
|
||
healthDataPermissions: '健康数据授权说明',
|
||
whoSource: '世界卫生组织 (WHO)',
|
||
tabBarConfig: '底部栏配置',
|
||
},
|
||
language: {
|
||
title: '语言',
|
||
menuTitle: '界面语言',
|
||
modalTitle: '选择语言',
|
||
modalSubtitle: '选择后界面会立即更新',
|
||
cancel: '取消',
|
||
options: {
|
||
zh: {
|
||
label: '中文',
|
||
description: '推荐中文用户使用',
|
||
},
|
||
en: {
|
||
label: '英文',
|
||
description: '使用英文界面',
|
||
},
|
||
},
|
||
},
|
||
tabBarConfig: {
|
||
title: '底部栏配置',
|
||
subtitle: '自定义你的底部导航栏',
|
||
description: '使用开关控制标签的显示和隐藏',
|
||
resetButton: '恢复默认',
|
||
cannotDisable: '此标签不可关闭',
|
||
resetConfirm: {
|
||
title: '恢复默认设置?',
|
||
message: '将重置所有底部栏配置和显示状态',
|
||
cancel: '取消',
|
||
confirm: '确认恢复',
|
||
},
|
||
resetSuccess: '已恢复默认设置',
|
||
},
|
||
};
|
||
|
||
const badgesScreenResources = {
|
||
title: '勋章馆',
|
||
subtitle: '点亮每一次坚持',
|
||
hero: {
|
||
highlight: '保持连续打卡即可解锁更多稀有勋章',
|
||
earnedLabel: '已获得',
|
||
totalLabel: '总数',
|
||
progressLabel: '解锁进度',
|
||
},
|
||
categories: {
|
||
all: '全部',
|
||
sleep: '睡眠',
|
||
exercise: '运动',
|
||
diet: '饮食',
|
||
challenge: '挑战',
|
||
social: '社交',
|
||
special: '特别',
|
||
},
|
||
rarities: {
|
||
common: '普通',
|
||
uncommon: '少见',
|
||
rare: '稀有',
|
||
epic: '史诗',
|
||
legendary: '传说',
|
||
},
|
||
status: {
|
||
earned: '已获得',
|
||
locked: '待解锁',
|
||
earnedAt: '{{date}} 获得',
|
||
},
|
||
legend: '稀有度说明',
|
||
filterLabel: '勋章分类',
|
||
empty: {
|
||
title: '还没有勋章',
|
||
description: '完成睡眠、运动、挑战等任务即可点亮你的第一枚勋章。',
|
||
action: '去探索计划',
|
||
},
|
||
};
|
||
|
||
const badgesScreenResourcesEn = {
|
||
title: 'Badge Gallery',
|
||
subtitle: 'Celebrate every effort',
|
||
hero: {
|
||
highlight: 'Keep checking in to unlock rarer badges.',
|
||
earnedLabel: 'Earned',
|
||
totalLabel: 'Total',
|
||
progressLabel: 'Progress',
|
||
},
|
||
categories: {
|
||
all: 'All',
|
||
sleep: 'Sleep',
|
||
exercise: 'Exercise',
|
||
diet: 'Nutrition',
|
||
challenge: 'Challenge',
|
||
social: 'Social',
|
||
special: 'Special',
|
||
},
|
||
rarities: {
|
||
common: 'Common',
|
||
uncommon: 'Uncommon',
|
||
rare: 'Rare',
|
||
epic: 'Epic',
|
||
legendary: 'Legendary',
|
||
},
|
||
status: {
|
||
earned: 'Unlocked',
|
||
locked: 'Locked',
|
||
earnedAt: 'Unlocked on {{date}}',
|
||
},
|
||
legend: 'Rarity legend',
|
||
filterLabel: 'Badge categories',
|
||
empty: {
|
||
title: 'No badges yet',
|
||
description: 'Complete sleep, workout, or challenge tasks to earn your first badge.',
|
||
action: 'Explore plans',
|
||
},
|
||
};
|
||
|
||
const editProfileResources = {
|
||
title: '编辑资料',
|
||
fields: {
|
||
name: '昵称',
|
||
gender: '性别',
|
||
height: '身高',
|
||
weight: '体重',
|
||
activityLevel: '活动水平',
|
||
birthDate: '出生日期',
|
||
maxHeartRate: '最大心率',
|
||
},
|
||
gender: {
|
||
male: '男',
|
||
female: '女',
|
||
notSet: '未设置',
|
||
},
|
||
height: {
|
||
unit: '厘米',
|
||
placeholder: '170厘米',
|
||
},
|
||
weight: {
|
||
unit: '公斤',
|
||
placeholder: '55公斤',
|
||
},
|
||
activityLevels: {
|
||
1: '久坐',
|
||
2: '轻度活跃',
|
||
3: '中度活跃',
|
||
4: '非常活跃',
|
||
descriptions: {
|
||
1: '很少运动',
|
||
2: '每周1-3次运动',
|
||
3: '每周3-5次运动',
|
||
4: '每周6-7次运动',
|
||
},
|
||
},
|
||
birthDate: {
|
||
placeholder: '1995年1月1日',
|
||
format: '{{year}}年{{month}}月{{day}}日',
|
||
},
|
||
maxHeartRate: {
|
||
unit: '次/分钟',
|
||
notAvailable: '未获取',
|
||
alert: {
|
||
title: '提示',
|
||
message: '最大心率数据从健康应用自动获取',
|
||
},
|
||
},
|
||
alerts: {
|
||
notLoggedIn: {
|
||
title: '未登录',
|
||
message: '请先登录后再尝试保存',
|
||
},
|
||
saveFailed: {
|
||
title: '保存失败',
|
||
message: '请稍后重试',
|
||
},
|
||
avatarPermissions: {
|
||
title: '权限不足',
|
||
message: '需要相册权限以选择头像',
|
||
},
|
||
avatarUploadFailed: {
|
||
title: '上传失败',
|
||
message: '头像上传失败,请重试',
|
||
},
|
||
avatarError: {
|
||
title: '发生错误',
|
||
message: '选择头像失败,请重试',
|
||
},
|
||
avatarSuccess: {
|
||
title: '成功',
|
||
message: '头像更新成功',
|
||
},
|
||
},
|
||
modals: {
|
||
cancel: '取消',
|
||
confirm: '确定',
|
||
save: '保存',
|
||
input: {
|
||
namePlaceholder: '输入昵称',
|
||
weightPlaceholder: '输入体重',
|
||
weightUnit: '公斤 (kg)',
|
||
},
|
||
selectHeight: '选择身高',
|
||
selectGender: '选择性别',
|
||
selectActivityLevel: '选择活动水平',
|
||
female: '女性',
|
||
male: '男性',
|
||
},
|
||
defaultValues: {
|
||
name: '今晚要吃肉',
|
||
height: 170,
|
||
weight: 55,
|
||
birthDate: '1995-01-01',
|
||
activityLevel: 1,
|
||
},
|
||
};
|
||
|
||
const healthPermissionsResources = {
|
||
title: '健康数据授权说明',
|
||
subtitle: '我们通过 Apple Health 的 HealthKit/CareKit 接口同步必要的数据,让训练、恢复和提醒更贴合你的身体状态。',
|
||
cards: {
|
||
usage: {
|
||
title: '我们会读取 / 写入的数据',
|
||
items: [
|
||
'运动与活动:步数、活动能量、锻炼记录用于生成训练表现和热力图。',
|
||
'身体指标:身高、体重、体脂率帮助制定个性化训练与营养建议。',
|
||
'睡眠与恢复:睡眠时长与阶段用于智能提醒与恢复建议。',
|
||
'水分摄入:读取与写入饮水记录,保持与「健康」App 一致。',
|
||
],
|
||
},
|
||
purpose: {
|
||
title: '使用这些数据的目的',
|
||
items: [
|
||
'提供个性化训练计划、挑战与恢复建议。',
|
||
'在统计页展示长期趋势,帮助你理解身体变化。',
|
||
'减少重复输入,在提醒与挑战中自动同步进度。',
|
||
],
|
||
},
|
||
control: {
|
||
title: '你的控制权',
|
||
items: [
|
||
'授权流程完全由 Apple Health 控制,你可随时在 iOS 设置 > 健康 > 数据访问与设备 中更改权限。',
|
||
'未授权的数据不会被访问,撤销授权后我们会清理相关缓存。',
|
||
'核心功能依旧可用,并提供手动输入等替代方案。',
|
||
],
|
||
},
|
||
privacy: {
|
||
title: '数据存储与隐私',
|
||
items: [
|
||
'健康数据仅存储在你的设备上,我们不会上传服务器或共享给第三方。',
|
||
'只有在需要同步的功能中才会保存聚合后的匿名统计值。',
|
||
'我们遵循 Apple 的审核要求,任何变更都会提前告知。',
|
||
],
|
||
},
|
||
},
|
||
callout: {
|
||
title: '未授权会怎样?',
|
||
items: [
|
||
'相关模块会提示你授权,并提供手动记录入口。',
|
||
'拒绝授权不会影响其它与健康数据无关的功能。',
|
||
],
|
||
},
|
||
contact: {
|
||
title: '需要更多帮助?',
|
||
description: '如果你对 HealthKit / CareKit 的使用方式有疑问,可通过以下邮箱或在个人中心提交反馈:',
|
||
email: 'richardwei1995@gmail.com',
|
||
},
|
||
};
|
||
|
||
const statisticsResources = {
|
||
title: 'Out Live',
|
||
sections: {
|
||
bodyMetrics: '身体指标',
|
||
},
|
||
components: {
|
||
diet: {
|
||
title: '饮食分析',
|
||
loading: '加载中...',
|
||
updated: '更新: {{time}}',
|
||
remaining: '还能吃',
|
||
calories: '热量',
|
||
protein: '蛋白质',
|
||
carb: '碳水',
|
||
fat: '脂肪',
|
||
fiber: '纤维',
|
||
sodium: '钠',
|
||
basal: '基代',
|
||
exercise: '运动',
|
||
diet: '饮食',
|
||
kcal: '千卡',
|
||
aiRecognition: 'AI识别',
|
||
foodLibrary: '食物库',
|
||
voiceRecord: '一句话记录',
|
||
nutritionLabel: '成分表分析',
|
||
},
|
||
fitness: {
|
||
kcal: '千卡',
|
||
minutes: '分钟',
|
||
hours: '小时',
|
||
},
|
||
steps: {
|
||
title: '步数',
|
||
},
|
||
mood: {
|
||
title: '心情',
|
||
empty: '点击记录心情',
|
||
},
|
||
stress: {
|
||
title: '压力',
|
||
unit: 'ms',
|
||
},
|
||
water: {
|
||
title: '喝水',
|
||
unit: 'ml',
|
||
addButton: '+ {{amount}}ml',
|
||
},
|
||
metabolism: {
|
||
title: '基础代谢',
|
||
loading: '加载中...',
|
||
unit: '千卡/日',
|
||
status: {
|
||
high: '高代谢',
|
||
normal: '正常',
|
||
low: '偏低',
|
||
veryLow: '较低',
|
||
unknown: '未知',
|
||
},
|
||
},
|
||
sleep: {
|
||
title: '睡眠',
|
||
loading: '加载中...',
|
||
},
|
||
oxygen: {
|
||
title: '血氧饱和度',
|
||
},
|
||
circumference: {
|
||
title: '围度 (cm)',
|
||
setTitle: '设置{{label}}',
|
||
confirm: '确认',
|
||
measurements: {
|
||
chest: '胸围',
|
||
waist: '腰围',
|
||
hip: '上臀围',
|
||
arm: '臂围',
|
||
thigh: '大腿围',
|
||
calf: '小腿围',
|
||
},
|
||
},
|
||
circumferenceDetail: {
|
||
title: '围度统计',
|
||
loading: '加载中...',
|
||
error: '加载失败',
|
||
retry: '重试',
|
||
noData: '暂无数据',
|
||
noDataSelected: '请选择要显示的围度数据',
|
||
tabs: {
|
||
week: '按周',
|
||
month: '按月',
|
||
year: '按年',
|
||
},
|
||
measurements: {
|
||
chest: '胸围',
|
||
waist: '腰围',
|
||
upperHip: '上臀围',
|
||
arm: '臂围',
|
||
thigh: '大腿围',
|
||
calf: '小腿围',
|
||
},
|
||
modal: {
|
||
title: '设置{{label}}',
|
||
defaultTitle: '设置围度',
|
||
confirm: '确认',
|
||
},
|
||
chart: {
|
||
weekLabel: '第{{week}}周',
|
||
monthLabel: '{{month}}月',
|
||
empty: '暂无数据',
|
||
noSelection: '请选择要显示的围度数据',
|
||
},
|
||
},
|
||
workout: {
|
||
title: '近期锻炼',
|
||
minutes: '分钟',
|
||
kcal: '千卡',
|
||
noData: '尚无锻炼数据',
|
||
syncing: '等待同步',
|
||
sourceWaiting: '来源:等待同步',
|
||
sourceUnknown: '来源:未知',
|
||
sourceFormat: '来源:{{source}}',
|
||
sourceFormatMultiple: '来源:{{source}} 等',
|
||
lastWorkout: '最近锻炼',
|
||
updated: '更新',
|
||
},
|
||
weight: {
|
||
title: '体重记录',
|
||
addButton: '记录体重',
|
||
bmi: 'BMI',
|
||
weight: '体重',
|
||
days: '天',
|
||
range: '范围',
|
||
unit: 'kg',
|
||
bmiModal: {
|
||
title: 'BMI 指数说明',
|
||
description: 'BMI(身体质量指数)是评估体重与身高关系的国际通用健康指标',
|
||
formula: '计算公式:体重(kg) ÷ 身高²(m)',
|
||
classificationTitle: 'BMI 分类标准',
|
||
healthTipsTitle: '健康建议',
|
||
tips: {
|
||
nutrition: '保持均衡饮食,控制热量摄入',
|
||
exercise: '每周至少150分钟中等强度运动',
|
||
sleep: '保证7-9小时充足睡眠',
|
||
monitoring: '定期监测体重变化,及时调整',
|
||
},
|
||
disclaimer: 'BMI 仅供参考,不能反映肌肉量、骨密度等指标。如有健康疑问,请咨询专业医生。',
|
||
continueButton: '继续',
|
||
},
|
||
},
|
||
fitnessRings: {
|
||
title: '健身圆环',
|
||
activeCalories: '活动卡路里',
|
||
exerciseMinutes: '锻炼分钟',
|
||
standHours: '站立小时',
|
||
goal: '/{{goal}}',
|
||
ringLabels: {
|
||
active: '活动',
|
||
exercise: '锻炼',
|
||
stand: '站立',
|
||
},
|
||
},
|
||
},
|
||
tabs: {
|
||
health: '健康',
|
||
medications: '用药',
|
||
fasting: '断食',
|
||
challenges: '挑战',
|
||
personal: '个人',
|
||
},
|
||
activityHeatMap: {
|
||
subtitle: '最近6个月活跃 {{days}} 天',
|
||
activeRate: '{{rate}}%',
|
||
popover: {
|
||
title: '能量值的积攒后续可以用来兑换 AI 相关权益',
|
||
subtitle: '获取说明',
|
||
rules: {
|
||
login: '1. 每日登录获得能量值+1',
|
||
mood: '2. 每日记录心情获得能量值+1',
|
||
diet: '3. 记饮食获得能量值+1',
|
||
goal: '4. 完成一次目标获得能量值+1',
|
||
},
|
||
},
|
||
months: {
|
||
1: '1月',
|
||
2: '2月',
|
||
3: '3月',
|
||
4: '4月',
|
||
5: '5月',
|
||
6: '6月',
|
||
7: '7月',
|
||
8: '8月',
|
||
9: '9月',
|
||
10: '10月',
|
||
11: '11月',
|
||
12: '12月',
|
||
},
|
||
legend: {
|
||
less: '少',
|
||
more: '多',
|
||
},
|
||
},
|
||
};
|
||
|
||
const medicationsResources = {
|
||
greeting: '你好,{{name}}',
|
||
welcome: '欢迎来到用药助手!',
|
||
todayMedications: '今日用药',
|
||
filters: {
|
||
all: '全部',
|
||
taken: '已服用',
|
||
missed: '未服用',
|
||
},
|
||
emptyState: {
|
||
title: '今日暂无用药安排',
|
||
subtitle: '还未添加任何用药计划,快来补充吧。',
|
||
},
|
||
stack: {
|
||
completed: '已完成 ({{count}})',
|
||
},
|
||
dateFormats: {
|
||
today: '今天,{{date}}',
|
||
other: '{{date}}',
|
||
},
|
||
// MedicationCard 组件翻译
|
||
card: {
|
||
status: {
|
||
missed: '已错过',
|
||
timeToTake: '到服药时间',
|
||
remaining: '剩余 {{time}}',
|
||
},
|
||
action: {
|
||
takeNow: '立即服用',
|
||
taken: '已服用',
|
||
skipped: '已跳过',
|
||
skip: '跳过',
|
||
submitting: '提交中...',
|
||
},
|
||
skipAlert: {
|
||
title: '确认跳过',
|
||
message: '确定要跳过本次用药吗?\n\n跳过后将不会记录为已服用。',
|
||
cancel: '取消',
|
||
confirm: '确认跳过',
|
||
},
|
||
earlyTakeAlert: {
|
||
title: '尚未到服药时间',
|
||
message: '该用药计划在 {{time}},现在还早于1小时以上。\n\n是否确认已服用此药物?',
|
||
cancel: '取消',
|
||
confirm: '确认已服用',
|
||
},
|
||
takeError: {
|
||
title: '操作失败',
|
||
message: '记录服药时发生错误,请稍后重试',
|
||
confirm: '确定',
|
||
},
|
||
skipError: {
|
||
title: '操作失败',
|
||
message: '跳过操作失败,请稍后重试',
|
||
confirm: '确定',
|
||
},
|
||
},
|
||
// 添加药物页面翻译
|
||
add: {
|
||
title: '添加药物',
|
||
steps: {
|
||
name: '药品名称',
|
||
dosage: '剂型与剂量',
|
||
frequency: '服药频率',
|
||
time: '服药时间',
|
||
note: '备注',
|
||
},
|
||
descriptions: {
|
||
name: '为药物命名并上传包装照片,方便识别',
|
||
dosage: '选择药片类型并填写每次的用药剂量',
|
||
frequency: '设置用药频率以及每日次数',
|
||
time: '添加并管理每天的提醒时间',
|
||
note: '填写备注或医生叮嘱(可选)',
|
||
},
|
||
name: {
|
||
placeholder: '输入或搜索药品名称',
|
||
},
|
||
photo: {
|
||
title: '上传药品图片',
|
||
subtitle: '拍照或从相册选择,辅助识别药品包装',
|
||
selectTitle: '选择图片',
|
||
selectMessage: '请选择图片来源',
|
||
camera: '拍照',
|
||
album: '从相册选择',
|
||
cancel: '取消',
|
||
retake: '重新选择',
|
||
uploading: '上传中…',
|
||
uploadingText: '正在上传',
|
||
remove: '删除',
|
||
cameraPermission: '需要相机权限以拍摄药品照片',
|
||
albumPermission: '需要相册权限以选择药品照片',
|
||
uploadFailed: '上传失败',
|
||
uploadFailedMessage: '图片上传失败,请稍后重试',
|
||
cameraFailed: '拍照失败',
|
||
cameraFailedMessage: '无法打开相机,请稍后再试',
|
||
selectFailed: '选择失败',
|
||
selectFailedMessage: '无法打开相册,请稍后再试',
|
||
},
|
||
dosage: {
|
||
label: '每次剂量',
|
||
placeholder: '0.5',
|
||
type: '类型',
|
||
unitSelector: '选择剂量单位',
|
||
},
|
||
frequency: {
|
||
label: '每日次数',
|
||
value: '{{count}} 次/日',
|
||
period: '用药周期',
|
||
start: '开始',
|
||
end: '结束',
|
||
longTerm: '长期',
|
||
startDateInvalid: '日期无效',
|
||
startDateInvalidMessage: '开始日期不能早于今天',
|
||
endDateInvalid: '日期无效',
|
||
endDateInvalidMessage: '结束日期不能早于开始日期',
|
||
},
|
||
time: {
|
||
label: '每日提醒时间',
|
||
addTime: '添加时间',
|
||
editTime: '修改提醒时间',
|
||
addTimeButton: '添加时间',
|
||
},
|
||
note: {
|
||
label: '备注',
|
||
placeholder: '记录注意事项、医生叮嘱或自定义提醒',
|
||
voiceNotSupported: '当前设备暂不支持语音转文字,可直接输入备注',
|
||
voiceError: '语音识别不可用',
|
||
voiceErrorMessage: '无法使用语音输入,请检查权限设置后重试',
|
||
voiceStartError: '无法启动语音输入',
|
||
voiceStartErrorMessage: '请检查麦克风与语音识别权限后重试',
|
||
},
|
||
actions: {
|
||
previous: '上一步',
|
||
next: '下一步',
|
||
complete: '完成',
|
||
},
|
||
success: {
|
||
title: '添加成功',
|
||
message: '已成功添加药物"{{name}}"',
|
||
confirm: '确定',
|
||
},
|
||
error: {
|
||
title: '添加失败',
|
||
message: '创建药物时发生错误,请稍后重试',
|
||
confirm: '确定',
|
||
},
|
||
datePickers: {
|
||
startDate: '选择开始日期',
|
||
endDate: '选择结束日期',
|
||
time: '选择时间',
|
||
cancel: '取消',
|
||
confirm: '确定',
|
||
},
|
||
pickers: {
|
||
timesPerDay: '选择每日次数',
|
||
dosageUnit: '选择剂量单位',
|
||
cancel: '取消',
|
||
confirm: '确定',
|
||
},
|
||
},
|
||
// 药物管理页面翻译
|
||
manage: {
|
||
title: '药品管理',
|
||
subtitle: '管理所有药品的状态与提醒',
|
||
filters: {
|
||
all: '全部',
|
||
active: '进行中',
|
||
inactive: '已停用',
|
||
},
|
||
loading: '正在载入药品信息...',
|
||
empty: {
|
||
title: '暂无药品',
|
||
subtitle: '还没有相关药品记录,点击右上角添加',
|
||
},
|
||
deactivate: {
|
||
title: '停用 {{name}}?',
|
||
description: '停用后,当天已生成的用药计划会一并删除,且无法恢复。',
|
||
confirm: '确认停用',
|
||
cancel: '取消',
|
||
error: {
|
||
title: '操作失败',
|
||
message: '停用药物时发生问题,请稍后重试。',
|
||
},
|
||
},
|
||
toggleError: {
|
||
title: '操作失败',
|
||
message: '切换药物状态时发生问题,请稍后重试。',
|
||
},
|
||
formLabels: {
|
||
capsule: '胶囊',
|
||
pill: '药片',
|
||
tablet: '药片',
|
||
injection: '注射',
|
||
spray: '喷雾',
|
||
drop: '滴剂',
|
||
syrup: '糖浆',
|
||
other: '其他',
|
||
},
|
||
frequency: {
|
||
daily: '每日',
|
||
weekly: '每周',
|
||
custom: '自定义',
|
||
},
|
||
cardMeta: '开始于 {{date}} | 提醒:{{reminder}}',
|
||
reminderNotSet: '尚未设置',
|
||
unknownDate: '未知日期',
|
||
},
|
||
// 药物详情页面翻译
|
||
detail: {
|
||
title: '药品详情',
|
||
notFound: {
|
||
title: '未找到药品信息',
|
||
subtitle: '请从用药列表重新进入此页面。',
|
||
},
|
||
loading: '正在载入...',
|
||
error: {
|
||
title: '暂时无法获取该药品的信息,请稍后重试。',
|
||
subtitle: '请检查网络后重试,或返回上一页。',
|
||
},
|
||
sections: {
|
||
plan: '服药计划',
|
||
dosage: '剂量与形式',
|
||
note: '备注',
|
||
overview: '服药概览',
|
||
aiAnalysis: 'AI 用药分析',
|
||
},
|
||
plan: {
|
||
period: '服药周期',
|
||
time: '用药时间',
|
||
frequency: '频率',
|
||
expiryDate: '药品有效期',
|
||
longTerm: '长期',
|
||
periodMessage: '开始服药日期:{{startDate}}\n{{endDateInfo}}',
|
||
longTermPlan: '服药计划:长期服药',
|
||
timeMessage: '设置的时间:{{times}}',
|
||
},
|
||
dosage: {
|
||
label: '每次剂量',
|
||
form: '剂型',
|
||
selectDosage: '选择剂量',
|
||
selectForm: '选择剂型',
|
||
dosageValue: '剂量值',
|
||
unit: '单位',
|
||
},
|
||
note: {
|
||
label: '药品备注',
|
||
placeholder: '记录注意事项、医生叮嘱或自定义提醒',
|
||
edit: '编辑备注',
|
||
noNote: '暂无备注信息',
|
||
voiceNotSupported: '当前设备暂不支持语音转文字,可直接输入备注',
|
||
save: '保存',
|
||
saveError: {
|
||
title: '保存失败',
|
||
message: '提交备注时出现问题,请稍后重试。',
|
||
},
|
||
},
|
||
overview: {
|
||
calculating: '统计中...',
|
||
takenCount: '累计服药 {{count}} 次',
|
||
calculatingDays: '正在计算坚持天数',
|
||
startedDays: '已坚持 {{days}} 天',
|
||
startDate: '开始于 {{date}}',
|
||
noStartDate: '暂无开始日期',
|
||
},
|
||
aiAnalysis: {
|
||
analyzing: '正在分析用药信息...',
|
||
analyzingButton: '分析中...',
|
||
button: 'AI 分析',
|
||
error: {
|
||
title: '分析失败',
|
||
message: 'AI 分析失败,请稍后重试',
|
||
networkError: '发起分析请求失败,请检查网络连接',
|
||
unauthorized: '请先登录',
|
||
forbidden: '无权访问此药物',
|
||
notFound: '药物不存在',
|
||
},
|
||
},
|
||
status: {
|
||
enabled: '提醒已开启',
|
||
disabled: '提醒已关闭',
|
||
},
|
||
delete: {
|
||
title: '删除 {{name}}?',
|
||
description: '删除后将清除与该药品相关的提醒与历史记录,且无法恢复。',
|
||
confirm: '删除',
|
||
cancel: '取消',
|
||
error: {
|
||
title: '删除失败',
|
||
message: '移除该药品时出现问题,请稍后再试。',
|
||
},
|
||
},
|
||
deactivate: {
|
||
title: '停用 {{name}}?',
|
||
description: '停用后,当天已生成的用药计划会一并删除,且无法恢复。',
|
||
confirm: '确认停用',
|
||
cancel: '取消',
|
||
error: {
|
||
title: '操作失败',
|
||
message: '停用药物时发生问题,请稍后重试。',
|
||
},
|
||
},
|
||
toggleError: {
|
||
title: '操作失败',
|
||
message: '切换提醒状态时出现问题,请稍后重试。',
|
||
},
|
||
updateErrors: {
|
||
dosage: '更新失败',
|
||
dosageMessage: '更新剂量时出现问题,请稍后重试。',
|
||
form: '更新失败',
|
||
formMessage: '更新剂型时出现问题,请稍后重试。',
|
||
},
|
||
imageViewer: {
|
||
close: '关闭',
|
||
},
|
||
pickers: {
|
||
cancel: '取消',
|
||
confirm: '确定',
|
||
},
|
||
},
|
||
// 编辑频率页面翻译
|
||
editFrequency: {
|
||
title: '编辑服药频率',
|
||
missingParams: '缺少必要参数',
|
||
medicationName: '正在编辑:{{name}}',
|
||
sections: {
|
||
frequency: '服药频率',
|
||
frequencyDescription: '设置每日服药次数',
|
||
time: '每日提醒时间',
|
||
timeDescription: '添加并管理每天的提醒时间',
|
||
},
|
||
frequency: {
|
||
repeatPattern: '重复模式',
|
||
timesPerDay: '每日次数',
|
||
daily: '每日',
|
||
weekly: '每周',
|
||
custom: '自定义',
|
||
timesLabel: '{{count}} 次',
|
||
summary: '{{pattern}} {{count}} 次',
|
||
},
|
||
time: {
|
||
addTime: '添加时间',
|
||
editTime: '修改提醒时间',
|
||
addTimeButton: '添加时间',
|
||
},
|
||
actions: {
|
||
save: '保存修改',
|
||
},
|
||
error: {
|
||
title: '更新失败',
|
||
message: '更新服药频率时出现问题,请稍后重试。',
|
||
},
|
||
pickers: {
|
||
cancel: '取消',
|
||
confirm: '确定',
|
||
},
|
||
},
|
||
aiCamera: {
|
||
title: 'AI 用药识别',
|
||
steps: {
|
||
front: {
|
||
title: '正面',
|
||
subtitle: '保证药品名称清晰可见',
|
||
},
|
||
side: {
|
||
title: '背面',
|
||
subtitle: '包含规格、成分等信息',
|
||
},
|
||
aux: {
|
||
title: '侧面',
|
||
subtitle: '补充更多细节提升准确率',
|
||
},
|
||
stepProgress: '步骤 {{current}} / {{total}}',
|
||
optional: '(可选)',
|
||
notTaken: '未拍摄',
|
||
},
|
||
buttons: {
|
||
flip: '翻转',
|
||
capture: '拍照',
|
||
complete: '完成',
|
||
album: '从相册',
|
||
},
|
||
permission: {
|
||
title: '需要相机权限',
|
||
description: '授权后即可快速拍摄药品包装,自动识别信息',
|
||
button: '授权访问相机',
|
||
},
|
||
alerts: {
|
||
pickFailed: {
|
||
title: '选择失败',
|
||
message: '请重试或更换图片',
|
||
},
|
||
captureFailed: {
|
||
title: '拍摄失败',
|
||
message: '请重试',
|
||
},
|
||
insufficientPhotos: {
|
||
title: '照片不足',
|
||
message: '请至少完成正面和背面拍摄',
|
||
},
|
||
taskFailed: {
|
||
title: '创建任务失败',
|
||
defaultMessage: '请检查网络后重试',
|
||
},
|
||
},
|
||
guideModal: {
|
||
badge: '规范',
|
||
title: '拍摄图片清晰',
|
||
description1: '请拍摄药品正面\\背面的产品名称\\说明部分。',
|
||
description2: '注意拍摄时光线充分,没有反光,文字部分清晰可见。照片的清晰度会影响识别的准确率。',
|
||
button: '知道了!',
|
||
},
|
||
},
|
||
};
|
||
|
||
const challengeDetailResources = {
|
||
title: '挑战详情',
|
||
notFound: '未找到该挑战,稍后再试试吧。',
|
||
loading: '加载挑战详情中…',
|
||
retry: '重新加载',
|
||
share: {
|
||
generating: '正在生成分享卡片...',
|
||
failed: '分享失败,请稍后重试',
|
||
messageJoined: '我正在参与「{{title}}」挑战,已完成 {{completed}}/{{target}} 天!一起加入吧!',
|
||
messageNotJoined: '发现一个很棒的挑战「{{title}}」,一起来参与吧!',
|
||
},
|
||
dateRange: {
|
||
format: '{{start}} - {{end}}',
|
||
monthDay: '{{month}}月{{day}}日',
|
||
ongoing: '持续更新中',
|
||
},
|
||
participants: {
|
||
count: '{{count}} 人正在参与',
|
||
ongoing: '持续更新中',
|
||
more: '更多',
|
||
},
|
||
detail: {
|
||
requirement: '按日打卡自动累计',
|
||
viewAllRanking: '查看全部',
|
||
},
|
||
checkIn: {
|
||
title: '挑战打卡',
|
||
todayChecked: '今日已打卡',
|
||
subtitle: '每日打卡会累计进度,达成目标天数',
|
||
subtitleChecked: '已记录今日进度,明天继续保持',
|
||
button: {
|
||
checkIn: '立即打卡',
|
||
checking: '打卡中…',
|
||
checked: '今日已打卡',
|
||
notJoined: '加入后打卡',
|
||
upcoming: '挑战未开始',
|
||
expired: '挑战已结束',
|
||
},
|
||
toast: {
|
||
alreadyChecked: '今日已打卡',
|
||
notStarted: '挑战未开始,开始后再来打卡',
|
||
expired: '挑战已结束,无法打卡',
|
||
mustJoin: '加入挑战后才能打卡',
|
||
success: '打卡成功,继续坚持!',
|
||
failed: '打卡失败,请稍后再试',
|
||
},
|
||
},
|
||
cta: {
|
||
join: '立即加入挑战',
|
||
joining: '加入中…',
|
||
leave: '退出挑战',
|
||
leaving: '退出中…',
|
||
delete: '删除挑战',
|
||
deleting: '删除中…',
|
||
upcoming: '挑战即将开始',
|
||
expired: '挑战已结束',
|
||
},
|
||
highlight: {
|
||
join: {
|
||
title: '立即加入挑战',
|
||
subtitle: '邀请好友一起坚持,更容易收获成果',
|
||
},
|
||
leave: {
|
||
title: '先别急着离开',
|
||
subtitle: '再坚持一下,下一个里程碑就要出现了',
|
||
},
|
||
upcoming: {
|
||
title: '挑战即将开始',
|
||
subtitle: '{{date}} 开始,敬请期待',
|
||
subtitleFallback: '挑战即将开启,敬请期待',
|
||
},
|
||
expired: {
|
||
title: '挑战已结束',
|
||
subtitle: '{{date}} 已截止,期待下一次挑战',
|
||
subtitleFallback: '本轮挑战已结束,期待下一次挑战',
|
||
},
|
||
},
|
||
alert: {
|
||
leaveConfirm: {
|
||
title: '确认退出挑战?',
|
||
message: '退出后需要重新加入才能继续坚持。',
|
||
cancel: '取消',
|
||
confirm: '退出挑战',
|
||
},
|
||
joinFailed: '加入挑战失败',
|
||
leaveFailed: '退出挑战失败',
|
||
archiveConfirm: {
|
||
title: '确认删除该挑战?',
|
||
message: '删除后将无法恢复,参与者也将无法再访问此挑战。',
|
||
cancel: '取消',
|
||
confirm: '删除挑战',
|
||
},
|
||
archiveFailed: '删除挑战失败',
|
||
archiveSuccess: '挑战已删除',
|
||
},
|
||
ranking: {
|
||
title: '排行榜',
|
||
description: '',
|
||
empty: '榜单即将开启,快来抢占席位。',
|
||
today: '今日',
|
||
todayGoal: '今日目标',
|
||
hour: '小时',
|
||
},
|
||
leaderboard: {
|
||
title: '排行榜',
|
||
loading: '加载榜单中…',
|
||
notFound: '未找到该挑战。',
|
||
loadFailed: '暂时无法加载榜单,请稍后再试。',
|
||
empty: '榜单即将开启,快来抢占席位。',
|
||
loadMore: '加载更多…',
|
||
loadMoreFailed: '加载更多失败,请下拉刷新重试',
|
||
},
|
||
shareCard: {
|
||
footer: 'Out Live · 超越生命',
|
||
progress: {
|
||
label: '我的坚持进度',
|
||
days: '{{completed}} / {{target}} 天',
|
||
completed: '🎉 已完成挑战!',
|
||
remaining: '还差 {{remaining}} 天完成挑战',
|
||
},
|
||
info: {
|
||
checkInDaily: '按日打卡',
|
||
joinUs: '快来一起坚持吧',
|
||
},
|
||
shareCode: {
|
||
copied: '分享码已复制',
|
||
},
|
||
},
|
||
};
|
||
|
||
const challengeDetailResourcesEn = {
|
||
title: 'Challenge Details',
|
||
notFound: 'Challenge not found, please try again later.',
|
||
loading: 'Loading challenge details…',
|
||
retry: 'Reload',
|
||
share: {
|
||
generating: 'Generating share card...',
|
||
failed: 'Share failed, please try again later',
|
||
messageJoined: 'I\'m participating in "{{title}}" challenge, completed {{completed}}/{{target}} days! Join me!',
|
||
messageNotJoined: 'Found an amazing challenge "{{title}}", let\'s join together!',
|
||
},
|
||
dateRange: {
|
||
format: '{{start}} - {{end}}',
|
||
monthDay: 'Month {{month}} Day {{day}}',
|
||
ongoing: 'Ongoing updates',
|
||
},
|
||
participants: {
|
||
count: '{{count}} participants',
|
||
ongoing: 'Ongoing updates',
|
||
more: 'More',
|
||
},
|
||
detail: {
|
||
requirement: 'Daily check-in auto accumulates',
|
||
viewAllRanking: 'View All',
|
||
},
|
||
checkIn: {
|
||
title: 'Challenge Check-in',
|
||
todayChecked: 'Checked in today',
|
||
subtitle: 'Daily check-ins accumulate progress towards goal',
|
||
subtitleChecked: 'Today\'s progress recorded, keep it up tomorrow',
|
||
button: {
|
||
checkIn: 'Check In Now',
|
||
checking: 'Checking in…',
|
||
checked: 'Checked in today',
|
||
notJoined: 'Join to check in',
|
||
upcoming: 'Not started yet',
|
||
expired: 'Challenge ended',
|
||
},
|
||
toast: {
|
||
alreadyChecked: 'Already checked in today',
|
||
notStarted: 'Challenge not started yet, check in after it begins',
|
||
expired: 'Challenge has ended, cannot check in',
|
||
mustJoin: 'Join the challenge to check in',
|
||
success: 'Check-in successful, keep going!',
|
||
failed: 'Check-in failed, please try again',
|
||
},
|
||
},
|
||
cta: {
|
||
join: 'Join Challenge',
|
||
joining: 'Joining…',
|
||
leave: 'Leave Challenge',
|
||
leaving: 'Leaving…',
|
||
delete: 'Delete Challenge',
|
||
deleting: 'Deleting…',
|
||
upcoming: 'Starting Soon',
|
||
expired: 'Challenge Ended',
|
||
},
|
||
highlight: {
|
||
join: {
|
||
title: 'Join Challenge Now',
|
||
subtitle: 'Invite friends to persist together, achieve more easily',
|
||
},
|
||
leave: {
|
||
title: 'Don\'t leave just yet',
|
||
subtitle: 'Keep going, the next milestone is around the corner',
|
||
},
|
||
upcoming: {
|
||
title: 'Challenge Starting Soon',
|
||
subtitle: 'Starts on {{date}}, stay tuned',
|
||
subtitleFallback: 'Challenge coming soon, stay tuned',
|
||
},
|
||
expired: {
|
||
title: 'Challenge Ended',
|
||
subtitle: 'Ended on {{date}}, look forward to the next one',
|
||
subtitleFallback: 'This round has ended, look forward to the next challenge',
|
||
},
|
||
},
|
||
alert: {
|
||
leaveConfirm: {
|
||
title: 'Confirm leaving challenge?',
|
||
message: 'You will need to rejoin to continue.',
|
||
cancel: 'Cancel',
|
||
confirm: 'Leave Challenge',
|
||
},
|
||
joinFailed: 'Failed to join challenge',
|
||
leaveFailed: 'Failed to leave challenge',
|
||
archiveConfirm: {
|
||
title: 'Delete this challenge?',
|
||
message: 'This cannot be undone and participants will lose access.',
|
||
cancel: 'Cancel',
|
||
confirm: 'Delete Challenge',
|
||
},
|
||
archiveFailed: 'Failed to delete challenge',
|
||
archiveSuccess: 'Challenge deleted',
|
||
},
|
||
ranking: {
|
||
title: 'Leaderboard',
|
||
description: '',
|
||
empty: 'Leaderboard opening soon, grab your spot.',
|
||
today: 'Today',
|
||
todayGoal: 'Today\'s Goal',
|
||
hour: 'hrs',
|
||
},
|
||
leaderboard: {
|
||
title: 'Leaderboard',
|
||
loading: 'Loading leaderboard…',
|
||
notFound: 'Challenge not found.',
|
||
loadFailed: 'Unable to load leaderboard, please try again later.',
|
||
empty: 'Leaderboard opening soon, grab your spot.',
|
||
loadMore: 'Loading more…',
|
||
loadMoreFailed: 'Failed to load more, pull to refresh and retry',
|
||
},
|
||
shareCard: {
|
||
footer: 'Out Live · Beyond Life',
|
||
progress: {
|
||
label: 'My Progress',
|
||
days: '{{completed}} / {{target}} days',
|
||
completed: '🎉 Challenge Completed!',
|
||
remaining: '{{remaining}} days to complete',
|
||
},
|
||
info: {
|
||
checkInDaily: 'Daily check-in',
|
||
joinUs: 'Join us!',
|
||
},
|
||
shareCode: {
|
||
copied: 'Share code copied',
|
||
},
|
||
},
|
||
};
|
||
|
||
const notificationSettingsResources = {
|
||
title: '通知设置',
|
||
loading: '加载中...',
|
||
sections: {
|
||
notifications: '通知设置',
|
||
medicationReminder: '药品提醒',
|
||
nutritionReminder: '营养提醒',
|
||
moodReminder: '心情提醒',
|
||
description: '说明',
|
||
},
|
||
items: {
|
||
pushNotifications: {
|
||
title: '消息推送',
|
||
description: '开启后将接收应用通知',
|
||
},
|
||
medicationReminder: {
|
||
title: '药品通知提醒',
|
||
description: '在用药时间接收提醒通知',
|
||
},
|
||
nutritionReminder: {
|
||
title: '营养记录提醒',
|
||
description: '在用餐时间接收营养记录提醒',
|
||
},
|
||
moodReminder: {
|
||
title: '心情记录提醒',
|
||
description: '在晚间接收心情记录提醒',
|
||
},
|
||
},
|
||
description: {
|
||
text: '• 消息推送是所有通知的总开关\n• 各类提醒需要在消息推送开启后才能使用\n• 您可以在系统设置中管理通知权限\n• 关闭消息推送将停止所有应用通知',
|
||
},
|
||
alerts: {
|
||
permissionDenied: {
|
||
title: '权限被拒绝',
|
||
message: '请在系统设置中开启通知权限,然后再尝试开启推送功能',
|
||
cancel: '取消',
|
||
goToSettings: '去设置',
|
||
},
|
||
error: {
|
||
title: '错误',
|
||
message: '请求通知权限失败',
|
||
saveFailed: '保存设置失败',
|
||
medicationReminderFailed: '设置药品提醒失败',
|
||
nutritionReminderFailed: '设置营养提醒失败',
|
||
moodReminderFailed: '设置心情提醒失败',
|
||
},
|
||
notificationsEnabled: {
|
||
title: '通知已开启',
|
||
body: '您将收到应用通知和提醒',
|
||
},
|
||
medicationReminderEnabled: {
|
||
title: '药品提醒已开启',
|
||
body: '您将在用药时间收到提醒通知',
|
||
},
|
||
nutritionReminderEnabled: {
|
||
title: '营养提醒已开启',
|
||
body: '您将在用餐时间收到营养记录提醒',
|
||
},
|
||
moodReminderEnabled: {
|
||
title: '心情提醒已开启',
|
||
body: '您将在晚间收到心情记录提醒',
|
||
},
|
||
},
|
||
};
|
||
|
||
const sleepDetailResources = {
|
||
title: '睡眠详情',
|
||
loading: '加载睡眠数据中...',
|
||
today: '今天',
|
||
sleepScore: '睡眠评分',
|
||
noData: '暂无睡眠数据',
|
||
noDataRecommendation: '请确保在真实iOS设备上运行并授权访问健康数据,或等待有睡眠数据后再查看。',
|
||
sleepDuration: '睡眠时长',
|
||
sleepQuality: '睡眠质量',
|
||
sleepStages: '睡眠阶段',
|
||
learnMore: '了解更多',
|
||
awake: '清醒',
|
||
rem: '快速眼动',
|
||
core: '核心睡眠',
|
||
deep: '深度睡眠',
|
||
unknown: '未知',
|
||
rawData: '原始数据',
|
||
rawDataDescription: '包含 {{count}} 条 HealthKit 睡眠样本记录',
|
||
infoModalTitles: {
|
||
sleepTime: '睡眠时间',
|
||
sleepQuality: '睡眠质量',
|
||
},
|
||
sleepGrades: {
|
||
low: '低',
|
||
normal: '正常',
|
||
good: '良好',
|
||
excellent: '优秀',
|
||
poor: '较差',
|
||
fair: '一般',
|
||
},
|
||
sleepTimeDescription: '睡眠最重要 - 它占据了你睡眠得分的一半以上。长时间的睡眠可以减少睡眠债务,但是规律的睡眠时间对于高质量的休息至关重要。',
|
||
sleepQualityDescription: '睡眠质量综合评估您的睡眠效率、深度睡眠时长、REM睡眠比例等多个指标。高质量的睡眠不仅仅取决于时长,还包括睡眠的连续性和各睡眠阶段的平衡。',
|
||
sleepStagesInfo: {
|
||
title: '了解你的睡眠阶段',
|
||
description: '人们对睡眠阶段和睡眠质量有许多误解。有些人可能需要更多深度睡眠,其他人则不然。科学家和医生仍在探索不同睡眠阶段的作用及其对身体的影响。通过跟踪睡眠阶段并留意每天清晨的感受,你或许能深入了解自己的睡眠。',
|
||
awake: {
|
||
title: '清醒时间',
|
||
description: '一次睡眠期间,你可能会醒来几次。偶尔醒来很正常。可能你会立刻再次入睡,并不记得曾在夜间醒来。',
|
||
},
|
||
rem: {
|
||
title: '快速动眼睡眠',
|
||
description: '这一睡眠阶段可能对学习和记忆产生一定影响。在此阶段,你的肌肉最为放松,眼球也会快速左右移动。这也是你大多数梦境出现的阶段。',
|
||
},
|
||
core: {
|
||
title: '核心睡眠',
|
||
description: '这一阶段有时也称为浅睡期,与其他阶段一样重要。此阶段通常占据你每晚大部分的睡眠时间。对于认知至关重要的脑电波会在这一阶段产生。',
|
||
},
|
||
deep: {
|
||
title: '深度睡眠',
|
||
description: '因为脑电波的特征,这一阶段也称为慢波睡眠。在此阶段,身体组织得到修复,并释放重要荷尔蒙。它通常出现在睡眠的前半段,且持续时间较长。深度睡眠期间,身体非常放松,因此相较于其他阶段,你可能更难在此阶段醒来。',
|
||
},
|
||
},
|
||
};
|
||
|
||
const sleepDetailResourcesEn = {
|
||
title: 'Sleep Details',
|
||
loading: 'Loading sleep data...',
|
||
today: 'Today',
|
||
sleepScore: 'Sleep Score',
|
||
noData: 'No sleep data available',
|
||
noDataRecommendation: 'Please ensure you are running on a real iOS device with authorized health data access, or wait until you have sleep data to view.',
|
||
sleepDuration: 'Sleep Duration',
|
||
sleepQuality: 'Sleep Quality',
|
||
sleepStages: 'Sleep Stages',
|
||
learnMore: 'Learn More',
|
||
awake: 'Awake',
|
||
rem: 'REM',
|
||
core: 'Core Sleep',
|
||
deep: 'Deep Sleep',
|
||
unknown: 'Unknown',
|
||
rawData: 'Raw Data',
|
||
rawDataDescription: 'Contains {{count}} HealthKit sleep sample records',
|
||
infoModalTitles: {
|
||
sleepTime: 'Sleep Time',
|
||
sleepQuality: 'Sleep Quality',
|
||
},
|
||
sleepGrades: {
|
||
low: 'Low',
|
||
normal: 'Normal',
|
||
good: 'Good',
|
||
excellent: 'Excellent',
|
||
poor: 'Poor',
|
||
fair: 'Fair',
|
||
},
|
||
sleepTimeDescription: 'Sleep is most important - it accounts for more than half of your sleep score. Longer sleep can reduce sleep debt, but regular sleep times are crucial for quality rest.',
|
||
sleepQualityDescription: 'Sleep quality comprehensively evaluates multiple indicators such as your sleep efficiency, deep sleep duration, REM sleep ratio, etc. High-quality sleep depends not only on duration but also on sleep continuity and balance of sleep stages.',
|
||
sleepStagesInfo: {
|
||
title: 'Understand Your Sleep Stages',
|
||
description: 'People have many misconceptions about sleep stages and sleep quality. Some people may need more deep sleep, while others may not. Scientists and doctors are still exploring the role of different sleep stages and their effects on the body. By tracking sleep stages and paying attention to how you feel each morning, you may gain deeper insights into your own sleep.',
|
||
awake: {
|
||
title: 'Awake Time',
|
||
description: 'During a sleep period, you may wake up several times. Occasional waking is normal. You may fall back asleep immediately and not remember waking up during the night.',
|
||
},
|
||
rem: {
|
||
title: 'REM Sleep',
|
||
description: 'This sleep stage may have some impact on learning and memory. During this stage, your muscles are most relaxed and your eyes move rapidly left and right. This is also the stage where most of your dreams occur.',
|
||
},
|
||
core: {
|
||
title: 'Core Sleep',
|
||
description: 'This stage is sometimes called light sleep and is as important as other stages. This stage usually occupies most of your sleep time each night. Brain waves that are crucial for cognition are generated during this stage.',
|
||
},
|
||
deep: {
|
||
title: 'Deep Sleep',
|
||
description: 'Due to the characteristics of brain waves, this stage is also called slow-wave sleep. During this stage, body tissues are repaired and important hormones are released. It usually occurs in the first half of sleep and lasts longer. During deep sleep, the body is very relaxed, so you may find it harder to wake up during this stage compared to other stages.',
|
||
},
|
||
},
|
||
};
|
||
|
||
const stepsDetailResources = {
|
||
title: '步数详情',
|
||
loading: '加载中...',
|
||
stats: {
|
||
totalSteps: '总步数',
|
||
averagePerHour: '平均每小时',
|
||
mostActiveTime: '最活跃时段',
|
||
},
|
||
chart: {
|
||
title: '每小时步数分布',
|
||
averageLabel: '平均 {{steps}}步',
|
||
},
|
||
activityLevel: {
|
||
currentActivity: '你今天的活动量处于',
|
||
levels: {
|
||
inactive: '不怎么动',
|
||
light: '轻度活跃',
|
||
moderate: '中等活跃',
|
||
very_active: '非常活跃',
|
||
},
|
||
progress: {
|
||
current: '当前',
|
||
nextLevel: '下一级: {{level}}',
|
||
highestLevel: '已达最高级',
|
||
},
|
||
},
|
||
timeLabels: {
|
||
midnight: '0:00',
|
||
noon: '12:00',
|
||
nextDay: '24:00',
|
||
},
|
||
};
|
||
|
||
const stepsDetailResourcesEn = {
|
||
title: 'Steps Details',
|
||
loading: 'Loading...',
|
||
stats: {
|
||
totalSteps: 'Total Steps',
|
||
averagePerHour: 'Average Per Hour',
|
||
mostActiveTime: 'Most Active Time',
|
||
},
|
||
chart: {
|
||
title: 'Hourly Steps Distribution',
|
||
averageLabel: 'Average {{steps}} steps',
|
||
},
|
||
activityLevel: {
|
||
currentActivity: 'Your activity level today is',
|
||
levels: {
|
||
inactive: 'Inactive',
|
||
light: 'Lightly Active',
|
||
moderate: 'Moderately Active',
|
||
very_active: 'Very Active',
|
||
},
|
||
progress: {
|
||
current: 'Current',
|
||
nextLevel: 'Next: {{level}}',
|
||
highestLevel: 'Highest Level',
|
||
},
|
||
},
|
||
timeLabels: {
|
||
midnight: '0:00',
|
||
noon: '12:00',
|
||
nextDay: '24:00',
|
||
},
|
||
};
|
||
|
||
const fitnessRingsDetailResources = {
|
||
title: '健身圆环详情',
|
||
loading: '加载中...',
|
||
weekDays: {
|
||
monday: '周一',
|
||
tuesday: '周二',
|
||
wednesday: '周三',
|
||
thursday: '周四',
|
||
friday: '周五',
|
||
saturday: '周六',
|
||
sunday: '周日',
|
||
},
|
||
cards: {
|
||
activeCalories: {
|
||
title: '活动热量',
|
||
unit: '千卡',
|
||
},
|
||
exerciseMinutes: {
|
||
title: '锻炼分钟数',
|
||
unit: '分钟',
|
||
info: {
|
||
title: '锻炼分钟数:',
|
||
description: '进行强度不低于"快走"的运动锻炼,就会积累对应时长的锻炼分钟数。',
|
||
recommendation: '世卫组织推荐的成年人每天至少保持30分钟以上的中高强度运动。',
|
||
knowButton: '知道了',
|
||
},
|
||
},
|
||
standHours: {
|
||
title: '活动小时数',
|
||
unit: '小时',
|
||
},
|
||
},
|
||
stats: {
|
||
weeklyClosedRings: '周闭环天数',
|
||
daysUnit: '天',
|
||
},
|
||
datePicker: {
|
||
cancel: '取消',
|
||
confirm: '确定',
|
||
},
|
||
errors: {
|
||
loadExerciseInfoPreference: '加载锻炼分钟说明偏好失败',
|
||
saveExerciseInfoPreference: '保存锻炼分钟说明偏好失败',
|
||
},
|
||
};
|
||
|
||
const fitnessRingsDetailResourcesEn = {
|
||
title: 'Fitness Rings Detail',
|
||
loading: 'Loading...',
|
||
weekDays: {
|
||
monday: 'Mon',
|
||
tuesday: 'Tue',
|
||
wednesday: 'Wed',
|
||
thursday: 'Thu',
|
||
friday: 'Fri',
|
||
saturday: 'Sat',
|
||
sunday: 'Sun',
|
||
},
|
||
cards: {
|
||
activeCalories: {
|
||
title: 'Active Calories',
|
||
unit: 'kcal',
|
||
},
|
||
exerciseMinutes: {
|
||
title: 'Exercise Minutes',
|
||
unit: 'minutes',
|
||
info: {
|
||
title: 'Exercise Minutes:',
|
||
description: 'Exercise at an intensity of at least "brisk walking" will accumulate corresponding exercise minutes.',
|
||
recommendation: 'WHO recommends adults to maintain at least 30 minutes of moderate to high-intensity exercise daily.',
|
||
knowButton: 'Got it',
|
||
},
|
||
},
|
||
standHours: {
|
||
title: 'Stand Hours',
|
||
unit: 'hours',
|
||
},
|
||
},
|
||
stats: {
|
||
weeklyClosedRings: 'Weekly Closed Rings',
|
||
daysUnit: 'days',
|
||
},
|
||
datePicker: {
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
errors: {
|
||
loadExerciseInfoPreference: 'Failed to load exercise minutes info preference',
|
||
saveExerciseInfoPreference: 'Failed to save exercise minutes info preference',
|
||
},
|
||
};
|
||
|
||
const waterDetailResources = {
|
||
title: '饮水详情',
|
||
waterRecord: '饮水记录',
|
||
today: '今日',
|
||
total: '总计:',
|
||
goal: '目标:',
|
||
noRecords: '暂无饮水记录',
|
||
noRecordsSubtitle: '点击"添加记录"开始记录饮水量',
|
||
deleteConfirm: {
|
||
title: '确认删除',
|
||
message: '确定要删除这条饮水记录吗?此操作无法撤销。',
|
||
cancel: '取消',
|
||
confirm: '删除',
|
||
},
|
||
deleteButton: '删除',
|
||
water: '水',
|
||
loadingUserPreferences: '加载用户偏好设置失败',
|
||
};
|
||
|
||
const basalMetabolismDetailResources = {
|
||
title: '基础代谢',
|
||
currentData: {
|
||
title: '{{date}} 基础代谢',
|
||
unit: '千卡',
|
||
normalRange: '正常范围: {{min}}-{{max}} 千卡',
|
||
noData: '--',
|
||
},
|
||
stats: {
|
||
title: '基础代谢统计',
|
||
tabs: {
|
||
week: '按周',
|
||
month: '按月',
|
||
},
|
||
},
|
||
chart: {
|
||
loading: '加载中...',
|
||
loadingText: '加载中...',
|
||
error: {
|
||
text: '加载失败: {{error}}',
|
||
retry: '重试',
|
||
fetchFailed: '获取数据失败',
|
||
},
|
||
empty: '暂无数据',
|
||
yAxisSuffix: '千卡',
|
||
weekLabel: '第{{week}}周',
|
||
},
|
||
modal: {
|
||
title: '基础代谢',
|
||
closeButton: '×',
|
||
description: '基础代谢,也称基础代谢率(BMR),是指人体在完全静息状态下维持基本生命功能(心跳、呼吸、体温调节等)所需的最低能量消耗,通常以卡路里为单位。',
|
||
sections: {
|
||
importance: {
|
||
title: '为什么重要?',
|
||
content: '基础代谢占总能量消耗的60-75%,是能量平衡的基础。了解您的基础代谢有助于制定科学的营养计划、优化体重管理策略,以及评估代谢健康状态。',
|
||
},
|
||
normalRange: {
|
||
title: '正常范围',
|
||
formulas: {
|
||
male: '男性:BMR = 10 × 体重(kg) + 6.25 × 身高(cm) - 5 × 年龄 + 5',
|
||
female: '女性:BMR = 10 × 体重(kg) + 6.25 × 身高(cm) - 5 × 年龄 - 161',
|
||
},
|
||
userRange: '您的正常区间:{{min}}-{{max}}千卡/天',
|
||
rangeNote: '(在公式基础计算值上下浮动15%都属于正常范围)',
|
||
userInfo: '基于您的信息:{{gender}},{{age}}岁,{{height}}cm,{{weight}}kg',
|
||
incompleteInfo: '请完善基本信息以计算您的代谢率',
|
||
},
|
||
strategies: {
|
||
title: '提高代谢率的策略',
|
||
subtitle: '科学研究支持以下方法:',
|
||
items: [
|
||
'1.增加肌肉量 (每周2-3次力量训练)',
|
||
'2.高强度间歇训练 (HIIT)',
|
||
'3.充分蛋白质摄入 (体重每公斤1.6-2.2g)',
|
||
'4.保证充足睡眠 (7-9小时/晚)',
|
||
'5.避免过度热量限制 (不低于BMR的80%)',
|
||
],
|
||
},
|
||
},
|
||
},
|
||
gender: {
|
||
male: '男性',
|
||
female: '女性',
|
||
},
|
||
comments: {
|
||
reloadData: '重新加载数据',
|
||
},
|
||
dateSelector: {
|
||
backToToday: '回到今天',
|
||
cancel: '取消',
|
||
confirm: '确定',
|
||
},
|
||
};
|
||
|
||
const waterDetailResourcesEn = {
|
||
title: 'Water Details',
|
||
waterRecord: 'Water Records',
|
||
today: 'Today',
|
||
total: 'Total: ',
|
||
goal: 'Goal: ',
|
||
noRecords: 'No water records',
|
||
noRecordsSubtitle: 'Tap "Add Record" to start tracking water intake',
|
||
deleteConfirm: {
|
||
title: 'Confirm Delete',
|
||
message: 'Are you sure you want to delete this water record? This action cannot be undone.',
|
||
cancel: 'Cancel',
|
||
confirm: 'Delete',
|
||
},
|
||
deleteButton: 'Delete',
|
||
water: 'Water',
|
||
loadingUserPreferences: 'Failed to load user preferences',
|
||
};
|
||
|
||
const waterReminderSettingsResources = {
|
||
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: '取消',
|
||
},
|
||
};
|
||
|
||
const waterReminderSettingsResourcesEn = {
|
||
title: 'Water Reminder',
|
||
sections: {
|
||
notifications: 'Push Notifications',
|
||
timeRange: 'Reminder Time Range',
|
||
interval: 'Reminder Interval',
|
||
},
|
||
descriptions: {
|
||
notifications: 'Enable to receive periodic water reminders during specified time periods',
|
||
timeRange: 'Only send reminders during specified time periods to avoid disturbing your rest',
|
||
interval: 'Choose the reminder frequency, recommended 30-120 minutes',
|
||
},
|
||
labels: {
|
||
startTime: 'Start Time',
|
||
endTime: 'End Time',
|
||
interval: 'Reminder Interval',
|
||
saveSettings: 'Save Settings',
|
||
hours: 'Hours',
|
||
timeRangePreview: 'Time Range Preview',
|
||
minutes: 'Minutes',
|
||
},
|
||
alerts: {
|
||
timeValidation: {
|
||
title: 'Time Setting Tip',
|
||
startTimeInvalid: 'Start time cannot be later than or equal to end time, please select again',
|
||
endTimeInvalid: 'End time cannot be earlier than or equal to start time, please select again',
|
||
},
|
||
success: {
|
||
enabled: 'Settings Saved',
|
||
enabledMessage: 'Water reminder has been enabled\n\nTime range: {{timeRange}}\nReminder interval: {{interval}}\n\nWe will periodically remind you to drink water during the specified time period',
|
||
disabled: 'Settings Saved',
|
||
disabledMessage: 'Water reminder has been disabled',
|
||
},
|
||
error: {
|
||
title: 'Save Failed',
|
||
message: 'Unable to save water reminder settings, please try again',
|
||
},
|
||
},
|
||
buttons: {
|
||
confirm: 'Confirm',
|
||
cancel: 'Cancel',
|
||
},
|
||
};
|
||
|
||
const waterSettingsResources = {
|
||
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}}分钟',
|
||
},
|
||
};
|
||
|
||
const waterSettingsResourcesEn = {
|
||
title: 'Water Settings',
|
||
sections: {
|
||
dailyGoal: 'Daily Water Goal',
|
||
quickAdd: 'Quick Add Default',
|
||
reminder: 'Water Reminder',
|
||
},
|
||
descriptions: {
|
||
quickAdd: 'Set the default water amount when clicking the "+" button',
|
||
reminder: 'Set periodic reminders to replenish water',
|
||
},
|
||
labels: {
|
||
ml: 'ml',
|
||
disabled: 'Disabled',
|
||
},
|
||
alerts: {
|
||
goalSuccess: {
|
||
title: 'Settings Saved',
|
||
message: 'Daily water goal has been set to {{amount}}ml',
|
||
},
|
||
quickAddSuccess: {
|
||
title: 'Settings Saved',
|
||
message: 'Quick add default has been set to {{amount}}ml',
|
||
},
|
||
quickAddFailed: {
|
||
title: 'Save Failed',
|
||
message: 'Unable to save quick add default, please try again',
|
||
},
|
||
},
|
||
buttons: {
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
status: {
|
||
reminderEnabled: '{{startTime}}-{{endTime}}, every {{interval}} minutes',
|
||
},
|
||
};
|
||
|
||
const basalMetabolismDetailResourcesEn = {
|
||
title: 'Basal Metabolism',
|
||
currentData: {
|
||
title: '{{date}} Basal Metabolism',
|
||
unit: 'kcal',
|
||
normalRange: 'Normal range: {{min}}-{{max}} kcal',
|
||
noData: '--',
|
||
},
|
||
stats: {
|
||
title: 'Basal Metabolism Statistics',
|
||
tabs: {
|
||
week: 'By Week',
|
||
month: 'By Month',
|
||
},
|
||
},
|
||
chart: {
|
||
loading: 'Loading...',
|
||
loadingText: 'Loading...',
|
||
error: {
|
||
text: 'Loading failed: {{error}}',
|
||
retry: 'Retry',
|
||
fetchFailed: 'Failed to fetch data',
|
||
},
|
||
empty: 'No data available',
|
||
yAxisSuffix: 'kcal',
|
||
weekLabel: 'Week {{week}}',
|
||
},
|
||
modal: {
|
||
title: 'Basal Metabolism',
|
||
closeButton: '×',
|
||
description: 'Basal metabolism, also known as Basal Metabolic Rate (BMR), refers to the minimum energy consumption required for the human body to maintain basic life functions (heartbeat, breathing, body temperature regulation, etc.) in a completely resting state, usually measured in calories.',
|
||
sections: {
|
||
importance: {
|
||
title: 'Why is it important?',
|
||
content: 'Basal metabolism accounts for 60-75% of total energy consumption and is the foundation of energy balance. Understanding your basal metabolism helps develop scientific nutrition plans, optimize weight management strategies, and assess metabolic health status.',
|
||
},
|
||
normalRange: {
|
||
title: 'Normal Range',
|
||
formulas: {
|
||
male: 'Male: BMR = 10 × weight(kg) + 6.25 × height(cm) - 5 × age + 5',
|
||
female: 'Female: BMR = 10 × weight(kg) + 6.25 × height(cm) - 5 × age - 161',
|
||
},
|
||
userRange: 'Your normal range: {{min}}-{{max}} kcal/day',
|
||
rangeNote: '(Within 15% above or below the calculated value is considered normal)',
|
||
userInfo: 'Based on your information: {{gender}}, {{age}} years old, {{height}}cm, {{weight}}kg',
|
||
incompleteInfo: 'Please complete basic information to calculate your metabolic rate',
|
||
},
|
||
strategies: {
|
||
title: 'Strategies to Boost Metabolism',
|
||
subtitle: 'Scientific research supports the following methods:',
|
||
items: [
|
||
'1. Increase muscle mass (2-3 strength training sessions per week)',
|
||
'2. High-intensity interval training (HIIT)',
|
||
'3. Adequate protein intake (1.6-2.2g per kg of body weight)',
|
||
'4. Ensure adequate sleep (7-9 hours per night)',
|
||
'5. Avoid excessive calorie restriction (not less than 80% of BMR)',
|
||
],
|
||
},
|
||
},
|
||
},
|
||
gender: {
|
||
male: 'Male',
|
||
female: 'Female',
|
||
},
|
||
comments: {
|
||
reloadData: 'Reload data',
|
||
},
|
||
dateSelector: {
|
||
backToToday: 'Back to Today',
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
};
|
||
|
||
const workoutHistoryResources = {
|
||
title: '锻炼总结',
|
||
loading: '正在加载锻炼记录...',
|
||
error: {
|
||
permissionDenied: '尚未授予健康数据权限',
|
||
loadFailed: '加载锻炼记录失败,请稍后再试',
|
||
detailLoadFailed: '加载锻炼详情失败,请稍后再试',
|
||
},
|
||
retry: '重试',
|
||
monthlyStats: {
|
||
title: '锻炼时间',
|
||
periodText: '统计周期:1日 - {{day}}日(本月)',
|
||
overviewWithStats: '截至{{date}},你已完成{{count}}次锻炼,累计{{duration}}。',
|
||
overviewEmpty: '本月还没有锻炼记录,动起来收集第一条吧!',
|
||
emptyData: '本月还没有锻炼数据',
|
||
},
|
||
intensity: {
|
||
low: '低强度',
|
||
medium: '中强度',
|
||
high: '高强度',
|
||
},
|
||
historyCard: {
|
||
calories: '{{calories}}千卡 · {{minutes}}分钟',
|
||
activityTime: '{{activity}},{{time}}',
|
||
},
|
||
empty: {
|
||
title: '暂无锻炼记录',
|
||
subtitle: '完成一次锻炼后即可在此查看详细历史',
|
||
},
|
||
monthOccurrence: '这是你{{month}}的第 {{index}} 次{{activity}}。',
|
||
};
|
||
|
||
const workoutHistoryResourcesEn = {
|
||
title: 'Workout Summary',
|
||
loading: 'Loading workout records...',
|
||
error: {
|
||
permissionDenied: 'Health data permission not granted',
|
||
loadFailed: 'Failed to load workout records, please try again later',
|
||
detailLoadFailed: 'Failed to load workout details, please try again later',
|
||
},
|
||
retry: 'Retry',
|
||
monthlyStats: {
|
||
title: 'Workout Time',
|
||
periodText: 'Statistics period: 1st - {{day}} (This month)',
|
||
overviewWithStats: 'As of {{date}}, you have completed {{count}} workouts, totaling {{duration}}.',
|
||
overviewEmpty: 'No workout records this month yet, start moving to collect your first one!',
|
||
emptyData: 'No workout data this month',
|
||
},
|
||
intensity: {
|
||
low: 'Low Intensity',
|
||
medium: 'Medium Intensity',
|
||
high: 'High Intensity',
|
||
},
|
||
historyCard: {
|
||
calories: '{{calories}} kcal · {{minutes}} min',
|
||
activityTime: '{{activity}}, {{time}}',
|
||
},
|
||
empty: {
|
||
title: 'No Workout Records',
|
||
subtitle: 'Complete a workout to view detailed history here',
|
||
},
|
||
monthOccurrence: 'This is your {{index}} {{activity}} in {{month}}.',
|
||
};
|
||
const loginScreenResources = {
|
||
title: '登录',
|
||
subtitle: '健康生活,自律让我更自由',
|
||
appleLogin: '使用 Apple 登录',
|
||
loggingIn: '登录中...',
|
||
agreement: {
|
||
readAndAgree: '我已阅读并同意',
|
||
privacyPolicy: '《隐私政策》',
|
||
and: '和',
|
||
userAgreement: '《用户协议》',
|
||
alert: {
|
||
title: '请先阅读并同意',
|
||
message: '继续登录前,请阅读并勾选《隐私政策》和《用户协议》。点击“同意并继续”将默认勾选并继续登录。',
|
||
cancel: '取消',
|
||
confirm: '同意并继续',
|
||
},
|
||
},
|
||
errors: {
|
||
appleIdentityTokenMissing: '未获取到 Apple 身份令牌',
|
||
loginFailed: '登录失败,请稍后再试',
|
||
loginFailedTitle: '登录失败',
|
||
},
|
||
success: {
|
||
loginSuccess: '登录成功',
|
||
},
|
||
};
|
||
|
||
const loginScreenResourcesEn = {
|
||
title: 'Log In',
|
||
subtitle: 'Healthy living, freedom through self-discipline',
|
||
appleLogin: 'Sign in with Apple',
|
||
loggingIn: 'Logging in...',
|
||
agreement: {
|
||
readAndAgree: 'I have read and agree to ',
|
||
privacyPolicy: 'Privacy Policy',
|
||
and: ' and ',
|
||
userAgreement: 'User Agreement',
|
||
alert: {
|
||
title: 'Please read and agree',
|
||
message: 'Please read and check the "Privacy Policy" and "User Agreement" before continuing. Clicking "Agree and Continue" will automatically check the box and proceed.',
|
||
cancel: 'Cancel',
|
||
confirm: 'Agree and Continue',
|
||
},
|
||
},
|
||
errors: {
|
||
appleIdentityTokenMissing: 'Failed to get Apple identity token',
|
||
loginFailed: 'Login failed, please try again later',
|
||
loginFailedTitle: 'Login Failed',
|
||
},
|
||
success: {
|
||
loginSuccess: 'Login Successful',
|
||
},
|
||
};
|
||
|
||
const authGuardResources = {
|
||
logout: {
|
||
error: '退出登录失败',
|
||
errorMessage: '退出登录失败,请稍后重试',
|
||
},
|
||
confirmLogout: {
|
||
title: '确认退出',
|
||
message: '确定要退出当前账号吗?',
|
||
cancelButton: '取消',
|
||
confirmButton: '确定',
|
||
},
|
||
deleteAccount: {
|
||
successTitle: '账号已注销',
|
||
successMessage: '您的账号已成功注销',
|
||
confirmButton: '确定',
|
||
errorTitle: '注销失败',
|
||
errorMessage: '注销失败,请稍后重试',
|
||
},
|
||
confirmDeleteAccount: {
|
||
title: '确认注销账号',
|
||
message: '此操作不可恢复,将删除您的账号及相关数据。确定继续吗?',
|
||
cancelButton: '取消',
|
||
confirmButton: '确认注销',
|
||
},
|
||
};
|
||
|
||
const authGuardResourcesEn = {
|
||
logout: {
|
||
error: 'Logout Failed',
|
||
errorMessage: 'Failed to logout, please try again later',
|
||
},
|
||
confirmLogout: {
|
||
title: 'Confirm Logout',
|
||
message: 'Are you sure you want to logout of your current account?',
|
||
cancelButton: 'Cancel',
|
||
confirmButton: 'Confirm',
|
||
},
|
||
deleteAccount: {
|
||
successTitle: 'Account Deleted',
|
||
successMessage: 'Your account has been successfully deleted',
|
||
confirmButton: 'OK',
|
||
errorTitle: 'Deletion Failed',
|
||
errorMessage: 'Failed to delete account, please try again later',
|
||
},
|
||
confirmDeleteAccount: {
|
||
title: 'Confirm Account Deletion',
|
||
message: 'This action cannot be undone. Your account and all related data will be permanently deleted. Are you sure you want to continue?',
|
||
cancelButton: 'Cancel',
|
||
confirmButton: 'Confirm Deletion',
|
||
},
|
||
};
|
||
|
||
const resources = {
|
||
zh: {
|
||
translation: {
|
||
personal: personalScreenResources,
|
||
badges: badgesScreenResources,
|
||
editProfile: editProfileResources,
|
||
healthPermissions: healthPermissionsResources,
|
||
statistics: statisticsResources,
|
||
medications: medicationsResources,
|
||
notificationSettings: notificationSettingsResources,
|
||
challengeDetail: challengeDetailResources,
|
||
sleepDetail: sleepDetailResources,
|
||
stepsDetail: stepsDetailResources,
|
||
fitnessRingsDetail: fitnessRingsDetailResources,
|
||
waterDetail: waterDetailResources,
|
||
basalMetabolismDetail: basalMetabolismDetailResources,
|
||
waterReminderSettings: waterReminderSettingsResources,
|
||
waterSettings: waterSettingsResources,
|
||
workoutHistory: workoutHistoryResources,
|
||
login: loginScreenResources,
|
||
authGuard: authGuardResources,
|
||
weightRecords: {
|
||
title: '体重记录',
|
||
addButton: '记录体重',
|
||
stats: {
|
||
totalLoss: '累计减重',
|
||
currentWeight: '当前体重',
|
||
initialWeight: '初始体重',
|
||
targetWeight: '目标体重',
|
||
},
|
||
empty: {
|
||
title: '暂无体重记录',
|
||
subtitle: '点击右上角添加按钮开始记录',
|
||
},
|
||
modal: {
|
||
recordWeight: '记录体重',
|
||
editInitialWeight: '编辑初始体重',
|
||
editTargetWeight: '编辑目标体重',
|
||
editRecord: '编辑体重记录',
|
||
inputPlaceholder: '输入体重',
|
||
unit: 'kg',
|
||
inputHint: '请输入 0-500 之间的数值,支持小数',
|
||
quickSelection: '快速选择',
|
||
confirm: '确定',
|
||
},
|
||
alerts: {
|
||
invalidWeight: '请输入有效的体重值(0-500kg)',
|
||
deleteFailed: '删除体重记录失败,请重试',
|
||
saveFailed: '保存体重失败,请重试',
|
||
},
|
||
loadingHistory: '加载体重历史失败',
|
||
card: {
|
||
weightLabel: '体重',
|
||
deleteConfirmTitle: '确认删除',
|
||
deleteConfirmMessage: '确定要删除这条体重记录吗?此操作无法撤销。',
|
||
cancelButton: '取消',
|
||
deleteButton: '删除',
|
||
},
|
||
},
|
||
workoutDetail: {
|
||
loading: '正在加载锻炼详情...',
|
||
retry: '重新加载',
|
||
metrics: {
|
||
duration: '体能训练时间',
|
||
calories: '运动热量',
|
||
caloriesUnit: '千卡',
|
||
intensity: '运动强度',
|
||
averageHeartRate: '平均心率',
|
||
heartRateUnit: '次/分',
|
||
},
|
||
sections: {
|
||
heartRateRange: '心率范围',
|
||
heartRateZones: '心率训练区间',
|
||
averageHeartRate: '平均心率',
|
||
maximumHeartRate: '最高心率',
|
||
minimumHeartRate: '最低心率',
|
||
heartRateUnit: '次/分',
|
||
},
|
||
intensityInfo: {
|
||
title: '什么是运动强度?',
|
||
description1: '运动强度是你完成一项任务所用的能量估算,是衡量锻炼和其他日常活动能耗强度的指标,单位为 MET(千卡/(千克·小时))。',
|
||
description2: '因为每个人的代谢状况不同,MET 以身体的静息能耗作为参考,便于衡量不同活动的强度。',
|
||
description3: '例如:散步(约 3 km/h)相当于 2 METs,意味着它需要消耗静息状态 2 倍的能量。',
|
||
description4: '注:当设备未提供 METs 值时,系统会根据您的卡路里消耗和锻炼时长自动计算(使用70公斤估算体重)。',
|
||
formula: {
|
||
title: '运动强度计算公式',
|
||
value: 'METs = 活动能耗(千卡/小时) ÷ 静息能耗(1 千卡/小时)',
|
||
},
|
||
legend: {
|
||
low: '< 3',
|
||
lowLabel: '低强度活动',
|
||
medium: '3 - 6',
|
||
mediumLabel: '中强度活动',
|
||
high: '≥ 6',
|
||
highLabel: '高强度活动',
|
||
},
|
||
},
|
||
chart: {
|
||
unavailable: '图表组件不可用,无法展示心率曲线',
|
||
noData: '暂无心率采样数据',
|
||
},
|
||
errors: {
|
||
loadFailed: '未能获取到完整的锻炼详情',
|
||
noHeartRateData: '未获取到心率数据',
|
||
noZoneStats: '暂无区间统计',
|
||
},
|
||
},
|
||
challenges: {
|
||
title: '挑战',
|
||
subtitle: '参与精选活动,保持每日动力',
|
||
loading: '加载挑战中…',
|
||
loadFailed: '加载挑战失败,请稍后重试',
|
||
retry: '重新加载',
|
||
empty: '暂无挑战,稍后再来探索。',
|
||
customChallenges: '自定义挑战',
|
||
officialChallenges: '暂无官方挑战,稍后再来探索。',
|
||
officialChallengesTitle: '官方挑战',
|
||
join: '加入',
|
||
create: '创建',
|
||
joined: '已加入',
|
||
invalidInviteCode: '请输入有效的邀请码',
|
||
joinSuccess: '加入挑战成功',
|
||
joinFailed: '加入失败,请稍后再试',
|
||
joinModal: {
|
||
title: '加入自定义挑战',
|
||
description: '输入 6-12 位邀请码,加入好友的挑战',
|
||
placeholder: '如:A3K9P2',
|
||
confirm: '确认加入',
|
||
cancel: '取消',
|
||
joining: '加入中…',
|
||
},
|
||
statusLabels: {
|
||
upcoming: '即将开始',
|
||
ongoing: '进行中',
|
||
expired: '已结束',
|
||
},
|
||
createCustom: {
|
||
title: '新建挑战',
|
||
editTitle: '编辑挑战',
|
||
yourChallenge: '你的专属挑战',
|
||
defaultTitle: '自定义挑战',
|
||
basicInfo: '基础信息',
|
||
challengeSettings: '挑战设置',
|
||
displayInteraction: '展示&互动',
|
||
durationDays: '持续{{days}}天',
|
||
durationDaysChallenge: '{{days}}天挑战',
|
||
dayUnit: '天',
|
||
typeLabels: {
|
||
water: '喝水',
|
||
exercise: '运动',
|
||
diet: '饮食',
|
||
sleep: '睡眠',
|
||
mood: '心情',
|
||
weight: '体重',
|
||
custom: '自定义',
|
||
},
|
||
fields: {
|
||
title: '标题',
|
||
titlePlaceholder: '挑战标题(最多100字)',
|
||
challengeTypeHelper: '饮水、睡眠类型会触发自动上报进度,也可以手动标记完成',
|
||
coverImage: '封面图',
|
||
uploadCover: '上传封面',
|
||
challengeDescription: '挑战说明',
|
||
descriptionPlaceholder: '简单介绍这个挑战的目标与要求',
|
||
challengeType: '挑战类型',
|
||
timeRange: '时间范围',
|
||
start: '开始',
|
||
end: '结束',
|
||
duration: '持续时间',
|
||
periodLabel: '周期标签',
|
||
periodLabelPlaceholder: '如:21天挑战',
|
||
dailyTargetAndUnit: '每日目标值与进度单位',
|
||
dailyTargetPlaceholder: '如:8',
|
||
unitPlaceholder: '单位',
|
||
unitHelper: '进度单位表示每日目标的计量单位,如:次、杯、分钟、页等',
|
||
minimumCheckInDays: '最少打卡天数',
|
||
minimumCheckInDaysPlaceholder: '至少1天',
|
||
challengeRequirement: '挑战要求说明',
|
||
requirementPlaceholder: '例如:每日完成 30 分钟运动',
|
||
maxParticipants: '参与人数上限',
|
||
noLimit: '留空表示无限制',
|
||
isPublic: '是否公开',
|
||
publicDescription: '公开后其他用户可通过邀请码加入',
|
||
},
|
||
buttons: {
|
||
createAndGenerateCode: '创建并生成邀请码',
|
||
updateAndSave: '保存修改',
|
||
creating: '创建中…',
|
||
updating: '更新中…',
|
||
},
|
||
floatingCTA: {
|
||
title: '生成自定义挑战',
|
||
editTitle: '编辑自定义挑战',
|
||
subtitle: '自动创建分享码,邀请好友一起挑战',
|
||
editSubtitle: '修改挑战信息,编辑后保存',
|
||
},
|
||
shareModal: {
|
||
title: '邀请码已生成',
|
||
subtitle: '分享给好友即可加入挑战',
|
||
copyCode: '复制邀请码',
|
||
viewChallenge: '查看挑战',
|
||
later: '稍后再说',
|
||
generatingCode: '获取中…',
|
||
},
|
||
alerts: {
|
||
titleRequired: '请填写挑战标题',
|
||
requirementRequired: '请填写挑战要求说明',
|
||
endTimeError: '结束时间需要晚于开始时间',
|
||
targetValueError: '每日目标值需在 1-1000 之间',
|
||
minimumDaysError: '最少打卡天数需在 1-365 之间',
|
||
minimumDaysExceedError: '最少打卡天数不能超过持续天数',
|
||
participantsError: '参与人数需在 2-10000 之间,或留空表示无限制',
|
||
createSuccess: '自定义挑战已创建',
|
||
updateSuccess: '挑战已更新',
|
||
createFailed: '创建失败,请稍后再试',
|
||
},
|
||
imageUpload: {
|
||
uploading: '上传中…',
|
||
clear: '清除',
|
||
helper: '建议比例 16:9,清晰展示挑战氛围',
|
||
selectSource: '选择封面图',
|
||
selectMessage: '请选择图片来源',
|
||
camera: '拍照',
|
||
album: '从相册选择',
|
||
cancel: '取消',
|
||
cameraPermission: '权限不足',
|
||
cameraPermissionMessage: '需要相机权限以拍摄封面',
|
||
albumPermissionMessage: '需要相册权限以选择封面',
|
||
uploadFailed: '上传失败',
|
||
uploadFailedMessage: '封面上传失败,请稍后重试',
|
||
cameraFailed: '拍照失败',
|
||
cameraFailedMessage: '无法打开相机,请稍后再试',
|
||
selectFailed: '选择失败',
|
||
selectFailedMessage: '无法打开相册,请稍后再试',
|
||
},
|
||
rankingDescription: '连续打卡榜',
|
||
datePicker: {
|
||
confirm: '确认',
|
||
cancel: '取消',
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
en: {
|
||
translation: {
|
||
personal: {
|
||
edit: 'Edit',
|
||
login: 'Log in',
|
||
memberNumber: 'Member ID: {{number}}',
|
||
aiUsage: 'Free AI credits: {{value}}',
|
||
aiUsageUnlimited: 'Unlimited',
|
||
fishRecord: 'Energy log',
|
||
badgesPreview: {
|
||
title: 'My badges',
|
||
subtitle: 'Celebrate every milestone',
|
||
cta: 'View all',
|
||
loading: 'Syncing your badges…',
|
||
empty: 'Complete sleep or challenge tasks to unlock your first badge.',
|
||
lockedHint: 'Keep building the habit to unlock more.',
|
||
},
|
||
stats: {
|
||
height: 'Height',
|
||
weight: 'Weight',
|
||
age: 'Age',
|
||
ageSuffix: ' yrs',
|
||
},
|
||
membership: {
|
||
badge: 'Premium member',
|
||
planFallback: 'VIP Membership',
|
||
expiryLabel: 'Valid until',
|
||
changeButton: 'Change plan',
|
||
validForever: 'No expiry',
|
||
dateFormat: 'YYYY-MM-DD',
|
||
},
|
||
sections: {
|
||
notifications: 'Notifications',
|
||
developer: 'Developer',
|
||
other: 'Other',
|
||
account: 'Account & Security',
|
||
language: 'Language',
|
||
healthData: 'Health data permissions',
|
||
medicalSources: 'Medical Advice Sources',
|
||
customization: 'Customization',
|
||
},
|
||
menu: {
|
||
notificationSettings: 'Notification settings',
|
||
developerOptions: 'Developer options',
|
||
pushSettings: 'Push notification settings',
|
||
privacyPolicy: 'Privacy policy',
|
||
feedback: 'Feedback',
|
||
userAgreement: 'User agreement',
|
||
logout: 'Log out',
|
||
deleteAccount: 'Delete account',
|
||
healthDataPermissions: 'Health data disclosure',
|
||
whoSource: 'World Health Organization (WHO)',
|
||
tabBarConfig: 'Tab Bar Settings',
|
||
},
|
||
language: {
|
||
title: 'Language',
|
||
menuTitle: 'Display language',
|
||
modalTitle: 'Choose language',
|
||
modalSubtitle: 'Your selection applies immediately',
|
||
cancel: 'Cancel',
|
||
options: {
|
||
zh: {
|
||
label: 'Chinese',
|
||
description: 'Use the Chinese interface',
|
||
},
|
||
en: {
|
||
label: 'English',
|
||
description: 'Use the app in English',
|
||
},
|
||
},
|
||
},
|
||
tabBarConfig: {
|
||
title: 'Tab Bar Settings',
|
||
subtitle: 'Customize your bottom navigation',
|
||
description: 'Use toggles to show or hide tabs',
|
||
resetButton: 'Reset',
|
||
cannotDisable: 'Cannot be disabled',
|
||
resetConfirm: {
|
||
title: 'Reset to Default?',
|
||
message: 'This will reset all tab bar settings and visibility',
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
resetSuccess: 'Settings reset to default',
|
||
},
|
||
},
|
||
badges: badgesScreenResourcesEn,
|
||
login: loginScreenResourcesEn,
|
||
editProfile: {
|
||
title: 'Edit Profile',
|
||
fields: {
|
||
name: 'Nickname',
|
||
gender: 'Gender',
|
||
height: 'Height',
|
||
weight: 'Weight',
|
||
activityLevel: 'Activity Level',
|
||
birthDate: 'Birth Date',
|
||
maxHeartRate: 'Max Heart Rate',
|
||
},
|
||
gender: {
|
||
male: 'Male',
|
||
female: 'Female',
|
||
notSet: 'Not set',
|
||
},
|
||
height: {
|
||
unit: 'cm',
|
||
placeholder: '170cm',
|
||
},
|
||
weight: {
|
||
unit: 'kg',
|
||
placeholder: '55kg',
|
||
},
|
||
activityLevels: {
|
||
1: 'Sedentary',
|
||
2: 'Lightly active',
|
||
3: 'Moderately active',
|
||
4: 'Very active',
|
||
descriptions: {
|
||
1: 'Rarely exercise',
|
||
2: 'Exercise 1-3 times per week',
|
||
3: 'Exercise 3-5 times per week',
|
||
4: 'Exercise 6-7 times per week',
|
||
},
|
||
},
|
||
birthDate: {
|
||
placeholder: 'January 1, 1995',
|
||
format: '{{month}} {{day}}, {{year}}',
|
||
},
|
||
maxHeartRate: {
|
||
unit: 'bpm',
|
||
notAvailable: 'Not available',
|
||
alert: {
|
||
title: 'Notice',
|
||
message: 'Max heart rate data is automatically retrieved from Health app',
|
||
},
|
||
},
|
||
alerts: {
|
||
notLoggedIn: {
|
||
title: 'Not logged in',
|
||
message: 'Please log in before trying to save',
|
||
},
|
||
saveFailed: {
|
||
title: 'Save failed',
|
||
message: 'Please try again later',
|
||
},
|
||
avatarPermissions: {
|
||
title: 'Insufficient permissions',
|
||
message: 'Photo album permission is required to select avatar',
|
||
},
|
||
avatarUploadFailed: {
|
||
title: 'Upload failed',
|
||
message: 'Avatar upload failed, please try again',
|
||
},
|
||
avatarError: {
|
||
title: 'Error occurred',
|
||
message: 'Failed to select avatar, please try again',
|
||
},
|
||
avatarSuccess: {
|
||
title: 'Success',
|
||
message: 'Avatar updated successfully',
|
||
},
|
||
},
|
||
modals: {
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
save: 'Save',
|
||
input: {
|
||
namePlaceholder: 'Enter nickname',
|
||
weightPlaceholder: 'Enter weight',
|
||
weightUnit: 'kg',
|
||
},
|
||
selectHeight: 'Select Height',
|
||
selectGender: 'Select Gender',
|
||
selectActivityLevel: 'Select Activity Level',
|
||
female: 'Female',
|
||
male: 'Male',
|
||
},
|
||
defaultValues: {
|
||
name: 'TonightEatMeat',
|
||
height: 170,
|
||
weight: 55,
|
||
birthDate: '1995-01-01',
|
||
activityLevel: 1,
|
||
},
|
||
},
|
||
healthPermissions: {
|
||
title: 'Health data disclosure',
|
||
subtitle: 'We integrate with Apple Health through HealthKit and CareKit to deliver precise training, recovery, and reminder experiences.',
|
||
cards: {
|
||
usage: {
|
||
title: 'Data we read or write',
|
||
items: [
|
||
'Activity: steps, active energy, and workouts fuel performance charts and rings.',
|
||
'Body metrics: height, weight, and body fat keep plans and nutrition tips personalized.',
|
||
'Sleep & recovery: duration and stages unlock recovery advice and reminders.',
|
||
'Hydration: we read and write water intake so Health and the app stay in sync.',
|
||
],
|
||
},
|
||
purpose: {
|
||
title: 'Why we need it',
|
||
items: [
|
||
'Generate adaptive training plans, challenges, and recovery nudges.',
|
||
'Display long-term trends so you can understand progress at a glance.',
|
||
'Reduce manual input by syncing reminders and challenge progress automatically.',
|
||
],
|
||
},
|
||
control: {
|
||
title: 'Your control',
|
||
items: [
|
||
'Permissions are granted inside Apple Health; change them anytime under iOS Settings > Health > Data Access & Devices.',
|
||
'We never access data you do not authorize, and cached values are removed if you revoke access.',
|
||
'Core functionality keeps working and offers manual input alternatives.',
|
||
],
|
||
},
|
||
privacy: {
|
||
title: 'Storage & privacy',
|
||
items: [
|
||
'Health data stays on your device — we do not upload it or share it with third parties.',
|
||
'Only aggregated, anonymized stats are synced when absolutely necessary.',
|
||
"We follow Apple's review requirements and will notify you before any changes.",
|
||
],
|
||
},
|
||
},
|
||
callout: {
|
||
title: 'What if I skip authorization?',
|
||
items: [
|
||
'The related modules will ask for permission and provide manual logging options.',
|
||
'Declining does not break other areas of the app that do not rely on Health data.',
|
||
],
|
||
},
|
||
contact: {
|
||
title: 'Need help?',
|
||
description: 'Questions about HealthKit or CareKit? Reach out via email or the in-app feedback form:',
|
||
email: 'richardwei1995@gmail.com',
|
||
},
|
||
},
|
||
statistics: {
|
||
title: 'Out Live',
|
||
sections: {
|
||
bodyMetrics: 'Body Metrics',
|
||
},
|
||
components: {
|
||
diet: {
|
||
title: 'Diet Analysis',
|
||
loading: 'Loading...',
|
||
updated: 'Updated: {{time}}',
|
||
remaining: 'Can Still Eat',
|
||
calories: 'Calories',
|
||
protein: 'Protein',
|
||
carb: 'Carbs',
|
||
fat: 'Fat',
|
||
fiber: 'Fiber',
|
||
sodium: 'Sodium',
|
||
basal: 'Basal',
|
||
exercise: 'Exercise',
|
||
diet: 'Diet',
|
||
kcal: 'kcal',
|
||
aiRecognition: 'AI Scan',
|
||
foodLibrary: 'Food Library',
|
||
voiceRecord: 'Voice Log',
|
||
nutritionLabel: 'Nutrition Label',
|
||
},
|
||
fitness: {
|
||
kcal: 'kcal',
|
||
minutes: 'min',
|
||
hours: 'hrs',
|
||
},
|
||
steps: {
|
||
title: 'Steps',
|
||
},
|
||
mood: {
|
||
title: 'Mood',
|
||
empty: 'Tap to record mood',
|
||
},
|
||
stress: {
|
||
title: 'Stress',
|
||
unit: 'ms',
|
||
},
|
||
water: {
|
||
title: 'Water',
|
||
unit: 'ml',
|
||
addButton: '+ {{amount}}ml',
|
||
},
|
||
metabolism: {
|
||
title: 'Basal Metabolism',
|
||
loading: 'Loading...',
|
||
unit: 'kcal/day',
|
||
status: {
|
||
high: 'High',
|
||
normal: 'Normal',
|
||
low: 'Low',
|
||
veryLow: 'Very Low',
|
||
unknown: 'Unknown',
|
||
},
|
||
},
|
||
sleep: {
|
||
title: 'Sleep',
|
||
loading: 'Loading...',
|
||
},
|
||
oxygen: {
|
||
title: 'Blood Oxygen',
|
||
},
|
||
circumference: {
|
||
title: 'Circumference (cm)',
|
||
setTitle: 'Set {{label}}',
|
||
confirm: 'Confirm',
|
||
measurements: {
|
||
chest: 'Chest',
|
||
waist: 'Waist',
|
||
hip: 'Hip',
|
||
arm: 'Arm',
|
||
thigh: 'Thigh',
|
||
calf: 'Calf',
|
||
},
|
||
},
|
||
circumferenceDetail: {
|
||
title: 'Circumference Statistics',
|
||
loading: 'Loading...',
|
||
error: 'Loading failed',
|
||
retry: 'Retry',
|
||
noData: 'No data available',
|
||
noDataSelected: 'Please select circumference data to display',
|
||
tabs: {
|
||
week: 'By Week',
|
||
month: 'By Month',
|
||
year: 'By Year',
|
||
},
|
||
measurements: {
|
||
chest: 'Chest',
|
||
waist: 'Waist',
|
||
upperHip: 'Upper Hip',
|
||
arm: 'Arm',
|
||
thigh: 'Thigh',
|
||
calf: 'Calf',
|
||
},
|
||
modal: {
|
||
title: 'Set {{label}}',
|
||
defaultTitle: 'Set Circumference',
|
||
confirm: 'Confirm',
|
||
},
|
||
chart: {
|
||
weekLabel: 'Week {{week}}',
|
||
monthLabel: '{{month}}',
|
||
empty: 'No data available',
|
||
noSelection: 'Please select circumference data to display',
|
||
},
|
||
},
|
||
workout: {
|
||
title: 'Recent Workout',
|
||
minutes: 'min',
|
||
kcal: 'kcal',
|
||
noData: 'No workout data',
|
||
syncing: 'Syncing...',
|
||
sourceWaiting: 'Source: Syncing...',
|
||
sourceUnknown: 'Source: Unknown',
|
||
sourceFormat: 'Source: {{source}}',
|
||
sourceFormatMultiple: 'Source: {{source}} et al.',
|
||
lastWorkout: 'Latest Workout',
|
||
updated: 'Updated',
|
||
},
|
||
weight: {
|
||
title: 'Weight Records',
|
||
addButton: 'Record Weight',
|
||
bmi: 'BMI',
|
||
weight: 'Weight',
|
||
days: 'days',
|
||
range: 'Range',
|
||
unit: 'kg',
|
||
bmiModal: {
|
||
title: 'BMI Index Explanation',
|
||
description: 'BMI (Body Mass Index) is an internationally recognized health indicator for assessing weight relative to height',
|
||
formula: 'Formula: weight(kg) ÷ height²(m)',
|
||
classificationTitle: 'BMI Classification Standards',
|
||
healthTipsTitle: 'Health Tips',
|
||
tips: {
|
||
nutrition: 'Maintain a balanced diet and control calorie intake',
|
||
exercise: 'At least 150 minutes of moderate-intensity exercise per week',
|
||
sleep: 'Ensure 7-9 hours of adequate sleep',
|
||
monitoring: 'Regularly monitor weight changes and adjust promptly',
|
||
},
|
||
disclaimer: 'BMI is for reference only and cannot reflect muscle mass, bone density, etc. If you have health concerns, please consult a professional doctor.',
|
||
continueButton: 'Continue',
|
||
},
|
||
},
|
||
fitnessRings: {
|
||
title: 'Fitness Rings',
|
||
activeCalories: 'Active Calories',
|
||
exerciseMinutes: 'Exercise Minutes',
|
||
standHours: 'Stand Hours',
|
||
goal: '/{{goal}}',
|
||
ringLabels: {
|
||
active: 'Active',
|
||
exercise: 'Exercise',
|
||
stand: 'Stand',
|
||
},
|
||
},
|
||
},
|
||
tabs: {
|
||
health: 'Health',
|
||
medications: 'Meds',
|
||
fasting: 'Fasting',
|
||
challenges: 'Challenges',
|
||
personal: 'Me',
|
||
},
|
||
activityHeatMap: {
|
||
subtitle: 'Active {{days}} days in the last 6 months',
|
||
activeRate: '{{rate}}%',
|
||
popover: {
|
||
title: 'Accumulated energy can be redeemed for AI-related benefits',
|
||
subtitle: 'How to earn',
|
||
rules: {
|
||
login: '1. Daily login earns energy +1',
|
||
mood: '2. Daily mood record earns energy +1',
|
||
diet: '3. Diet record earns energy +1',
|
||
goal: '4. Complete a goal earns energy +1',
|
||
},
|
||
},
|
||
months: {
|
||
1: 'Jan',
|
||
2: 'Feb',
|
||
3: 'Mar',
|
||
4: 'Apr',
|
||
5: 'May',
|
||
6: 'Jun',
|
||
7: 'Jul',
|
||
8: 'Aug',
|
||
9: 'Sep',
|
||
10: 'Oct',
|
||
11: 'Nov',
|
||
12: 'Dec',
|
||
},
|
||
legend: {
|
||
less: 'Less',
|
||
more: 'More',
|
||
},
|
||
},
|
||
},
|
||
medications: {
|
||
greeting: 'Hello, {{name}}',
|
||
welcome: 'Welcome to Medication Assistant!',
|
||
todayMedications: 'Today\'s Medications',
|
||
filters: {
|
||
all: 'All',
|
||
taken: 'Taken',
|
||
missed: 'Missed',
|
||
},
|
||
emptyState: {
|
||
title: 'No medications scheduled for today',
|
||
subtitle: 'No medication plans added yet. Let\'s add some.',
|
||
},
|
||
stack: {
|
||
completed: 'Completed ({{count}})',
|
||
},
|
||
dateFormats: {
|
||
today: 'Today, {{date}}',
|
||
other: '{{date}}',
|
||
},
|
||
// MedicationCard 组件翻译
|
||
card: {
|
||
status: {
|
||
missed: 'Missed',
|
||
timeToTake: 'Time to take',
|
||
remaining: '{{time}} remaining',
|
||
},
|
||
action: {
|
||
takeNow: 'Take Now',
|
||
taken: 'Taken',
|
||
skipped: 'Skipped',
|
||
skip: 'Skip',
|
||
submitting: 'Submitting...',
|
||
},
|
||
skipAlert: {
|
||
title: 'Confirm Skip',
|
||
message: 'Are you sure you want to skip this medication?\n\nIt will not be recorded as taken.',
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm Skip',
|
||
},
|
||
earlyTakeAlert: {
|
||
title: 'Not yet time to take medication',
|
||
message: 'This medication is scheduled for {{time}}, which is more than 1 hour from now.\n\nHave you already taken this medication?',
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm Taken',
|
||
},
|
||
takeError: {
|
||
title: 'Operation Failed',
|
||
message: 'An error occurred while recording medication, please try again later',
|
||
confirm: 'OK',
|
||
},
|
||
skipError: {
|
||
title: 'Operation Failed',
|
||
message: 'Skip operation failed, please try again later',
|
||
confirm: 'OK',
|
||
},
|
||
},
|
||
// 添加药物页面翻译
|
||
add: {
|
||
title: 'Add Medication',
|
||
steps: {
|
||
name: 'Medication Name',
|
||
dosage: 'Dosage & Form',
|
||
frequency: 'Frequency',
|
||
time: 'Reminder Time',
|
||
note: 'Notes',
|
||
},
|
||
descriptions: {
|
||
name: 'Name the medication and upload package photo for easy identification',
|
||
dosage: 'Select tablet type and fill in dosage per administration',
|
||
frequency: 'Set medication frequency and daily times',
|
||
time: 'Add and manage daily reminder times',
|
||
note: 'Fill in notes or doctor instructions (optional)',
|
||
},
|
||
name: {
|
||
placeholder: 'Enter or search medication name',
|
||
},
|
||
photo: {
|
||
title: 'Upload Medication Photo',
|
||
subtitle: 'Take a photo or select from album to help identify medication packaging',
|
||
selectTitle: 'Select Image',
|
||
selectMessage: 'Please select image source',
|
||
camera: 'Camera',
|
||
album: 'From Album',
|
||
cancel: 'Cancel',
|
||
retake: 'Retake',
|
||
uploading: 'Uploading...',
|
||
uploadingText: 'Uploading',
|
||
remove: 'Remove',
|
||
cameraPermission: 'Camera permission is required to take medication photos',
|
||
albumPermission: 'Album permission is required to select medication photos',
|
||
uploadFailed: 'Upload Failed',
|
||
uploadFailedMessage: 'Image upload failed, please try again later',
|
||
cameraFailed: 'Camera Failed',
|
||
cameraFailedMessage: 'Unable to open camera, please try again later',
|
||
selectFailed: 'Selection Failed',
|
||
selectFailedMessage: 'Unable to open album, please try again later',
|
||
},
|
||
dosage: {
|
||
label: 'Dosage per administration',
|
||
placeholder: '0.5',
|
||
type: 'Type',
|
||
unitSelector: 'Select dosage unit',
|
||
},
|
||
frequency: {
|
||
label: 'Times per day',
|
||
value: '{{count}} times/day',
|
||
period: 'Medication period',
|
||
start: 'Start',
|
||
end: 'End',
|
||
longTerm: 'Long-term',
|
||
startDateInvalid: 'Invalid date',
|
||
startDateInvalidMessage: 'Start date cannot be earlier than today',
|
||
endDateInvalid: 'Invalid date',
|
||
endDateInvalidMessage: 'End date cannot be earlier than start date',
|
||
},
|
||
time: {
|
||
label: 'Daily reminder times',
|
||
addTime: 'Add Time',
|
||
editTime: 'Edit Reminder Time',
|
||
addTimeButton: 'Add Time',
|
||
},
|
||
note: {
|
||
label: 'Notes',
|
||
placeholder: 'Record precautions, doctor instructions or custom reminders',
|
||
voiceNotSupported: 'Voice-to-text is not supported on this device, you can type notes directly',
|
||
voiceError: 'Voice recognition unavailable',
|
||
voiceErrorMessage: 'Unable to use voice input, please check permission settings and try again',
|
||
voiceStartError: 'Unable to start voice input',
|
||
voiceStartErrorMessage: 'Please check microphone and voice recognition permissions and try again',
|
||
},
|
||
actions: {
|
||
previous: 'Previous',
|
||
next: 'Next',
|
||
complete: 'Complete',
|
||
},
|
||
success: {
|
||
title: 'Added Successfully',
|
||
message: 'Successfully added medication "{{name}}"',
|
||
confirm: 'OK',
|
||
},
|
||
error: {
|
||
title: 'Add Failed',
|
||
message: 'An error occurred while creating medication, please try again later',
|
||
confirm: 'OK',
|
||
},
|
||
datePickers: {
|
||
startDate: 'Select Start Date',
|
||
endDate: 'Select End Date',
|
||
time: 'Select Time',
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
pickers: {
|
||
timesPerDay: 'Select Times Per Day',
|
||
dosageUnit: 'Select Dosage Unit',
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
},
|
||
// 药物管理页面翻译
|
||
manage: {
|
||
title: 'Medication Management',
|
||
subtitle: 'Manage status and reminders for all medications',
|
||
filters: {
|
||
all: 'All',
|
||
active: 'Active',
|
||
inactive: 'Inactive',
|
||
},
|
||
loading: 'Loading medication information...',
|
||
empty: {
|
||
title: 'No Medications',
|
||
subtitle: 'No medication records yet, click the top right to add',
|
||
},
|
||
deactivate: {
|
||
title: 'Deactivate {{name}}?',
|
||
description: 'After deactivation, medication plans generated for the day will be deleted and cannot be recovered.',
|
||
confirm: 'Confirm Deactivation',
|
||
cancel: 'Cancel',
|
||
error: {
|
||
title: 'Operation Failed',
|
||
message: 'An error occurred while deactivating medication, please try again later.',
|
||
},
|
||
},
|
||
toggleError: {
|
||
title: 'Operation Failed',
|
||
message: 'An error occurred while toggling medication status, please try again later.',
|
||
},
|
||
formLabels: {
|
||
capsule: 'Capsule',
|
||
pill: 'Tablet',
|
||
tablet: 'Tablet',
|
||
injection: 'Injection',
|
||
spray: 'Spray',
|
||
drop: 'Drops',
|
||
syrup: 'Syrup',
|
||
other: 'Other',
|
||
},
|
||
frequency: {
|
||
daily: 'Daily',
|
||
weekly: 'Weekly',
|
||
custom: 'Custom',
|
||
},
|
||
cardMeta: 'Started {{date}} | Reminder: {{reminder}}',
|
||
reminderNotSet: 'Not set',
|
||
unknownDate: 'Unknown date',
|
||
},
|
||
aiCamera: {
|
||
title: 'AI Scan',
|
||
steps: {
|
||
front: {
|
||
title: 'Front',
|
||
subtitle: 'Ensure medication name is clearly visible',
|
||
},
|
||
side: {
|
||
title: 'Back',
|
||
subtitle: 'Include specs and ingredients info',
|
||
},
|
||
aux: {
|
||
title: 'Side',
|
||
subtitle: 'Add more details to improve accuracy',
|
||
},
|
||
stepProgress: 'Step {{current}} / {{total}}',
|
||
optional: '(Optional)',
|
||
notTaken: 'Empty',
|
||
},
|
||
buttons: {
|
||
flip: 'Flip',
|
||
capture: 'Snap',
|
||
complete: 'Done',
|
||
album: 'Album',
|
||
},
|
||
permission: {
|
||
title: 'Camera Permission Required',
|
||
description: 'Allow access to capture medication packaging for automatic recognition',
|
||
button: 'Allow Camera Access',
|
||
},
|
||
alerts: {
|
||
pickFailed: {
|
||
title: 'Selection Failed',
|
||
message: 'Please try again or choose another image',
|
||
},
|
||
captureFailed: {
|
||
title: 'Capture Failed',
|
||
message: 'Please try again',
|
||
},
|
||
insufficientPhotos: {
|
||
title: 'Photos Missing',
|
||
message: 'Please capture at least front and back sides',
|
||
},
|
||
taskFailed: {
|
||
title: 'Task Creation Failed',
|
||
defaultMessage: 'Please check network and try again',
|
||
},
|
||
},
|
||
guideModal: {
|
||
badge: 'Guide',
|
||
title: 'Keep Photos Clear',
|
||
description1: 'Please capture the product name and description on the front/back of the medication.',
|
||
description2: 'Ensure good lighting, avoid glare, and keep text legible. Photo clarity affects recognition accuracy.',
|
||
button: 'Got it!',
|
||
},
|
||
},
|
||
// 药物详情页面翻译
|
||
detail: {
|
||
title: 'Medication Details',
|
||
notFound: {
|
||
title: 'Medication information not found',
|
||
subtitle: 'Please re-enter this page from the medication list.',
|
||
},
|
||
loading: 'Loading...',
|
||
error: {
|
||
title: 'Unable to retrieve medication information at this time, please try again later.',
|
||
subtitle: 'Please check your network and try again, or return to the previous page.',
|
||
},
|
||
sections: {
|
||
plan: 'Medication Plan',
|
||
dosage: 'Dosage & Form',
|
||
note: 'Notes',
|
||
overview: 'Medication Overview',
|
||
aiAnalysis: 'AI Medication Analysis',
|
||
},
|
||
plan: {
|
||
period: 'Medication Period',
|
||
time: 'Medication Time',
|
||
frequency: 'Frequency',
|
||
expiryDate: 'Expiry Date',
|
||
longTerm: 'Long-term',
|
||
periodMessage: 'Start date: {{startDate}}\n{{endDateInfo}}',
|
||
longTermPlan: 'Medication plan: Long-term medication',
|
||
timeMessage: 'Set times: {{times}}',
|
||
},
|
||
dosage: {
|
||
label: 'Dosage per administration',
|
||
form: 'Form',
|
||
selectDosage: 'Select Dosage',
|
||
selectForm: 'Select Form',
|
||
dosageValue: 'Dosage Value',
|
||
unit: 'Unit',
|
||
},
|
||
note: {
|
||
label: 'Medication Notes',
|
||
placeholder: 'Record precautions, doctor instructions or custom reminders',
|
||
edit: 'Edit Notes',
|
||
noNote: 'No notes',
|
||
voiceNotSupported: 'Voice-to-text is not supported on this device, you can type notes directly',
|
||
save: 'Save',
|
||
saveError: {
|
||
title: 'Save Failed',
|
||
message: 'An error occurred while submitting notes, please try again later.',
|
||
},
|
||
},
|
||
overview: {
|
||
calculating: 'Calculating...',
|
||
takenCount: 'Taken {{count}} times in total',
|
||
calculatingDays: 'Calculating adherence days',
|
||
startedDays: 'Adhered for {{days}} days',
|
||
startDate: 'Started {{date}}',
|
||
noStartDate: 'No start date',
|
||
},
|
||
aiAnalysis: {
|
||
analyzing: 'Analyzing medication information...',
|
||
analyzingButton: 'Analyzing...',
|
||
button: 'AI Analysis',
|
||
error: {
|
||
title: 'Analysis Failed',
|
||
message: 'AI analysis failed, please try again later',
|
||
networkError: 'Failed to initiate analysis request, please check network connection',
|
||
unauthorized: 'Please log in first',
|
||
forbidden: 'No access to this medication',
|
||
notFound: 'Medication not found',
|
||
},
|
||
},
|
||
status: {
|
||
enabled: 'Reminders Enabled',
|
||
disabled: 'Reminders Disabled',
|
||
},
|
||
delete: {
|
||
title: 'Delete {{name}}?',
|
||
description: 'After deletion, reminders and history related to this medication will be cleared and cannot be recovered.',
|
||
confirm: 'Delete',
|
||
cancel: 'Cancel',
|
||
error: {
|
||
title: 'Delete Failed',
|
||
message: 'An error occurred while removing this medication, please try again later.',
|
||
},
|
||
},
|
||
deactivate: {
|
||
title: 'Deactivate {{name}}?',
|
||
description: 'After deactivation, medication plans generated for the day will be deleted and cannot be recovered.',
|
||
confirm: 'Confirm Deactivation',
|
||
cancel: 'Cancel',
|
||
error: {
|
||
title: 'Operation Failed',
|
||
message: 'An error occurred while deactivating medication, please try again later.',
|
||
},
|
||
},
|
||
toggleError: {
|
||
title: 'Operation Failed',
|
||
message: 'An error occurred while toggling reminder status, please try again later.',
|
||
},
|
||
updateErrors: {
|
||
dosage: 'Update Failed',
|
||
dosageMessage: 'An error occurred while updating dosage, please try again later.',
|
||
form: 'Update Failed',
|
||
formMessage: 'An error occurred while updating form, please try again later.',
|
||
},
|
||
imageViewer: {
|
||
close: 'Close',
|
||
},
|
||
pickers: {
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
},
|
||
// 编辑频率页面翻译
|
||
editFrequency: {
|
||
title: 'Edit Medication Frequency',
|
||
missingParams: 'Missing required parameters',
|
||
medicationName: 'Editing: {{name}}',
|
||
sections: {
|
||
frequency: 'Medication Frequency',
|
||
frequencyDescription: 'Set daily medication frequency',
|
||
time: 'Daily Reminder Times',
|
||
timeDescription: 'Add and manage daily reminder times',
|
||
},
|
||
frequency: {
|
||
repeatPattern: 'Repeat Pattern',
|
||
timesPerDay: 'Times Per Day',
|
||
daily: 'Daily',
|
||
weekly: 'Weekly',
|
||
custom: 'Custom',
|
||
timesLabel: '{{count}} times',
|
||
summary: '{{pattern}} {{count}} times',
|
||
},
|
||
time: {
|
||
addTime: 'Add Time',
|
||
editTime: 'Edit Reminder Time',
|
||
addTimeButton: 'Add Time',
|
||
},
|
||
actions: {
|
||
save: 'Save Changes',
|
||
},
|
||
error: {
|
||
title: 'Update Failed',
|
||
message: 'An error occurred while updating medication frequency, please try again later.',
|
||
},
|
||
pickers: {
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
},
|
||
},
|
||
notificationSettings: {
|
||
title: 'Notification Settings',
|
||
loading: 'Loading...',
|
||
sections: {
|
||
notifications: 'Notification Settings',
|
||
medicationReminder: 'Medication Reminder',
|
||
nutritionReminder: 'Nutrition Reminder',
|
||
moodReminder: 'Mood Reminder',
|
||
description: 'Description',
|
||
},
|
||
items: {
|
||
pushNotifications: {
|
||
title: 'Push Notifications',
|
||
description: 'Receive app notifications when enabled',
|
||
},
|
||
medicationReminder: {
|
||
title: 'Medication Reminder',
|
||
description: 'Receive reminder notifications at medication time',
|
||
},
|
||
nutritionReminder: {
|
||
title: 'Nutrition Record Reminder',
|
||
description: 'Receive nutrition record reminders at meal times',
|
||
},
|
||
moodReminder: {
|
||
title: 'Mood Record Reminder',
|
||
description: 'Receive mood record reminders in the evening',
|
||
},
|
||
},
|
||
description: {
|
||
text: '• Push notifications is the master switch for all notifications\n• Various reminders require push notifications to be enabled\n• You can manage notification permissions in system settings\n• Disabling push notifications will stop all app notifications',
|
||
},
|
||
alerts: {
|
||
permissionDenied: {
|
||
title: 'Permission Denied',
|
||
message: 'Please enable notification permission in system settings, then try to enable push notifications',
|
||
cancel: 'Cancel',
|
||
goToSettings: 'Go to Settings',
|
||
},
|
||
error: {
|
||
title: 'Error',
|
||
message: 'Failed to request notification permission',
|
||
saveFailed: 'Failed to save settings',
|
||
medicationReminderFailed: 'Failed to set medication reminder',
|
||
nutritionReminderFailed: 'Failed to set nutrition reminder',
|
||
moodReminderFailed: 'Failed to set mood reminder',
|
||
},
|
||
notificationsEnabled: {
|
||
title: 'Notifications Enabled',
|
||
body: 'You will receive app notifications and reminders',
|
||
},
|
||
medicationReminderEnabled: {
|
||
title: 'Medication Reminder Enabled',
|
||
body: 'You will receive reminder notifications at medication time',
|
||
},
|
||
nutritionReminderEnabled: {
|
||
title: 'Nutrition Reminder Enabled',
|
||
body: 'You will receive nutrition record reminders at meal times',
|
||
},
|
||
moodReminderEnabled: {
|
||
title: 'Mood Reminder Enabled',
|
||
body: 'You will receive mood record reminders in the evening',
|
||
},
|
||
},
|
||
},
|
||
tabBarConfig: {
|
||
title: 'Tab Bar Settings',
|
||
subtitle: 'Customize your bottom navigation',
|
||
description: 'Use toggles to show or hide tabs',
|
||
resetButton: 'Reset',
|
||
cannotDisable: 'Cannot be disabled',
|
||
resetConfirm: {
|
||
title: 'Reset to Default?',
|
||
message: 'This will reset all tab bar settings and visibility',
|
||
cancel: 'Cancel',
|
||
confirm: 'Confirm',
|
||
},
|
||
resetSuccess: 'Settings reset to default',
|
||
},
|
||
challengeDetail: challengeDetailResourcesEn,
|
||
sleepDetail: sleepDetailResourcesEn,
|
||
stepsDetail: stepsDetailResourcesEn,
|
||
fitnessRingsDetail: fitnessRingsDetailResourcesEn,
|
||
waterDetail: waterDetailResourcesEn,
|
||
basalMetabolismDetail: basalMetabolismDetailResourcesEn,
|
||
waterReminderSettings: waterReminderSettingsResourcesEn,
|
||
waterSettings: waterSettingsResourcesEn,
|
||
workoutHistory: workoutHistoryResourcesEn,
|
||
authGuard: authGuardResourcesEn,
|
||
weightRecords: {
|
||
title: 'Weight Records',
|
||
addButton: 'Record Weight',
|
||
stats: {
|
||
totalLoss: 'Total Weight Loss',
|
||
currentWeight: 'Curr. Weight',
|
||
initialWeight: 'Init. Weight',
|
||
targetWeight: 'Target Wt.',
|
||
},
|
||
empty: {
|
||
title: 'No weight records',
|
||
subtitle: 'Tap the add button in the top right to start recording',
|
||
},
|
||
modal: {
|
||
recordWeight: 'Record Weight',
|
||
editInitialWeight: 'Edit Initial Weight',
|
||
editTargetWeight: 'Edit Target Weight',
|
||
editRecord: 'Edit Weight Record',
|
||
inputPlaceholder: 'Enter weight',
|
||
unit: 'kg',
|
||
inputHint: 'Please enter a value between 0-500, decimals are supported',
|
||
quickSelection: 'Quick Selection',
|
||
confirm: 'Confirm',
|
||
},
|
||
alerts: {
|
||
invalidWeight: 'Please enter a valid weight value (0-500kg)',
|
||
deleteFailed: 'Failed to delete weight record, please try again',
|
||
saveFailed: 'Failed to save weight, please try again',
|
||
},
|
||
loadingHistory: 'Failed to load weight history',
|
||
card: {
|
||
weightLabel: 'Weight',
|
||
deleteConfirmTitle: 'Confirm Delete',
|
||
deleteConfirmMessage: 'Are you sure you want to delete this weight record? This action cannot be undone.',
|
||
cancelButton: 'Cancel',
|
||
deleteButton: 'Delete',
|
||
},
|
||
},
|
||
workoutDetail: {
|
||
loading: 'Loading workout details...',
|
||
retry: 'Retry',
|
||
metrics: {
|
||
duration: 'Exercise Duration',
|
||
calories: 'Exercise Calories',
|
||
caloriesUnit: 'kcal',
|
||
intensity: 'Exercise Intensity',
|
||
averageHeartRate: 'Average Heart Rate',
|
||
heartRateUnit: 'bpm',
|
||
},
|
||
sections: {
|
||
heartRateRange: 'Heart Rate Range',
|
||
heartRateZones: 'Heart Rate Training Zones',
|
||
averageHeartRate: 'Average Heart Rate',
|
||
maximumHeartRate: 'Maximum Heart Rate',
|
||
minimumHeartRate: 'Minimum Heart Rate',
|
||
heartRateUnit: 'bpm',
|
||
},
|
||
intensityInfo: {
|
||
title: 'What is Exercise Intensity?',
|
||
description1: 'Exercise intensity is an estimate of energy you expend to complete a task. It is a measure of intensity of exercise and other daily activities, in units of METs (kilocalories per kilogram per hour).',
|
||
description2: 'Because everyone\'s metabolism is different, METs use resting energy expenditure as a reference to facilitate measuring the intensity of different activities.',
|
||
description3: 'For example: Walking (about 3 km/h) is equivalent to 2 METs, which means it requires twice the energy of the resting state.',
|
||
description4: 'Note: When the device does not provide METs values, the system will automatically calculate based on your calorie consumption and exercise duration (using 70kg estimated weight).',
|
||
formula: {
|
||
title: 'Exercise Intensity Formula',
|
||
value: 'METs = Activity Energy Expenditure (kcal/hour) ÷ Resting Energy Expenditure (1 kcal/hour)',
|
||
},
|
||
legend: {
|
||
low: '< 3',
|
||
lowLabel: 'Low-intensity Activity',
|
||
medium: '3 - 6',
|
||
mediumLabel: 'Moderate-intensity Activity',
|
||
high: '≥ 6',
|
||
highLabel: 'High-intensity Activity',
|
||
},
|
||
},
|
||
chart: {
|
||
unavailable: 'Chart component not available, unable to display heart rate curve',
|
||
noData: 'No heart rate sampling data available',
|
||
},
|
||
errors: {
|
||
loadFailed: 'Failed to get complete workout details',
|
||
noHeartRateData: 'No heart rate data obtained',
|
||
noZoneStats: 'No zone statistics available',
|
||
},
|
||
},
|
||
challenges: {
|
||
title: 'Challenges',
|
||
subtitle: 'Join curated activities, stay motivated daily',
|
||
loading: 'Loading challenges…',
|
||
loadFailed: 'Failed to load challenges, please try again later',
|
||
retry: 'Retry',
|
||
empty: 'No challenges available, check back later.',
|
||
customChallenges: 'Custom Challenges',
|
||
officialChallenges: 'No official challenges available, check back later.',
|
||
officialChallengesTitle: 'Official Challenges',
|
||
join: 'Join',
|
||
create: 'Create',
|
||
joined: 'Joined',
|
||
invalidInviteCode: 'Please enter a valid invite code',
|
||
joinSuccess: 'Successfully joined challenge',
|
||
joinFailed: 'Failed to join challenge, please try again later',
|
||
joinModal: {
|
||
title: 'Join Custom Challenge',
|
||
description: 'Enter 6-12 digit invite code to join friend\'s challenge',
|
||
placeholder: 'e.g., A3K9P2',
|
||
confirm: 'Confirm Join',
|
||
cancel: 'Cancel',
|
||
joining: 'Joining…',
|
||
},
|
||
statusLabels: {
|
||
upcoming: 'Upcoming',
|
||
ongoing: 'Ongoing',
|
||
expired: 'Expired',
|
||
},
|
||
createCustom: {
|
||
title: 'New Challenge',
|
||
editTitle: 'Edit Challenge',
|
||
yourChallenge: 'Your Custom Challenge',
|
||
defaultTitle: 'Custom Challenge',
|
||
basicInfo: 'Basic Info',
|
||
challengeSettings: 'Challenge Settings',
|
||
displayInteraction: 'Display & Interaction',
|
||
durationDays: 'Duration {{days}} days',
|
||
durationDaysChallenge: '{{days}}-Day Challenge',
|
||
dayUnit: 'day',
|
||
typeLabels: {
|
||
water: 'Water',
|
||
exercise: 'Exercise',
|
||
diet: 'Diet',
|
||
sleep: 'Sleep',
|
||
mood: 'Mood',
|
||
weight: 'Weight',
|
||
custom: 'Custom',
|
||
},
|
||
fields: {
|
||
title: 'Title',
|
||
titlePlaceholder: 'Challenge title (max 100 characters)',
|
||
challengeTypeHelper: 'Water and Sleep types auto-report progress and can also be manually marked as complete',
|
||
coverImage: 'Cover Image',
|
||
uploadCover: 'Upload Cover',
|
||
challengeDescription: 'Challenge Description',
|
||
descriptionPlaceholder: 'Brief introduction to the challenge goals and requirements',
|
||
challengeType: 'Challenge Type',
|
||
timeRange: 'Time Range',
|
||
start: 'Start',
|
||
end: 'End',
|
||
duration: 'Duration',
|
||
periodLabel: 'Period Label',
|
||
periodLabelPlaceholder: 'e.g., 21-Day Challenge',
|
||
dailyTargetAndUnit: 'Daily Target & Unit',
|
||
dailyTargetPlaceholder: 'e.g., 8',
|
||
unitPlaceholder: 'Unit',
|
||
unitHelper: 'Progress unit represents the measurement unit for daily goals, such as: times, cups, minutes, pages, etc.',
|
||
minimumCheckInDays: 'Minimum Check-in Days',
|
||
minimumCheckInDaysPlaceholder: 'At least 1 day',
|
||
challengeRequirement: 'Challenge Requirement',
|
||
requirementPlaceholder: 'e.g., Complete 30 minutes of exercise daily',
|
||
maxParticipants: 'Max Participants',
|
||
noLimit: 'Leave empty for unlimited',
|
||
isPublic: 'Public',
|
||
publicDescription: 'Others can join via invite code when public',
|
||
},
|
||
buttons: {
|
||
createAndGenerateCode: 'Create & Generate Code',
|
||
updateAndSave: 'Save Changes',
|
||
creating: 'Creating…',
|
||
updating: 'Updating…',
|
||
},
|
||
floatingCTA: {
|
||
title: 'Generate Custom Challenge',
|
||
editTitle: 'Edit Custom Challenge',
|
||
subtitle: 'Automatically create share code to invite friends',
|
||
editSubtitle: 'Modify challenge information, save after editing',
|
||
},
|
||
shareModal: {
|
||
title: 'Invite Code Generated',
|
||
subtitle: 'Share with friends to join the challenge',
|
||
copyCode: 'Copy Invite Code',
|
||
viewChallenge: 'View Challenge',
|
||
later: 'Later',
|
||
generatingCode: 'Generating…',
|
||
},
|
||
alerts: {
|
||
titleRequired: 'Please enter challenge title',
|
||
requirementRequired: 'Please enter challenge requirement description',
|
||
endTimeError: 'End time must be later than start time',
|
||
targetValueError: 'Daily target value must be between 1-1000',
|
||
minimumDaysError: 'Minimum check-in days must be between 1-365',
|
||
minimumDaysExceedError: 'Minimum check-in days cannot exceed duration days',
|
||
participantsError: 'Participants must be between 2-10000, or leave empty for unlimited',
|
||
createSuccess: 'Custom challenge created',
|
||
updateSuccess: 'Challenge updated',
|
||
createFailed: 'Creation failed, please try again later',
|
||
},
|
||
imageUpload: {
|
||
uploading: 'Uploading…',
|
||
clear: 'Clear',
|
||
helper: 'Recommended ratio 16:9, clearly display challenge atmosphere',
|
||
selectSource: 'Select Cover Image',
|
||
selectMessage: 'Please select image source',
|
||
camera: 'Camera',
|
||
album: 'From Album',
|
||
cancel: 'Cancel',
|
||
cameraPermission: 'Permission Denied',
|
||
cameraPermissionMessage: 'Camera permission is required to take cover photo',
|
||
uploadFailed: 'Upload Failed',
|
||
uploadFailedMessage: 'Cover upload failed, please try again later',
|
||
cameraFailed: 'Camera Failed',
|
||
cameraFailedMessage: 'Unable to open camera, please try again later',
|
||
selectFailed: 'Selection Failed',
|
||
selectFailedMessage: 'Unable to open album, please try again later',
|
||
},
|
||
rankingDescription: 'Continuous Check-in Leaderboard',
|
||
datePicker: {
|
||
confirm: 'Confirm',
|
||
cancel: 'Cancel',
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
};
|
||
|
||
export const isSupportedLanguage = (language?: string | null): language is AppLanguage => {
|
||
if (!language) return false;
|
||
return SUPPORTED_LANGUAGES.some((code) => language === code || language.startsWith(`${code}-`));
|
||
};
|
||
|
||
export const getNormalizedLanguage = (language?: string | null): AppLanguage => {
|
||
if (!language) return fallbackLanguage;
|
||
const normalized = SUPPORTED_LANGUAGES.find((code) => language === code || language.startsWith(`${code}-`));
|
||
return normalized ?? fallbackLanguage;
|
||
};
|
||
|
||
const getStoredLanguage = (): AppLanguage | null => {
|
||
try {
|
||
const stored = getItemSync?.(LANGUAGE_PREFERENCE_KEY) as AppLanguage | null | undefined;
|
||
if (stored && isSupportedLanguage(stored)) {
|
||
return stored;
|
||
}
|
||
} catch (error) {
|
||
// ignore storage errors and fall back to device preference
|
||
}
|
||
return null;
|
||
};
|
||
|
||
const getDeviceLanguage = (): AppLanguage | null => {
|
||
try {
|
||
const locales = Localization.getLocales();
|
||
const preferred = locales.find((locale) => locale.languageCode && isSupportedLanguage(locale.languageCode));
|
||
return preferred?.languageCode as AppLanguage | undefined || null;
|
||
} catch (error) {
|
||
return null;
|
||
}
|
||
};
|
||
|
||
const initialLanguage = getStoredLanguage() ?? getDeviceLanguage() ?? fallbackLanguage;
|
||
|
||
void i18n.use(initReactI18next).init({
|
||
compatibilityJSON: 'v4',
|
||
resources,
|
||
lng: initialLanguage,
|
||
fallbackLng: fallbackLanguage,
|
||
interpolation: {
|
||
escapeValue: false,
|
||
},
|
||
returnNull: false,
|
||
});
|
||
|
||
export const changeAppLanguage = async (language: AppLanguage) => {
|
||
const nextLanguage = isSupportedLanguage(language) ? language : fallbackLanguage;
|
||
await i18n.changeLanguage(nextLanguage);
|
||
await setItem(LANGUAGE_PREFERENCE_KEY, nextLanguage);
|
||
};
|
||
|
||
export default i18n;
|