Translate the store entry into the fifteen locales the store uses - #29
Merged
Conversation
IceWhale's maintainer asked for more languages on the upstream PR (IceWhaleTech/CasaOS-AppStore#1024). Their store's own apps -- Jellyfin, Plex, Syncthing, Immich -- all carry the same fifteen, on the same three fields, so that is the set: tagline, description and release_notes, plus tips.before_install, which most apps leave English but which is the text that stops a failed install here. title stays en_US. It is a product name. Product names, monitor names (`Plex local`), environment variables, ports and the on-screen "URL Locked" label stay English in every locale. They are strings a user types or reads on screen, not prose -- a translated `Plex local` names a monitor the pairing rule will not recognise. Two guards had to move, because translating the text created two new ways for it to go quietly wrong: check-release.py tested `version not in notes_text` across the whole release_notes block. With fifteen locales in there, updating one satisfies it while the other fourteen describe the previous release -- the same staleness the check was written for after the store's What's New sat at 1.3.2 for three releases, only harder to see. It now checks each locale separately, and additionally requires all four translated fields to carry an identical locale set, so a language added to the description but not to the release notes fails rather than shipping half-translated. sync-appstore-upstream.py swapped the install-Kuma sentence in English only, which was correct while the tips were English only. Translating them would have shipped fourteen locales telling IceWhale's own users to install Uptime Kuma from the ZimaOS store instead of theirs. The swap is now a per-locale table, every entry required, and the render aborts if any mention of the wrong store survives. Both guards were mutation-tested: a zh_CN release note left at 1.5.0, a locale dropped from tagline only, and a reworded ja_JP install sentence each fail by name, and pass again once restored.
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.
IceWhale's maintainer asked for more languages on the upstream PR (IceWhaleTech/CasaOS-AppStore#1024). Their own apps — Jellyfin, Plex, Syncthing, Immich — all carry the same fifteen locales on the same three fields, so that is the set used here.
What is translated
taglinedescriptionrelease_notestips.before_installtitleen_US— it is a product name.en_US en_GB de_DE el_GR fr_FR hr_HR it_IT ja_JP ko_KR nb_NO pt_PT ru_RU sv_SE tr_TR zh_CNProduct names, monitor names (
Plex local), environment variables, ports and the on-screen URL Locked label stay English in every locale. They are strings a user types or reads on screen, not prose — a translatedPlex localnames a monitor the pairing rule will not recognise, and a translated "URL Locked" sends someone hunting for text the interface never shows.These translations have not been reviewed by native speakers. They are unlikely to be worse than what the store already carries, but that is the honest status.
Two guards had to move
Translating the text created two new ways for it to go quietly wrong, so both are closed in the same change.
check-release.pywas testingversion not in notes_textacross the wholerelease_notesblock. With fifteen locales in there, updating one satisfies the test while the other fourteen describe the previous release — the same staleness this check was added for after the store's What's New sat at 1.3.2 for three releases, only harder to see. It now checks each locale separately, and additionally requires all four translated fields to carry an identical locale set, so a language added to the description but not the release notes fails rather than shipping half-translated.sync-appstore-upstream.pyswapped the install-Kuma sentence in English only, which was correct while the tips were English only. One sentence differs between the two stores: ours carries a single app so it points at the official ZimaOS store for Uptime Kuma, theirs carries Kuma itself. Translating the tips without making the swap per-locale would have shipped fourteen locales telling IceWhale's own users to go and find Kuma in somebody else's store. The swap is now a per-locale table, every entry required, and the render aborts if any mention of the wrong store survives.Verification
Both guards were mutation-tested — the fault reintroduced, the guard watched to fail by name, then restored:
zh_CNrelease note left at 1.5.0FAIL: … release_notes[zh_CN] does not mention 1.5.1ko_KRdropped fromtaglineonlyFAIL: … tagline locales do not match description (missing: ko_KR)ja_JPinstall-Kuma sentence rewordedFAIL: … has no ja_JP install-Kuma sentence matching KUMA_STORE_SENTENCEAlso run, all green:
test-reporters.sh(12 passed),check-release.py,check-compose-networks.py,check-service-additions.py, anddocker compose config --quieton the app-store file (on the ZimaOS host, since Docker is not on this machine). A structural parse there confirms 7 services,titleat one locale and the other four fields at fifteen.Not in this change
The upstream PR is still pinned at 1.3.2 — amd64-only, no AI reporters, three releases behind. Refreshing it to 1.5.1 is the other half of answering that comment and needs a separate push to the fork.