feat(i18n): 增强生理周期模块的国际化支持,添加多语言格式和翻译

This commit is contained in:
richarjiang
2025-12-18 09:36:08 +08:00
parent 4836058d56
commit feb5052fcd
11 changed files with 192 additions and 52 deletions

View File

@@ -1,10 +1,12 @@
import { Colors } from '@/constants/Colors';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { STATUS_COLORS } from './constants';
import { DayCellProps } from './types';
export const DayCell: React.FC<DayCellProps> = ({ cell, isSelected, onPress }) => {
const { t } = useTranslation();
const status = cell.info?.status;
const colors = status ? STATUS_COLORS[status] : undefined;
@@ -32,7 +34,7 @@ export const DayCell: React.FC<DayCellProps> = ({ cell, isSelected, onPress }) =
{cell.label}
</Text>
</View>
{cell.isToday && <Text style={styles.todayText}></Text>}
{cell.isToday && <Text style={styles.todayText}>{t('menstrual.today')}</Text>}
</TouchableOpacity>
);
};