Skip to content

feat(subtitles): select Chinese or English for Chat and Wallpaper - #239

Merged
Lucas1479 merged 3 commits into
mainfrom
codex/subtitle-target-language
Oct 19, 2026
Merged

Lucas1479 merged 3 commits into
mainfrom
codex/subtitle-target-language

Conversation

@Lucas1479

@Lucas1479 Lucas1479 commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Chat and ordinary Wallpaper subtitles already share one translator, but its output was fixed to Simplified Chinese. This adds Subtitle translation language under Settings → General → Language & captions, with Simplified Chinese and English.

The presentation runtime owns the shared preference. All existing translation providers use a per-request language snapshot. Changing the setting refreshes Chat translations and invalidates Wallpaper pretranslations; late results from the old language cannot overwrite current entries. Already visible Wallpaper captions finish their normal playback lifetime, and queued captions are translated under the new policy when playback reaches them.

The default remains zh-CN, so existing configurations need no migration. Chat enablement, Wallpaper display mode, speech, conversation history and Slice process language remain independent. VN retains its separate translator, configuration and cache, including VN captions displayed on Wallpaper. The misleading shared-translation role description is corrected.

Validation

  • python -m pytest -q tests/test_assistant_language.py tests/test_wallpaper_subtitle_translator.py tests/test_chat_translation_subtitle.py tests/test_subtitle_translation_cache.py tests/test_canvas_presentation.py tests/test_config_catalog.py tests/test_vn_subtitle_grouping.py — 69 passed.
  • npm test in electron — 525 passed; subsequently added node --experimental-strip-types --test tests/chatTranslationLanguage.test.mjs — 1 passed.
  • npm run build in electron — passed.
  • electron scripts/smoke-startup-settings.cjs — passed, including offline persistence and the Host application policy for both target languages.
  • python tools/smoke_builtin_handler_catalog.py — passed with models disabled.
  • python -m ruff check ., architecture freshness checks, maintainability ratchet and git diff --check — passed.

Provider responses are synthetic; live translation quality was not evaluated. All 16 CI checks passed on commit 4df7ab75, including the Windows suite and model-less aggregate.

UI comparison

Screenshots use an isolated offline profile. Its save notice reflects the absence of a running backend; connected changes apply live.

Before English selected
Before After

@Lucas1479
Lucas1479 merged commit 633a28e into main Oct 19, 2026
16 checks passed
@Lucas1479
Lucas1479 deleted the codex/subtitle-target-language branch October 19, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant