mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36: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.
89 lines
3.8 KiB
TypeScript
89 lines
3.8 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
||
import { pluralForm } from '../plural';
|
||
|
||
const az: NotificationLocale = {
|
||
email: {
|
||
footer: 'Bu məktubu TREK-də bildirişləriniz aktiv olduğu üçün aldınız.',
|
||
manage: 'Seçimləri Tənzimləmələr bölməsində idarə edin',
|
||
madeWith: 'Hazırlanıb:',
|
||
openTrek: 'TREK-i aç',
|
||
},
|
||
events: {
|
||
trip_invite: (p) => ({
|
||
title: `Səyahət dəvəti: “${p.trip}”`,
|
||
body: `${p.actor} ${p.invitee || 'bir üzvü'} “${p.trip}” səyahətinə dəvət etdi.`,
|
||
}),
|
||
booking_change: (p) => ({
|
||
title: `Yeni rezervasiya: ${p.booking}`,
|
||
body: `${p.actor} “${p.trip}” səyahətinə yeni ${p.type} rezervasiyası — “${p.booking}” əlavə etdi.`,
|
||
}),
|
||
trip_reminder: (p) => ({
|
||
title: `Səyahət xatırlatması: ${p.trip}`,
|
||
body: `“${p.trip}” səyahətiniz yaxınlaşır!`,
|
||
}),
|
||
todo_due: (p) => ({
|
||
title: `Tapşırığın son tarixi: ${p.todo}`,
|
||
body: `“${p.trip}” səyahətindəki “${p.todo}” tapşırığının son tarixi: ${p.due}.`,
|
||
}),
|
||
vacay_invite: (p) => ({
|
||
title: 'Vacay birləşdirmə dəvəti',
|
||
body: `${p.actor} sizi tətil planlarını birləşdirməyə dəvət etdi. Qəbul və ya rədd etmək üçün TREK-i açın.`,
|
||
}),
|
||
vacay_share: (p) => ({
|
||
title: 'Vacay təqvimi paylaşıldı',
|
||
body: `${p.actor} tətil təqvimini sizinlə paylaşdı. Baxmaq üçün TREK-i açın.`,
|
||
}),
|
||
collection_invite: (p) => ({
|
||
title: 'Kolleksiya dəvəti',
|
||
body: `${p.actor} sizi kolleksiyanı paylaşmağa dəvət etdi. Qəbul və ya rədd etmək üçün TREK-i açın.`,
|
||
}),
|
||
photos_shared: (p) => ({
|
||
title: pluralForm(p.count, 'az', { one: `${p.count} foto paylaşıldı`, other: `${p.count} foto paylaşıldı` }),
|
||
body: pluralForm(p.count, 'az', {
|
||
one: `${p.actor} “${p.trip}” səyahətində ${p.count} foto paylaşdı.`,
|
||
other: `${p.actor} “${p.trip}” səyahətində ${p.count} foto paylaşdı.`,
|
||
}),
|
||
}),
|
||
collab_message: (p) => ({
|
||
title: `“${p.trip}” səyahətində yeni mesaj`,
|
||
body: `${p.actor}: ${p.preview}`,
|
||
}),
|
||
packing_tagged: (p) => ({
|
||
title: `Baqaj: ${p.category}`,
|
||
body: `${p.actor} sizi “${p.trip}” səyahətində “${p.category}” baqaj kateqoriyasına təyin etdi.`,
|
||
}),
|
||
version_available: (p) => ({
|
||
title: 'Yeni TREK versiyası əlçatandır',
|
||
body: `TREK ${p.version} artıq əlçatandır. Yeniləmək üçün administrator panelinə keçin.`,
|
||
}),
|
||
replica_failure: (p) => ({
|
||
title: 'Yaddaş replikası xətası',
|
||
body:
|
||
`“${p.backend}” replikasına yazmaq mümkün olmadı: ${p.key} üçün ${p.op} — ${p.error}.` +
|
||
(p.suppressed !== '0'
|
||
? pluralForm(p.suppressed, 'az', {
|
||
one: ` Son bildirişdən bəri ${p.suppressed} əlavə xəta gizlədilib.`,
|
||
other: ` Son bildirişdən bəri ${p.suppressed} əlavə xəta gizlədilib.`,
|
||
})
|
||
: ''),
|
||
}),
|
||
synology_session_cleared: () => ({
|
||
title: 'Synology sessiyası təmizləndi',
|
||
body: 'Synology hesabınız və ya URL-iniz dəyişib. Synology Photos sessiyanız bağlanıb.',
|
||
}),
|
||
plugin_notification: (p) => ({
|
||
title: p.title ?? '',
|
||
body: p.body ?? '',
|
||
}),
|
||
},
|
||
passwordReset: {
|
||
subject: 'Parolunuzu sıfırlayın',
|
||
greeting: 'Salam',
|
||
body: 'TREK hesabınızın parolunu sıfırlamaq üçün sorğu aldıq. Yeni parol təyin etmək üçün aşağıdakı düyməyə klikləyin.',
|
||
ctaIntro: 'Parolu sıfırla',
|
||
expiry: 'Bu linkin vaxtı 60 dəqiqədən sonra bitəcək.',
|
||
ignore: 'Bu sorğunu siz göndərməmisinizsə, məktubu nəzərə almaya bilərsiniz — parolunuz dəyişməyəcək.',
|
||
},
|
||
};
|
||
export default az;
|