feat(health): 新增手腕温度监测和经期双向同步功能
新增手腕温度健康数据追踪,支持Apple Watch睡眠手腕温度数据展示和30天历史趋势分析 实现经期数据与HealthKit的完整双向同步,支持读取、写入和删除经期记录 优化经期预测算法,基于历史数据计算更准确的周期和排卵日预测 重构经期UI组件为模块化结构,提升代码可维护性 添加完整的中英文国际化支持,覆盖所有新增功能界面
This commit is contained in:
@@ -142,6 +142,16 @@ export const statistics = {
|
||||
oxygen: {
|
||||
title: 'Blood Oxygen',
|
||||
},
|
||||
wristTemperature: {
|
||||
title: 'Wrist Temperature',
|
||||
last30Days: 'Last 30 days',
|
||||
syncing: 'Syncing Health data...',
|
||||
noData: 'No wrist temperature data yet',
|
||||
baseline: 'Baseline',
|
||||
average: '30-day avg',
|
||||
latest: 'Latest',
|
||||
vsBaseline: 'vs baseline'
|
||||
},
|
||||
circumference: {
|
||||
title: 'Circumference (cm)',
|
||||
setTitle: 'Set {{label}}',
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as Challenge from './challenge';
|
||||
import * as Common from './common';
|
||||
import * as Diet from './diet';
|
||||
import * as Health from './health';
|
||||
import * as Menstrual from './menstrual';
|
||||
import * as Medication from './medication';
|
||||
import * as Mood from './mood';
|
||||
import * as Personal from './personal';
|
||||
@@ -15,6 +16,7 @@ export default {
|
||||
...Weight,
|
||||
...Challenge,
|
||||
...Mood,
|
||||
...Menstrual,
|
||||
...Common,
|
||||
...Common.common, // 确保通用翻译被正确导出
|
||||
};
|
||||
|
||||
37
i18n/en/menstrual.ts
Normal file
37
i18n/en/menstrual.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
export const menstrual = {
|
||||
dateFormatShort: 'MMM D',
|
||||
card: {
|
||||
title: 'Menstrual cycle',
|
||||
syncingState: 'Syncing',
|
||||
syncingDesc: 'Reading menstrual data…',
|
||||
emptyState: 'Not logged',
|
||||
emptyDesc: 'Tap to record this period',
|
||||
periodState: 'Period',
|
||||
predictedPeriodState: 'Predicted period',
|
||||
periodEndToday: 'Expected to end today ({{date}})',
|
||||
periodEndPrefix: 'Ends in ',
|
||||
periodEndSuffix: ' days ({{date}})',
|
||||
fertileState: 'Fertile window',
|
||||
fertileToday: 'Fertile window starts today',
|
||||
fertileCountdownPrefix: 'Enters fertile window in ',
|
||||
fertileCountdownSuffix: ' days',
|
||||
ovulationState: 'Ovulation',
|
||||
ovulationToday: 'Today is ovulation day',
|
||||
ovulationCountdownPrefix: 'Ovulation in ',
|
||||
ovulationCountdownSuffix: ' days',
|
||||
nextPeriodPrefix: 'Next period in ',
|
||||
nextPeriodSuffix: ' days',
|
||||
},
|
||||
screen: {
|
||||
header: 'Menstrual Cycle',
|
||||
tabs: {
|
||||
cycle: 'Cycle',
|
||||
analysis: 'Analysis',
|
||||
},
|
||||
analysis: {
|
||||
title: 'Analysis',
|
||||
description:
|
||||
'Based on the latest 6 cycles, we will calculate average period and cycle length. Trends and prediction accuracy will be shown here.',
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -127,6 +127,7 @@ export const statisticsCustomization = {
|
||||
water: 'Water Intake',
|
||||
basalMetabolism: 'Basal Metabolism',
|
||||
oxygenSaturation: 'Oxygen Saturation',
|
||||
wristTemperature: 'Wrist Temperature',
|
||||
menstrualCycle: 'Menstrual Cycle',
|
||||
weight: 'Weight',
|
||||
circumference: 'Circumference',
|
||||
|
||||
@@ -143,6 +143,16 @@ export const statistics = {
|
||||
oxygen: {
|
||||
title: '血氧饱和度',
|
||||
},
|
||||
wristTemperature: {
|
||||
title: '手腕温度',
|
||||
last30Days: '最近30天',
|
||||
syncing: '正在同步健康数据...',
|
||||
noData: '暂无手腕温度数据',
|
||||
baseline: '基线',
|
||||
average: '30天均值',
|
||||
latest: '最新值',
|
||||
vsBaseline: '相对基线'
|
||||
},
|
||||
circumference: {
|
||||
title: '围度 (cm)',
|
||||
setTitle: '设置{{label}}',
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as Challenge from './challenge';
|
||||
import * as Common from './common';
|
||||
import * as Diet from './diet';
|
||||
import * as Health from './health';
|
||||
import * as Menstrual from './menstrual';
|
||||
import * as Medication from './medication';
|
||||
import * as Mood from './mood';
|
||||
import * as Personal from './personal';
|
||||
@@ -15,6 +16,7 @@ export default {
|
||||
...Weight,
|
||||
...Challenge,
|
||||
...Mood,
|
||||
...Menstrual,
|
||||
...Common,
|
||||
...Common.common, // 确保通用翻译被正确导出
|
||||
};
|
||||
|
||||
36
i18n/zh/menstrual.ts
Normal file
36
i18n/zh/menstrual.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
export const menstrual = {
|
||||
dateFormatShort: 'M月D日',
|
||||
card: {
|
||||
title: '生理周期',
|
||||
syncingState: '同步中',
|
||||
syncingDesc: '正在读取经期数据…',
|
||||
emptyState: '待记录',
|
||||
emptyDesc: '点击记录本次经期',
|
||||
periodState: '经期',
|
||||
predictedPeriodState: '预测经期',
|
||||
periodEndToday: '预计今日结束({{date}})',
|
||||
periodEndPrefix: '预计',
|
||||
periodEndSuffix: '天后结束({{date}})',
|
||||
fertileState: '排卵期',
|
||||
fertileToday: '今天进入排卵期',
|
||||
fertileCountdownPrefix: '还有',
|
||||
fertileCountdownSuffix: '天进入排卵期',
|
||||
ovulationState: '排卵日',
|
||||
ovulationToday: '今天是排卵日',
|
||||
ovulationCountdownPrefix: '距离排卵日',
|
||||
ovulationCountdownSuffix: '天',
|
||||
nextPeriodPrefix: '距离下次月经',
|
||||
nextPeriodSuffix: '天',
|
||||
},
|
||||
screen: {
|
||||
header: '生理周期',
|
||||
tabs: {
|
||||
cycle: '生理周期',
|
||||
analysis: '分析',
|
||||
},
|
||||
analysis: {
|
||||
title: '分析',
|
||||
description: '基于最近 6 个周期的记录,计算平均经期和周期长度,后续会展示趋势和预测准确度。',
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -127,6 +127,7 @@ export const statisticsCustomization = {
|
||||
water: '饮水',
|
||||
basalMetabolism: '基础代谢',
|
||||
oxygenSaturation: '血氧',
|
||||
wristTemperature: '手腕温度',
|
||||
menstrualCycle: '经期',
|
||||
weight: '体重',
|
||||
circumference: '围度',
|
||||
|
||||
Reference in New Issue
Block a user