mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 09:54:14 +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.
88 lines
3.7 KiB
TypeScript
88 lines
3.7 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
|
import { pluralForm } from '../plural';
|
|
import reservations from './reservations';
|
|
|
|
const et: NotificationLocale = {
|
|
email: {
|
|
footer: 'Said selle kirja, sest oled TREKis teavitused lubanud.',
|
|
manage: 'Halda eelistusi seadetes',
|
|
madeWith: 'Loodud rakendusega',
|
|
openTrek: 'Ava TREK',
|
|
},
|
|
events: {
|
|
trip_invite: (p) => ({
|
|
title: `Reisikutse: „${p.trip}”`,
|
|
body: `${p.actor} kutsus ${p.invitee ? `kasutaja ${p.invitee}` : 'ühe liikme'} reisile „${p.trip}”.`,
|
|
}),
|
|
booking_change: (p) => ({
|
|
title: `Uus broneering: ${p.booking}`,
|
|
body: `${p.actor} lisas reisile „${p.trip}” uue broneeringu „${p.booking}” (tüüp: ${reservations[`reservations.type.${p.type}`] ?? (p.type === 'booking' ? 'broneering' : p.type)}).`,
|
|
}),
|
|
trip_reminder: (p) => ({
|
|
title: `Reisi meeldetuletus: ${p.trip}`,
|
|
body: `Sinu reis „${p.trip}” algab peagi!`,
|
|
}),
|
|
todo_due: (p) => ({
|
|
title: `Ülesande tähtaeg: ${p.todo}`,
|
|
body: `Reisi „${p.trip}” ülesande „${p.todo}” tähtaeg on ${p.due}.`,
|
|
}),
|
|
vacay_invite: (p) => ({
|
|
title: 'Kutse puhkuseplaanide ühendamiseks',
|
|
body: `${p.actor} kutsus sind puhkuseplaane ühendama. Nõustumiseks või keeldumiseks ava TREK.`,
|
|
}),
|
|
vacay_share: (p) => ({
|
|
title: 'Puhkusekalender jagatud',
|
|
body: `${p.actor} jagas sinuga oma puhkusekalendrit. Vaatamiseks ava TREK.`,
|
|
}),
|
|
collection_invite: (p) => ({
|
|
title: 'Kogumiku kutse',
|
|
body: `${p.actor} kutsus sind kogumikku jagama. Nõustumiseks või keeldumiseks ava TREK.`,
|
|
}),
|
|
photos_shared: (p) => ({
|
|
title: pluralForm(p.count, 'et', { one: `Jagatud ${p.count} foto`, other: `Jagatud ${p.count} fotot` }),
|
|
body: pluralForm(p.count, 'et', {
|
|
one: `${p.actor} jagas reisil „${p.trip}” ${p.count} foto.`,
|
|
other: `${p.actor} jagas reisil „${p.trip}” ${p.count} fotot.`,
|
|
}),
|
|
}),
|
|
collab_message: (p) => ({
|
|
title: `Uus sõnum reisil „${p.trip}”`,
|
|
body: `${p.actor}: ${p.preview}`,
|
|
}),
|
|
packing_tagged: (p) => ({
|
|
title: `Pakkimine: ${p.category}`,
|
|
body: `${p.actor} määras sind reisil „${p.trip}” vastutama pakkimiskategooria „${p.category}” eest.`,
|
|
}),
|
|
version_available: (p) => ({
|
|
title: 'TREKi uus versioon on saadaval',
|
|
body: `TREK ${p.version} on nüüd saadaval. Uuendamiseks ava halduspaneel.`,
|
|
}),
|
|
replica_failure: (p) => ({
|
|
title: 'Salvestuskoopia tõrge',
|
|
body:
|
|
`Koopia kirjutamine taustasüsteemi „${p.backend}” ebaõnnestus: toiming ${p.op}, võti ${p.key} — ${p.error}.` +
|
|
(p.suppressed !== '0'
|
|
? pluralForm(p.suppressed, 'et', {
|
|
one: ` Pärast viimast teavitust jäeti veel ${p.suppressed} tõrketeavitus saatmata.`,
|
|
other: ` Pärast viimast teavitust jäeti veel ${p.suppressed} tõrketeavitust saatmata.`,
|
|
})
|
|
: ''),
|
|
}),
|
|
synology_session_cleared: () => ({
|
|
title: 'Synology seanss tühjendatud',
|
|
body: 'Sinu Synology konto või URL muutus. Sind on Synology Photosist välja logitud.',
|
|
}),
|
|
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
|
|
},
|
|
passwordReset: {
|
|
subject: 'Lähtesta oma parool',
|
|
greeting: 'Tere',
|
|
body: 'Saime taotluse sinu TREKi konto parooli lähtestamiseks. Uue parooli määramiseks klõpsa alloleval nupul.',
|
|
ctaIntro: 'Lähtesta parool',
|
|
expiry: 'See link aegub 60 minuti pärast.',
|
|
ignore: 'Kui sa seda ei taotlenud, võid kirja rahulikult eirata — sinu parool ei muutu.',
|
|
},
|
|
};
|
|
|
|
export default et;
|