feat: Enhance Oxygen Saturation Card with health permissions and loading state management

feat(i18n): Add common translations and mood-related strings in English and Chinese

fix(i18n): Update metabolism titles for consistency in health translations

chore: Update Podfile.lock to include SDWebImage 5.21.4 and other dependency versions

refactor(moodCheckins): Improve mood configuration retrieval with optional translation support

refactor(sleepHealthKit): Replace useI18n with direct i18n import for sleep quality descriptions
This commit is contained in:
2025-11-28 23:48:38 +08:00
parent bca6670390
commit 83b77615cf
19 changed files with 512 additions and 254 deletions

View File

@@ -2,4 +2,13 @@ export const dateSelector = {
backToToday: '回到今天',
cancel: '取消',
confirm: '确定',
};
};
export const common = {
alert: '提示',
success: '成功',
error: '错误',
delete: '删除',
confirm: '确定',
cancel: '取消',
};

View File

@@ -3,6 +3,7 @@ import * as Common from './common';
import * as Diet from './diet';
import * as Health from './health';
import * as Medication from './medication';
import * as Mood from './mood';
import * as Personal from './personal';
import * as Weight from './weight';
@@ -13,5 +14,7 @@ export default {
...Medication,
...Weight,
...Challenge,
...Mood,
...Common,
...Common.common, // 确保通用翻译被正确导出
};

95
i18n/zh/mood.ts Normal file
View File

@@ -0,0 +1,95 @@
export const mood = {
calendar: {
title: '心情日历',
weekDays: {
monday: '周一',
tuesday: '周二',
wednesday: '周三',
thursday: '周四',
friday: '周五',
saturday: '周六',
sunday: '周日',
},
months: {
january: '1月',
february: '2月',
march: '3月',
april: '4月',
may: '5月',
june: '6月',
july: '7月',
august: '8月',
september: '9月',
october: '10月',
november: '11月',
december: '12月',
},
selectedDate: {
selectDate: '请选择日期',
record: '记录',
noRecord: '暂无心情记录',
noRecordHint: '点击右上角"记录"按钮添加心情',
noDateSelected: '请先选择一个日期',
noDateSelectedHint: '点击日历中的日期,然后点击"记录"按钮添加心情',
intensity: '强度',
dateFormat: 'YYYY年M月D日',
},
errors: {
loadMonthDataFailed: '加载月份心情数据失败',
loadDailyDataFailed: '加载心情记录失败',
},
},
types: {
happy: '开心',
excited: '心动',
thrilled: '兴奋',
calm: '平静',
anxious: '焦虑',
sad: '难过',
lonely: '孤独',
wronged: '委屈',
angry: '生气',
tired: '心累',
},
edit: {
title: '记录心情',
editTitle: '编辑心情',
selectMood: '选择心情',
intensity: '心情强度',
intensityLow: '轻微',
intensityHigh: '强烈',
diary: '心情日记',
diarySubtitle: '记录你的心情,珍藏美好回忆',
placeholder: `今天的心情如何?
你经历过什么特别的事情吗?
有什么让你开心的事?
或者,有什么让你感到困扰?
写下你的感受,让这些时刻成为你珍贵的记忆...`,
save: '保存心情',
update: '更新心情',
saving: '保存中...',
dateFormat: 'YYYY年M月D日',
alerts: {
selectMood: '请选择心情',
saveSuccess: '心情记录已保存',
updateSuccess: '心情记录已更新',
deleteSuccess: '心情记录已删除',
saveError: '保存心情失败,请重试',
deleteError: '删除心情失败,请重试',
confirmDelete: '确定要删除这条心情记录吗?',
confirmDeleteTitle: '确认删除',
},
},
history: {
title: '心情记录',
noRecords: '暂无心情记录',
totalRecords: '总记录',
averageIntensity: '平均强度',
mostFrequent: '最常见',
recentRecords: '最近记录',
intensity: '强度',
dateTimeFormat: 'MM月DD日 HH:mm',
},
};