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:
@@ -2,4 +2,13 @@ export const dateSelector = {
|
||||
backToToday: 'Back to Today',
|
||||
cancel: 'Cancel',
|
||||
confirm: 'Confirm',
|
||||
};
|
||||
};
|
||||
|
||||
export const common = {
|
||||
alert: 'Alert',
|
||||
success: 'Success',
|
||||
error: 'Error',
|
||||
delete: 'Delete',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@ export const statistics = {
|
||||
addButton: '+ {{amount}}ml',
|
||||
},
|
||||
metabolism: {
|
||||
title: 'Basal Metabolism',
|
||||
title: 'Metabolism',
|
||||
loading: 'Loading...',
|
||||
unit: 'kcal/day',
|
||||
status: {
|
||||
@@ -406,7 +406,7 @@ export const circumferenceDetail = {
|
||||
};
|
||||
|
||||
export const basalMetabolismDetail = {
|
||||
title: 'Basal Metabolism',
|
||||
title: 'Metabolism',
|
||||
currentData: {
|
||||
title: '{{date}} Basal Metabolism',
|
||||
unit: 'kcal',
|
||||
|
||||
@@ -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/en/mood.ts
Normal file
95
i18n/en/mood.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
export const mood = {
|
||||
calendar: {
|
||||
title: 'Mood Calendar',
|
||||
weekDays: {
|
||||
monday: 'Mon',
|
||||
tuesday: 'Tue',
|
||||
wednesday: 'Wed',
|
||||
thursday: 'Thu',
|
||||
friday: 'Fri',
|
||||
saturday: 'Sat',
|
||||
sunday: 'Sun',
|
||||
},
|
||||
months: {
|
||||
january: 'Jan',
|
||||
february: 'Feb',
|
||||
march: 'Mar',
|
||||
april: 'Apr',
|
||||
may: 'May',
|
||||
june: 'Jun',
|
||||
july: 'Jul',
|
||||
august: 'Aug',
|
||||
september: 'Sep',
|
||||
october: 'Oct',
|
||||
november: 'Nov',
|
||||
december: 'Dec',
|
||||
},
|
||||
selectedDate: {
|
||||
selectDate: 'Please select a date',
|
||||
record: 'Record',
|
||||
noRecord: 'No mood records',
|
||||
noRecordHint: 'Click the "Record" button in the top right to add mood',
|
||||
noDateSelected: 'Please select a date first',
|
||||
noDateSelectedHint: 'Click a date in the calendar, then click the "Record" button to add mood',
|
||||
intensity: 'Intensity',
|
||||
dateFormat: 'MMMM D, YYYY',
|
||||
},
|
||||
errors: {
|
||||
loadMonthDataFailed: 'Failed to load monthly mood data',
|
||||
loadDailyDataFailed: 'Failed to load mood records',
|
||||
},
|
||||
},
|
||||
types: {
|
||||
happy: 'Happy',
|
||||
excited: 'Excited',
|
||||
thrilled: 'Thrilled',
|
||||
calm: 'Calm',
|
||||
anxious: 'Anxious',
|
||||
sad: 'Sad',
|
||||
lonely: 'Lonely',
|
||||
wronged: 'Wronged',
|
||||
angry: 'Angry',
|
||||
tired: 'Tired',
|
||||
},
|
||||
edit: {
|
||||
title: 'Record Mood',
|
||||
editTitle: 'Edit Mood',
|
||||
selectMood: 'Select Mood',
|
||||
intensity: 'Mood Intensity',
|
||||
intensityLow: 'Low',
|
||||
intensityHigh: 'High',
|
||||
diary: 'Mood Diary',
|
||||
diarySubtitle: 'Record your feelings and cherish beautiful memories',
|
||||
placeholder: `How are you feeling today?
|
||||
|
||||
Did you experience anything special?
|
||||
What made you happy?
|
||||
Or, what's bothering you?
|
||||
|
||||
Write down your feelings and let these moments become your precious memories...`,
|
||||
save: 'Save Mood',
|
||||
update: 'Update Mood',
|
||||
saving: 'Saving...',
|
||||
dateFormat: 'MMMM D, YYYY',
|
||||
alerts: {
|
||||
selectMood: 'Please select a mood',
|
||||
saveSuccess: 'Mood record saved',
|
||||
updateSuccess: 'Mood record updated',
|
||||
deleteSuccess: 'Mood record deleted',
|
||||
saveError: 'Failed to save mood, please try again',
|
||||
deleteError: 'Failed to delete mood, please try again',
|
||||
confirmDelete: 'Are you sure you want to delete this mood record?',
|
||||
confirmDeleteTitle: 'Confirm Delete',
|
||||
},
|
||||
},
|
||||
history: {
|
||||
title: 'Mood Records',
|
||||
noRecords: 'No mood records',
|
||||
totalRecords: 'Total Records',
|
||||
averageIntensity: 'Average Intensity',
|
||||
mostFrequent: 'Most Frequent',
|
||||
recentRecords: 'Recent Records',
|
||||
intensity: 'Intensity',
|
||||
dateTimeFormat: 'MM/DD HH:mm',
|
||||
},
|
||||
};
|
||||
@@ -2,4 +2,13 @@ export const dateSelector = {
|
||||
backToToday: '回到今天',
|
||||
cancel: '取消',
|
||||
confirm: '确定',
|
||||
};
|
||||
};
|
||||
|
||||
export const common = {
|
||||
alert: '提示',
|
||||
success: '成功',
|
||||
error: '错误',
|
||||
delete: '删除',
|
||||
confirm: '确定',
|
||||
cancel: '取消',
|
||||
};
|
||||
|
||||
@@ -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
95
i18n/zh/mood.ts
Normal 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',
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user