mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 17:41:51 +00:00
wip(i18n): plural forms through Intl.PluralRules
Unfinished, continued in the next session: t() resolves key.one/.few/... by the language's own plural rule, the parity check knows which forms a language needs, 16 singular/plural key pairs are merged in every locale and every count === 1 branch in the client uses the plural form. Still open: the forms each locale needs for the remaining count strings, the two new labels in every locale, and 35 tests that expect the old English wording.
This commit is contained in:
@@ -247,7 +247,7 @@ describe('AirTrailConnectionSection', () => {
|
||||
await screen.findByDisplayValue('https://air.example.com');
|
||||
await user.click(screen.getByRole('button', { name: /Test connection/ }));
|
||||
|
||||
await screen.findByText('Connected — 12 flight(s) found');
|
||||
await screen.findByText('Connected. 12 flights found');
|
||||
expect(screen.getByText('Connected')).toBeInTheDocument();
|
||||
expect(body).toEqual({ url: 'https://air.example.com', allowInsecureTls: false });
|
||||
});
|
||||
@@ -263,7 +263,7 @@ describe('AirTrailConnectionSection', () => {
|
||||
await screen.findByDisplayValue('https://air.example.com');
|
||||
await user.click(screen.getByRole('button', { name: /Test connection/ }));
|
||||
|
||||
expect(await screen.findByText('Connected — 0 flight(s) found')).toBeInTheDocument();
|
||||
expect(await screen.findByText('Connected. 0 flights found')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-COMP-AIRTRAIL-015: a refused test shows the returned error and keeps the badge off', async () => {
|
||||
|
||||
@@ -319,7 +319,7 @@ describe('OfflineTab', () => {
|
||||
expect(screen.getByRole('button', { name: 'Downloading…' })).toBeDisabled();
|
||||
|
||||
await act(async () => { release(); });
|
||||
expect(await screen.findByText('Stored 4 trip(s) on this device')).toBeInTheDocument();
|
||||
expect(await screen.findByText('Stored 4 trips on this device')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Download for offline use' })).toBeEnabled();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user