Repository navigation
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
apps/kando/locales/{en,zh-Hans,zh-Hant,ja,ko}.json(en is the catalog source), called through the generatedlocales.Xxx(...)functions. zh-Hans is the previous text byte for byte, so the Chinese interface is unchanged.groupPlayback,groupHelp, …) with localized titles, since the same strings were used to order and build the menu bar.subtitle.TargetLanguageName) names a target language on every screen.packages/coreandpackages/mediano longer carry UI text: site names (core.Link.Siteis now an ID, named byfilms/sitename), whisper model blurbs and yt-dlp update hints moved into the app.feedbackIssueLanguage), so the maintainers' issues share one set of headings; the dialog itself is localized.TestMain(locales/testlocale), so the existing assertions are untouched; every area adds an English test (TestSettingsInEnglish,TestPlayerInEnglish, …).locales/catalog_test.gorequires every message in all five catalogs.READMEs and screenshots
docs/assets/<language>/pictures.KANDO_SCREENSHOTS_LANGrenders 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).TestScreenshotsReadmerenders the four README pictures.Fixes found along the way
BeginUploadstored the bare path whileUploadViewcompared it withuploadMemo(kind + path). Regression testTestUploadSaysTheVideoIsMissing.Screenshots
Before: the English README showed the Chinese interface.
After: the library in English, Japanese, Korean and Traditional Chinese.
The player in English, and Settings › General before and after.
Notes for review
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-HantKANDO_SCREENSHOTS=… KANDO_SCREENSHOTS_LANG=<lang> go test ./apps/kando -run TestScreenshotsReadmefor all five languages