mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 07:07:31 +00:00
bee500880e
Finishes the plural work the previous wip commit started. t() picks a count string's form by the language's own Intl.PluralRules, and every locale now spells out the forms its language reaches with whole numbers, about 160 count strings in all: one, few and many in Russian, Ukrainian and Polish, one and few in Czech and Slovak, five forms in Arabic, one in the others, none in Japanese, Korean, Chinese, Thai, Vietnamese and Indonesian. Each language was translated and then reviewed on its own. English no longer reads "1 files", "1 updates available" or "photo(s)". Count labels shown next to a number now take that number too: the atlas and admin statistics, the trip cards, journey and shared trip pills, packing templates, receipts, storage usage, the Studio export note. A heading that shared its key with a counted label keeps a key of its own (the boarding pass heading, the Bookings tab), so languages that put a noun after a number in the singular keep a plural heading. The plugin hosts chip passed its count through .replace() after t() and never got a form; three toasts sent the count as text. Mail and push texts for shared photos and suppressed storage failures pick their form in code through pluralForm. A whole number sent as text counts too, which is how in-app notification params arrive, and the plural rule follows the language of the strings on screen while another one still loads. The parity check knows which forms each language needs and refuses missing and impossible ones. It also reads keys that contain a colon now: it skipped them, which hid 58 missing plugin permission texts in Catalan and 35 in Vietnamese, both translated. The client parity test covers every language of the registry instead of a hand-kept list of 19, and the placeholder spec lets a form spell its number out only where its category is that one number. Brazilian Portuguese error screens were in Breton, and an Arabic dashboard label held Hebrew text.
87 lines
3.5 KiB
TypeScript
87 lines
3.5 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
|
import { pluralForm } from '../plural';
|
|
|
|
const nl: NotificationLocale = {
|
|
email: {
|
|
footer: 'Je ontvangt dit omdat je meldingen hebt ingeschakeld in TREK.',
|
|
manage: 'Voorkeuren beheren',
|
|
madeWith: 'Made with',
|
|
openTrek: 'TREK openen',
|
|
},
|
|
events: {
|
|
trip_invite: (p) => ({
|
|
title: `Uitnodiging voor "${p.trip}"`,
|
|
body: `${p.actor} heeft ${p.invitee || 'een lid'} uitgenodigd voor de reis "${p.trip}".`,
|
|
}),
|
|
booking_change: (p) => ({
|
|
title: `Nieuwe boeking: ${p.booking}`,
|
|
body: `${p.actor} heeft een boeking "${p.booking}" (${p.type}) toegevoegd aan "${p.trip}".`,
|
|
}),
|
|
trip_reminder: (p) => ({
|
|
title: `Reisherinnering: ${p.trip}`,
|
|
body: `Je reis "${p.trip}" komt eraan!`,
|
|
}),
|
|
todo_due: (p) => ({
|
|
title: `Taak verloopt: ${p.todo}`,
|
|
body: `"${p.todo}" in "${p.trip}" verloopt op ${p.due}.`,
|
|
}),
|
|
vacay_invite: (p) => ({
|
|
title: 'Vacay Fusion uitnodiging',
|
|
body: `${p.actor} nodigt je uit om vakantieplannen te fuseren. Open TREK om te accepteren of af te wijzen.`,
|
|
}),
|
|
vacay_share: (p) => ({
|
|
title: 'Vacay-kalender gedeeld',
|
|
body: `${p.actor} heeft zijn/haar vakantiekalender met je gedeeld. Open TREK om deze te bekijken.`,
|
|
}),
|
|
collection_invite: (p) => ({
|
|
title: 'Collectie-uitnodiging',
|
|
body: `${p.actor} nodigt je uit om een collectie te delen. Open TREK om te accepteren of af te wijzen.`,
|
|
}),
|
|
photos_shared: (p) => ({
|
|
title: pluralForm(p.count, 'nl', { one: `${p.count} foto gedeeld`, other: `${p.count} foto's gedeeld` }),
|
|
body: pluralForm(p.count, 'nl', {
|
|
one: `${p.actor} heeft ${p.count} foto gedeeld in "${p.trip}".`,
|
|
other: `${p.actor} heeft ${p.count} foto's gedeeld in "${p.trip}".`,
|
|
}),
|
|
}),
|
|
collab_message: (p) => ({
|
|
title: `Nieuw bericht in "${p.trip}"`,
|
|
body: `${p.actor}: ${p.preview}`,
|
|
}),
|
|
packing_tagged: (p) => ({
|
|
title: `Paklijst: ${p.category}`,
|
|
body: `${p.actor} heeft je toegewezen aan de categorie "${p.category}" in "${p.trip}".`,
|
|
}),
|
|
version_available: (p) => ({
|
|
title: 'Nieuwe TREK-versie beschikbaar',
|
|
body: `TREK ${p.version} is nu beschikbaar. Bezoek het beheerderspaneel om bij te werken.`,
|
|
}),
|
|
replica_failure: (p) => ({
|
|
title: 'Opslagreplica mislukt',
|
|
body:
|
|
`Schrijven naar replica '${p.backend}' is mislukt: ${p.op} van ${p.key} — ${p.error}.` +
|
|
(p.suppressed !== '0'
|
|
? pluralForm(p.suppressed, 'nl', {
|
|
one: ` ${p.suppressed} extra fout is onderdrukt sinds de laatste melding.`,
|
|
other: ` ${p.suppressed} extra fouten zijn onderdrukt sinds de laatste melding.`,
|
|
})
|
|
: ''),
|
|
}),
|
|
synology_session_cleared: () => ({
|
|
title: 'Synology-sessie gewist',
|
|
body: 'Je Synology-account of URL is gewijzigd. Je bent uitgelogd bij Synology Photos.',
|
|
}),
|
|
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
|
|
},
|
|
passwordReset: {
|
|
subject: 'Reset je wachtwoord',
|
|
greeting: 'Hallo',
|
|
body: 'We hebben een verzoek ontvangen om het wachtwoord voor je TREK-account te resetten. Klik op de knop hieronder om een nieuw wachtwoord in te stellen.',
|
|
ctaIntro: 'Wachtwoord resetten',
|
|
expiry: 'Deze link verloopt over 60 minuten.',
|
|
ignore: 'Als jij dit niet hebt aangevraagd, kun je deze e-mail negeren — je wachtwoord blijft ongewijzigd.',
|
|
},
|
|
};
|
|
|
|
export default nl;
|