From 1cbd2ef9b56f2968e30a977d623fb714ab62b324 Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 13 Jul 2026 13:08:52 -0700 Subject: [PATCH] refactor(tsukihime): rename tabs from English/Japanese to secondary/prim - Tab identifiers and DOM IDs now reflect role (secondary/primary) not language - State type `tsukihimeActiveTab` updated from `'en' | 'ja'` to `'secondary' | 'primary'` - Docs and config comments updated to match --- changes/tsukihime-english-subtitles.md | 2 +- config.example.jsonc | 6 +-- docs-site/public/config.example.jsonc | 6 +-- docs-site/tsukihime-integration.md | 6 +-- src/config/definitions/options-core.ts | 2 +- src/config/definitions/template-sections.ts | 2 +- src/core/services/anki-jimaku-ipc.test.ts | 4 +- src/renderer/index.html | 6 +-- src/renderer/modals/tsukihime.test.ts | 47 +++++++++++++++++---- src/renderer/modals/tsukihime.ts | 45 ++++++++++---------- src/renderer/state.ts | 4 +- src/renderer/utils/dom.ts | 8 ++-- 12 files changed, 83 insertions(+), 55 deletions(-) diff --git a/changes/tsukihime-english-subtitles.md b/changes/tsukihime-english-subtitles.md index a2f31f25..ee20bd7a 100644 --- a/changes/tsukihime-english-subtitles.md +++ b/changes/tsukihime-english-subtitles.md @@ -1,4 +1,4 @@ type: added area: overlay -- Added a TsukiHime integration for downloading English (and Japanese) subtitles, mirroring the Jimaku flow: `Ctrl+Shift+T` (configurable via `shortcuts.openTsukihime`) opens an in-overlay modal with two language tabs (the first follows `secondarySub.secondarySubLanguages`, defaulting to English; the second is Japanese) that parses the current video filename, searches TsukiHime releases, lists extracted text subtitle tracks filtered by the active tab, then downloads the chosen track, decompresses it (requires the `xz` binary), saves it next to the video with a language suffix (`