mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 01:28:55 +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:
@@ -141,11 +141,18 @@ describe('MRtCorridorSheet', () => {
|
||||
expect(screen.getByText('roadtrip.poi.capped')).toBeInTheDocument()
|
||||
expect(screen.getByText('roadtrip.poi.partial:2')).toBeInTheDocument()
|
||||
// The phone's own wording: the desk's ends in "narrow the corridor", and the
|
||||
// corridor width is a control this screen does not have.
|
||||
expect(screen.getByText('mobileTrip.rtTruncated:1')).toBeInTheDocument()
|
||||
// corridor width is a control this screen does not have. One stretch takes the
|
||||
// singular key, because one key with {count} in it would read as "1 stretches".
|
||||
expect(screen.getByText('mobileTrip.rtTruncated.one:1')).toBeInTheDocument()
|
||||
expect(screen.queryByText('roadtrip.poi.truncated:1')).toBeNull()
|
||||
})
|
||||
|
||||
it('FE-MOB-RTSRCH-011b: more than one truncated stretch takes the plural key', () => {
|
||||
renderSheet({ answered: true, hits: [hit()], truncatedAreas: 3 })
|
||||
|
||||
expect(screen.getByText('mobileTrip.rtTruncated.other:3')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('FE-MOB-RTSRCH-012: a hit says what it is and where on the drive it sits', () => {
|
||||
renderSheet({ answered: true, hits: [hit()] })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user