Update minor i18n changes and updated defaults

This commit is contained in:
2025-12-04 01:26:43 +00:00
parent 509cb33422
commit abae3d54e6
4 changed files with 14 additions and 12 deletions

View File

@@ -282,7 +282,7 @@ const SimulationChart = ({
}; };
return <XAxis return <XAxis
xAxisId="hours" xAxisId="hours"
label={{ value: showDayTimeOnXAxis === 'continuous' ? t('axisLabelHours') : t('axisLabelTimeOfDay'), position: 'insideBottom', offset: -10, style: { fontStyle: 'italic', color: '#666' } }} //label={{ value: showDayTimeOnXAxis === 'continuous' ? t('axisLabelHours') : t('axisLabelTimeOfDay'), position: 'insideBottom', offset: -10, style: { fontStyle: 'italic', color: '#666' } }}
dataKey="timeHours" dataKey="timeHours"
type="number" type="number"
domain={[0, totalHours]} domain={[0, totalHours]}
@@ -295,7 +295,8 @@ const SimulationChart = ({
<YAxis <YAxis
yAxisId="concentration" yAxisId="concentration"
label={{ value: t('axisLabelConcentration'), angle: -90, position: 'insideLeft', offset: '0 -10', style: { fontStyle: 'italic', color: '#666' } }} // FIXME
//label={{ value: t('axisLabelConcentration'), angle: -90, position: 'insideLeft', style: { fontStyle: 'italic', color: '#666' } }}
domain={chartDomain as any} domain={chartDomain as any}
allowDecimals={false} allowDecimals={false}
tickCount={20} tickCount={20}
@@ -353,10 +354,11 @@ const SimulationChart = ({
/> />
<CartesianGrid strokeDasharray="1 1" xAxisId="hours" yAxisId="concentration" /> <CartesianGrid strokeDasharray="1 1" xAxisId="hours" yAxisId="concentration" />
{showDayReferenceLines !== false && [...Array(dispDays).keys()].map(day => ( {showDayReferenceLines !== false && [...Array(dispDays+1).keys()].map(day => (
<ReferenceLine <ReferenceLine
key={`day-${day+1}`} key={`day-${day+1}`}
x={24 * (day+1)} x={24 * (day+1)}
// TODO instead of refLineDeviatingPlan show refLineRegularPlan in case there are no deviations (primary curve for the given day matches the template)
label={{ label={{
value: (day === 0 ? t('refLineRegularPlan') : t('refLineDeviatingPlan')) + ' (' + t('refLineDayX', { x: day+1 }) + ')', value: (day === 0 ? t('refLineRegularPlan') : t('refLineDeviatingPlan')) + ' (' + t('refLineDayX', { x: day+1 }) + ')',
position: 'insideTopRight', position: 'insideTopRight',

View File

@@ -99,12 +99,12 @@ export const getDefaultState = (): AppState => ({
therapeuticRange: { min: '10.5', max: '11.5' }, therapeuticRange: { min: '10.5', max: '11.5' },
doseIncrement: '2.5', doseIncrement: '2.5',
uiSettings: { uiSettings: {
showDayTimeOnXAxis: 'continuous', showDayTimeOnXAxis: '24h',
showTemplateDay: false, showTemplateDay: true,
chartView: 'both', chartView: 'damph',
yAxisMin: '0', yAxisMin: '8',
yAxisMax: '16', yAxisMax: '13',
simulationDays: '3', simulationDays: '4',
displayedDays: '2', displayedDays: '3',
} }
}); });

View File

@@ -44,7 +44,7 @@ export const de = {
axisLabelTimeOfDay: "Tageszeit (h)", axisLabelTimeOfDay: "Tageszeit (h)",
tickNoon: "Mittag", tickNoon: "Mittag",
refLineRegularPlan: "Regulärer Plan", refLineRegularPlan: "Regulärer Plan",
refLineDeviatingPlan: "Abweichung", refLineDeviatingPlan: "Abweichung vom Plan",
refLineDayX: "Tag {{x}}", refLineDayX: "Tag {{x}}",
refLineMin: "Min", refLineMin: "Min",
refLineMax: "Max", refLineMax: "Max",

View File

@@ -44,7 +44,7 @@ export const en = {
axisLabelTimeOfDay: "Time of Day (h)", axisLabelTimeOfDay: "Time of Day (h)",
tickNoon: "Noon", tickNoon: "Noon",
refLineRegularPlan: "Regular Plan", refLineRegularPlan: "Regular Plan",
refLineDeviatingPlan: "Deviation", refLineDeviatingPlan: "Deviation from Plan",
refLineDayX: "Day {{x}}", refLineDayX: "Day {{x}}",
refLineMin: "Min", refLineMin: "Min",
refLineMax: "Max", refLineMax: "Max",