feat(i18n): the server's closed English vocabularies named in the reader's language (E30 S2)
- lib/vocab + the `vocab` locale area: TMDB crew jobs and departments, auto-tags (D1 A: the data
stays English, the catalog is named at its one source, useTags), built-in download profiles,
YouTube topics; held key-for-key to the backend's own lists by backendIds.contract.
- Countries by ISO code: TMDB parse stores {code, name}; rows stored before are coded from TMDB's
own country list in one request (run_enrich); Intl names them, historic codes (YU, SU, XI…)
from the catalog.
- Player tracks named from the language tag, forced/SDH flags and codec tail, not Plex's
server-language displayTitle; no invented "Audio N" on the server.
- Download lifecycle notices (shared / expiring / expired / evicted) named from data; the share
notice carries the title.
- Scheduler: the job result rides along as data and is named per key (dashboard + run notice).
- Invite status named; a render crash's notice no longer shows the engine's English message.
- Fix: YouTube links …/wiki/Humour, the tagger looked for "Humor" — Comedy never came from a topic.
This commit is contained in:
@@ -330,3 +330,37 @@ describe("NotificationsPanel · the page's background menu", () => {
|
||||
expect(menuRows()).toEqual(["inbox.markAllRead"]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("a download-lifecycle notice (E30)", () => {
|
||||
it("is named from its data in the reader's language, never the server's English title", () => {
|
||||
h.server = [
|
||||
server(1, {
|
||||
type: "download_shared",
|
||||
title: "Cats was shared with you",
|
||||
body: null,
|
||||
data: { kind: "download_shared", from: "a@b.c", title: "Cats" },
|
||||
} as never),
|
||||
server(2, {
|
||||
type: "download_expiring",
|
||||
title: "Dogs",
|
||||
data: { kind: "download_expiring", title: "Dogs" },
|
||||
} as never),
|
||||
server(3, {
|
||||
type: "download_expired",
|
||||
title: "download", // an untitled video: the server's English fallback word
|
||||
data: { kind: "download_expired", title: null },
|
||||
} as never),
|
||||
server(4, {
|
||||
type: "download_evicted",
|
||||
title: "Birds",
|
||||
data: { kind: "download_evicted", title: "Birds" },
|
||||
} as never),
|
||||
];
|
||||
mount();
|
||||
for (const key of ["downloadShared", "downloadExpiring", "downloadExpired", "downloadEvicted"])
|
||||
expect(screen.getByText(`inbox.${key}.title`)).toBeTruthy();
|
||||
for (const title of ["Cats", "Dogs", "Birds"]) expect(screen.getByText(title)).toBeTruthy();
|
||||
expect(screen.queryByText("Cats was shared with you")).toBeNull();
|
||||
expect(screen.queryByText("download")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user