Files
inkwell/frontend/src/counted.ts
T
bvandeusenandClaude Opus 5.5 921c0a47bd Real plurals: the web's sync messages and Android's tag counts
Web: one counted(n, one, other) helper. The sync screen's three "(s)"
messages (attachments that didn't download, changes refused, files that
didn't upload) now say "1 file" / "2 files". The six hand-written ternaries
(SyncView x2, ImportNotes, GroupList, ShareDialog, LabelsModal) use it too.

Android: tags_count was two strings chosen in code, and is now <plurals>.
The delete confirmation read "It is on 1 notes … removed from all of them"
and now has a one form of its own.

Operator decision on #5371, 2026-10-08.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:57:09 -04:00

6 lines
288 B
TypeScript

// A number and its noun: "1 note", "3 notes". The web is English-only, and English
// has two forms; Android's <plurals> carry the same two (quantity "one" and "other").
export function counted(n: number, one: string, other: string): string {
return `${n} ${n === 1 ? one : other}`;
}