Add Chinese translations for medication management and personal settings

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

507
i18n/en/health.ts Normal file
View File

@@ -0,0 +1,507 @@
export const 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',
},
};
export const 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',
},
},
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',
},
},
};
export const sleepDetail = {
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.',
},
},
};
export const sleepQuality = {
excellent: {
description: 'You feel refreshed and energized',
recommendation: 'Congratulations on getting quality sleep! If you feel energized, consider moderate exercise to maintain a healthy lifestyle and further reduce stress for optimal sleep.'
},
good: {
description: 'Good sleep quality, decent mental state',
recommendation: 'Your sleep quality is decent but has room for improvement.建议 maintaining regular sleep schedules, avoiding electronic devices before bed, and creating a quiet, comfortable sleep environment.'
},
fair: {
description: 'Fair sleep quality, may affect daytime performance',
recommendation: 'Your sleep needs improvement.建议 establishing a fixed bedtime routine, limiting caffeine intake, ensuring appropriate bedroom temperature, and considering light exercise to improve sleep quality.'
},
poor: {
description: 'Poor sleep quality, attention to sleep health recommended',
recommendation: 'Your sleep quality needs serious attention.建议 consulting a doctor or sleep specialist to check for sleep disorders, while improving sleep environment and habits, avoiding stimulating activities before bed.'
}
};
export const stepsDetail = {
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',
},
};
export const fitnessRingsDetail = {
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',
},
};
export const 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',
},
};
export const basalMetabolismDetail = {
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',
},
};
export const workoutHistory = {
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}}.',
};