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>
This commit is contained in:
2026-10-08 16:57:09 -04:00
co-authored by Claude Opus 5.5
parent 29dd6dd351
commit 921c0a47bd
9 changed files with 45 additions and 17 deletions
+14
View File
@@ -0,0 +1,14 @@
import { describe, expect, it } from "vitest";
import { counted } from "./counted";
describe("counted", () => {
it("uses the singular for exactly one", () => {
expect(counted(1, "note", "notes")).toBe("1 note");
});
it("uses the plural for everything else, zero included", () => {
expect(counted(0, "note", "notes")).toBe("0 notes");
expect(counted(3, "person", "people")).toBe("3 people");
});
});