mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 07:53:09 +00:00
fix(i18n): the corridor's truncation note takes a singular, and three plurals were wrong anyway
`mobileTrip.rtTruncated` interpolated a count into a sentence naming the stretch once, so at one truncated area it read "1 stretches". Two keys now, picked by the count, the shape this codebase already uses where a number changes its noun. Writing the singular turned up three plurals that were wrong at counts the old one-form key could never reach. Polish and Czech both had the genitive plural with a singular verb, which is right at five and wrong at two; Arabic had the 3 to 10 form, wrong at two and again from eleven. All three now put the count after a colon, where no form has to agree with it. Russian and Ukrainian were already correct at both, since their phrase leads with a locative, and were left alone. The eight languages that keep the singular noun after a numeral differ only in the numeral, which is what they should do.
This commit is contained in:
@@ -187,7 +187,15 @@ function StatusBand({ corridor, t }: { corridor: MRtCorridorController; t: Trans
|
||||
// The phone's own wording, because the desk's ends in "narrow the corridor" and the
|
||||
// corridor width is a control this screen deliberately does not have. What it does
|
||||
// have is the category chips, and fewer of them really is what makes a box fit.
|
||||
if (corridor.truncatedAreas > 0) notes.push(t('mobileTrip.rtTruncated', { count: corridor.truncatedAreas }))
|
||||
// Two keys picked by the count: the i18n layer has no plural engine, so a single key
|
||||
// with {count} in a sentence that names the noun once reads as "1 stretches".
|
||||
if (corridor.truncatedAreas > 0) {
|
||||
notes.push(
|
||||
t(corridor.truncatedAreas === 1 ? 'mobileTrip.rtTruncated.one' : 'mobileTrip.rtTruncated.other', {
|
||||
count: corridor.truncatedAreas,
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
if (corridor.offline) return <Note tone="warn" icon={<WifiOff size={13} strokeWidth={2} />}>{t('mobileTrip.rtSearchOffline')}</Note>
|
||||
if (corridor.error) return <Note tone="warn" icon={<AlertTriangle size={13} strokeWidth={2} />}>{t('roadtrip.poi.failed')}</Note>
|
||||
|
||||
Reference in New Issue
Block a user