Repository navigation
Ship translated catalogs in the release archives and installer - #232
Merged
Merged
Conversation
Release archives get Catalogs/<language> with every translation compiled by FlexCat (catalogs/catalogs.sh, 'make <target> catalogs'). The installer asks which languages to install and copies them to LOCALE:Catalogs/<language>. CI compiles the catalogs in the os3 image for the AROS targets, whose images have no FlexCat.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Releases have never shipped the translated catalogs, so Opus only shows translations when someone installs catalogs by hand.
Changes
catalogs/catalogs.sh buildcompiles everycatalogs/<language>/<name>.ctwith FlexCat, using the matching.cdundersource/, intocatalogs/bin/<language>/, which git ignores. Each catalog is named after its.cd(XADopus.catalog), exceptfont.cd, which givesviewfont.catalog. A catalog is only recompiled when it is missing or older than its.ctor.cd. FlexCat's exit code 5 (warnings about untranslated strings) counts as success. The script replaces the hand-written, Amiga-onlycatalogs/Makefile.make <target> catalogsruns the build.release-packageruns it too, then stages the catalogs under their## languagenames (ISO-8859-1, e.g.espa\xf1ol, as locale.library spells them) and addsCatalogs/<language>/at the archive root./tmp, because macOS volumes, including Docker bind mounts, refuse ISO-8859-1 file names.--system-kanji-code=utf8 --archive-kanji-code=utf8makes it store them unchanged. This also works with the older LHa in the AROS images, which has nolatin1option.askoptionsquestion lists the 11 languages. It preselects the Installer's@languageand any language that already hasLOCALE:Catalogs/<lang>/dopus.catalog, then copies each chosen language toLOCALE:Catalogs/<lang>.LOCALE:, notDOpus5:Catalogs, because dopus5.library opens its catalog when the library is first opened. That is often fromDOpus5:C/LoadDBorLoadDOpusLib, whosePROGDIR:isDOpus5:C, so a catalog inDOpus5:Catalogswould often be missed. ViewFont also lives inDOpus5:C.release-packagethen finds them up to date.InstallerTestscase checks that the installer's two language lists (thechoicesandP_CATALOG_LANGUAGE) match the shipped## languagenames in the same order, and that#cat-countmatches their number.[dopus5 next]entry.Verification
STRSchunks back shows the ISO-8859-1 text unchanged (no UTF-8).make os3 release-packagebuilds an archive withCatalogs/holding 11 languages (211 entries) and the raw ISO-8859-1 names. The packagedInstall DOpus5matches the source byte for byte apart from@BUILD@.catalogs.sh buildskips the prebuilt catalogs without FlexCat, then staging andlhawith the raw-name flags work. When a catalog is out of date, it stops with a clear error.python3 -m unittest archive/tests/test_basedata_default_drawers.py: all 17 tests pass. The new test fails when two languages are swapped in one list. shellcheck reports nothing.Not yet run on a real Installer. The new step (
askoptions,@language,while,makedirofLOCALE:Catalogs/<lang>) still needs one run on OS 3.2 before release. Whether the AROS Installer supports these is also unknown.