Skip to content

feat: interface in five languages, and each README in its own language - #36

Merged
houko merged 2 commits into
mainfrom
feat/i18n
Nov 9, 2026
Merged

houko merged 2 commits into
mainfrom
feat/i18n

Conversation

@houko

@houko houko commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

The READMEs mixed languages: the English, Japanese, Korean and Traditional Chinese ones quoted Simplified Chinese UI labels and all five showed the same Chinese screenshots. The root cause was the app itself: every interface string was hard-coded Simplified Chinese, and the existing Interface language switch (English / 简体中文) only changed MyGo's own controls.

This moves the whole interface into MyGo's message catalogs and ships it in five languages, then rewrites each README in its own language with its own screenshots.

Interface

  • 755 messages in apps/kando/locales/{en,zh-Hans,zh-Hant,ja,ko}.json (en is the catalog source), called through the generated locales.Xxx(...) functions. zh-Hans is the previous text byte for byte, so the Chinese interface is unchanged.
  • Settings › General › Interface language offers all five, each named in itself; the window switches at once. Simplified Chinese stays the default.
  • Text is produced when it is drawn, so a language change applies to everything on screen, including states found earlier (the sidebar status line, upload and connection-test results, the palette's answer cards).
  • Shortcut groups are now IDs (groupPlayback, groupHelp, …) with localized titles, since the same strings were used to order and build the menu bar.
  • Data is not translated: target languages stored in settings.json and library.json, font family values, prompts sent to the model, and patterns matched against yt-dlp's output stay as they are and are mapped to localized names where shown. One function (subtitle.TargetLanguageName) names a target language on every screen.
  • packages/core and packages/media no longer carry UI text: site names (core.Link.Site is now an ID, named by films/sitename), whisper model blurbs and yt-dlp update hints moved into the app.
  • Feedback issues opened on GitHub stay in Simplified Chinese whatever the interface language (feedbackIssueLanguage), so the maintainers' issues share one set of headings; the dialog itself is localized.
  • Tests pin zh-Hans in each package's TestMain (locales/testlocale), so the existing assertions are untouched; every area adds an English test (TestSettingsInEnglish, TestPlayerInEnglish, …). locales/catalog_test.go requires every message in all five catalogs.
  • AGENTS.md gains the rule for adding interface text.

READMEs and screenshots

  • Each README quotes the labels of its own interface language and shows docs/assets/<language>/ pictures.
  • KANDO_SCREENSHOTS_LANG renders the screenshot scenes in a given language, with a demo library for that reader (library names, film titles, and subtitles translated into the reader's language; English shows Spanish subtitles). TestScreenshotsReadme renders the four README pictures.
  • The Chinese README no longer mixes in English terms (token, client id, inode, …).

Fixes found along the way

  • Upload: the "video file is missing" error never showed, because BeginUpload stored the bare path while UploadView compared it with uploadMemo (kind + path). Regression test TestUploadSaysTheVideoIsMissing.
  • The library's Local Video pill was a fixed 104 pt and cut longer labels; it now grows with its label.
  • Connection-test results compared against the Chinese text "连接成功", which would have shown a passed test as an error after a language change.

Screenshots

Before: the English README showed the Chinese interface.

before: library

After: the library in English, Japanese, Korean and Traditional Chinese.

after: library, English
after: library, Japanese
after: library, Korean
after: library, Traditional Chinese

The player in English, and Settings › General before and after.

after: player, English
before: settings general
after: settings general, English

Notes for review

  • Translations into zh-Hant, ja and ko were written without a native reviewer; a pass by native speakers is worth doing, especially for menu items, which follow Apple's wording.
  • MyGo ships its own control strings for ja, zh-Hans and zh-Hant but not ko, so in Korean a few MyGo-provided texts (for example standard panel buttons) fall back to English.
  • Messages produced at the moment of an event (message-bar notices, save errors, the 1.4 s player flash) keep the language they were produced in until the next one.

Test plan

  • gofmt -l, go vet ./..., go tool mygo vet ., go tool mygo i18n check . (755 messages in 5 languages)
  • CGO_ENABLED=0 go test ./packages/core/... ./packages/media/... ./apps/kando/...
  • go tool mygo build apps/kando: the bundle declares en, ja, ko, zh-Hans, zh-Hant
  • KANDO_SCREENSHOTS=… KANDO_SCREENSHOTS_LANG=<lang> go test ./apps/kando -run TestScreenshotsReadme for all five languages
  • Not exercised by hand in the running app

@github-actions github-actions Bot added area: app The app shell and state in apps/kando area: ui The screens: sidebar, films, film, settings, account and cheatsheet area: cloud Google sign-in and uploads (apps/kando/cloud) area: i18n Translations (apps/kando/locales) area: core packages/core area: media The media pipeline (packages/media) area: docs Markdown files and agent rules feature A new feature (feat) size/XL 1000 or more changed lines labels Nov 9, 2026
houko added 2 commits November 9, 2026 16:57
Every interface string moves into MyGo's message catalogs, apps/kando/locales/{en,zh-Hans,zh-Hant,ja,ko}.json (755 messages, en the source), called through the generated locales functions. zh-Hans is the previous text byte for byte. Settings › General › Interface language offers all five, named in themselves, and the window switches at once; Simplified Chinese stays the default.

Text is produced when it is drawn, so a language change reaches states found earlier. Shortcut groups become IDs with localized titles. Stored values (target languages, font families), prompts sent to the model and patterns matched against yt-dlp output stay as they are and are named for display; subtitle.TargetLanguageName names a target language on every screen. packages/core and packages/media no longer carry UI text. Feedback issues stay in Simplified Chinese for the maintainers.

Tests pin zh-Hans in each package's TestMain (locales/testlocale); each area adds an English test, and locales/catalog_test.go requires every message in all five catalogs. AGENTS.md gains the rule for interface text.

Also fixes the upload's missing-video error, which never showed because BeginUpload stored the bare path where UploadView compared the memo key; lets the Local Video pill grow with its label; and stops comparing the connection test's result with its Chinese text.
Each README quotes the labels of its own interface language and shows docs/assets/<language>/ pictures, rendered by TestScreenshotsReadme with KANDO_SCREENSHOTS_LANG and a demo library for that language's reader. The Chinese README drops the English terms it mixed in.
@houko
houko merged commit 27ef546 into main Nov 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: app The app shell and state in apps/kando area: cloud Google sign-in and uploads (apps/kando/cloud) area: core packages/core area: docs Markdown files and agent rules area: i18n Translations (apps/kando/locales) area: media The media pipeline (packages/media) area: ui The screens: sidebar, films, film, settings, account and cheatsheet feature A new feature (feat) size/XL 1000 or more changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant