fix(i18n): the video menu's download row says "Download…", and counted copy is pluralized

- The row opens the download dialog, so it is labelled so; the download's state ("Downloaded",
  "In queue") is its hint, not its label.
- The share dialog's expiry ("1 days") and a link's view count ("1 views") go through i18next's
  plural forms (`count`).
This commit is contained in:
2026-09-27 14:50:04 +02:00
parent 17bb14fb18
commit 98bf0a9d66
6 changed files with 102 additions and 9 deletions
+24
View File
@@ -0,0 +1,24 @@
// @vitest-environment jsdom
//
// E28 review J5: a count in copy goes through i18next's plural forms (`count`), never a bare `n` —
// the share dialog's expiry read "1 days".
import { describe, expect, it } from "vitest";
import i18n from "./index";
describe("counted copy", () => {
it("the share link's expiry is singular for one day", async () => {
await i18n.changeLanguage("en");
expect(i18n.t("downloads.share.days", { count: 1 })).toBe("1 day");
expect(i18n.t("downloads.share.days", { count: 7 })).toBe("7 days");
await i18n.changeLanguage("hu");
expect(i18n.t("downloads.share.days", { count: 1 })).toBe("1 nap");
await i18n.changeLanguage("en");
});
it("a link's view count is singular for one view", async () => {
await i18n.changeLanguage("en");
expect(i18n.t("downloads.share.views", { count: 1 })).toBe("1 view");
expect(i18n.t("downloads.share.views", { count: 0 })).toBe("0 views");
});
});