Repository navigation
Add localization infrastructure via locale.library catalogs (#67 Phase 1) - #105
Merged
Merged
Conversation
…e 1) Centralizes user-visible strings behind AmigaOS's standard locale.library catalog system (OS 2.1+) so community translations drop into LOCALE:Catalogs/<language>/AmiAuth.catalog without a rebuild, with English built-ins as the always-available fallback - the same optional-feature pattern used throughout this codebase (absence of locale.library, or of a matching catalog, is never an error). - locale/AmiAuth.cd is the single source of truth for translatable strings (standard catcomp/FlexCat format); `make catalog-strings` regenerates the checked-in src/core/catalog_strings.h via a vendored FlexCat build (tools/fetch-flexcat.sh), never a runtime or shipped dependency. - src/core/catalog.h/.c (portable + host stub) and src/amiga/catalog.c (real OpenLibrary/OpenCatalog/GetCatalogStr backend) provide one MSG(id) macro usable identically at every call site, host or Amiga. - A representative slice of 17 strings (CLI errors/status, GUI requesters, account list column headers) is migrated as a proof of the pattern; the full ~150-180-string migration and locale-aware date/number formatting are follow-up work. - Tests: host stub-contract test, plus a real on-target Copperline test booting two CLI binaries (real and a deliberately-nonexistent locale.library name) to prove both the "catalog present" and "library entirely absent" fallback paths on real 68k hardware. - New userdocs/Localization.md for users and translators. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5bAsAyoYLpkX3rWwrTBPh
…entry
MSG_CLI_ERR/MSG_CLI_ALREADY_EXISTS had the literal brand name baked into
the translatable text ("AmiAuth: %s\n") - translators would have had to
copy it verbatim into every language for no reason. Pass it as a %s
argument instead, matching MSG_CLI_USAGE_RUNAS's existing convention.
That left MSG_CLI_ERR as literally "%s: %s\n" - its payload is
vault_err()'s own text, not yet migrated (Phase 2), so there was nothing
left to translate. Dropped it from the Phase 1 slice entirely and reverted
its call sites to the original hardcoded literal; id 0 stays unused/
reserved for when vault_err()'s strings are migrated for real.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5bAsAyoYLpkX3rWwrTBPh
This was referenced Jul 28, 2026
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
LOCALE:Catalogs/<language>/AmiAuth.catalogwithout a rebuild. Absence of locale.library, or of a matching catalog, is never an error — English built-ins are always the fallback.locale/AmiAuth.cdis the single source of truth (standard catcomp/FlexCat.cdformat);make catalog-stringsregenerates the checked-insrc/core/catalog_strings.hvia a vendored FlexCat build (tools/fetch-flexcat.sh) — a host-only build tool, never a runtime or shipped dependency.src/core/catalog.h/.c(portable + host stub) andsrc/amiga/catalog.c(real backend) provide oneMSG(id)macro usable identically at every call site, host or Amiga.userdocs/Localization.mdfor both users (installing a translation) and translators (contributing one).Test plan
make test— 393/393 host unit tests pass (newtest_catalog.ccovers the host stub contract)make m68k-docker/make gui-docker— both build clean, zero warningsmake catalog-nolib-onhw-docker— builds a test-only CLI variant with a deliberately-nonexistentlocale.librarynamemake catalog-onhw-smoke— new on-target test: boots WB 3.2 under Copperline, runs both the real CLI binary and the nonexistent-library variant in the same boot, asserts both produce identical correct English output (proves both the "catalog present, skipped" and "library entirely absent" fallback paths on real 68k hardware)make gui-smoke/make arexx-onhw-smoke— no regression in prior on-target workmake guide— AmigaGuide docs build (newLocalization.mdpage included)Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
https://claude.ai/code/session_01K5bAsAyoYLpkX3rWwrTBPh