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
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"
type="number"
domain={[0, totalHours]}
@@ -295,7 +295,8 @@ const SimulationChart = ({
<YAxis
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}
allowDecimals={false}
tickCount={20}
@@ -353,10 +354,11 @@ const SimulationChart = ({
/>
<CartesianGrid strokeDasharray="1 1" xAxisId="hours" yAxisId="concentration" />
{showDayReferenceLines !== false && [...Array(dispDays).keys()].map(day => (
{showDayReferenceLines !== false && [...Array(dispDays+1).keys()].map(day => (
<ReferenceLine
key={`day-${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={{
value: (day === 0 ? t('refLineRegularPlan') : t('refLineDeviatingPlan')) + ' (' + t('refLineDayX', { x: day+1 }) + ')',
position: 'insideTopRight',

View File

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

View File

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

View File

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