Skip to content

Locale: fall back through loc_PreferredLanguages when the primary language has no catalog #67

Closed

Description

@sidick

OpenCatalog() only tries the single primary language of the system's
default locale — confirmed via the NDK autodoc's own example: passing
locale=NULL (what src/amiga/catalog.c's catalog_open() does) makes it
search Catalogs/<languageName>/AmiAuth.catalog for just that one
languageName, not the locale's full loc_PrefLanguages[10] list. So today,
if a user's primary language has no AmiAuth translation but their second
preferred language does, AmiAuth silently falls back to English rather than
trying that second choice.

Walk OpenLocale(NULL)->loc_PrefLanguages[] and try each preferred language
in order (stopping at the first one whose catalog actually loads, or falling
back to English if none do) instead of only ever trying the primary one.

Keeps the existing OS 2.04+ CLI / 3.0+ GUI baseline and zero-mandatory-deps
rule — this only changes which catalog gets opened, not whether one is
required; absence of a match for every preferred language still just means
English, same as today.


Formerly scoped much wider ("Translations (locale.library catalogs) +
broader locale-aware formatting"). Narrowed after the translation
infrastructure itself was completed (#105, #106, #107 — see
this comment
for the full rundown) and after checking which of the originally-listed
locale facilities actually apply to AmiAuth's real UI: locale-aware
date/time display doesn't (the only timestamp shown is the CLI CLOCK
command's deliberately fixed, UTC-labeled diagnostic line — reformatting it
per-locale would make it more ambiguous, not less, and the "last-sync time"
example in the original issue was never actually built), and
loc_DecimalPoint/loc_GroupSeparator are a confirmed no-op (no fractional
number is displayed anywhere, and the one large integer — PBKDF2 iteration
count — needs no thousands grouping). This preferred-languages fallback is
the one item that's still real, unimplemented scope.

Activity

  1. added this to the v2 milestone on Jul 20, 2026
  2. sidick commented on Jul 28, 2026

    @sidick
    OwnerAuthor

    Catalog/translation infrastructure is done — the first half of this issue's scope. Across three merged PRs:

    Per Localization: CLI subcommand keywords/ReadArgs field names/ARexx command keywords are deliberately left untranslated (the scripting protocol, not prose), matching this issue's own "do not localize" note.

    Still open, from this issue's second half ("adopt locale facilities AmiAuth doesn't use yet"), none of which is started:

    • Locale-aware date/time display (loc_ShortDateFormat, 12h vs 24h) wherever a timestamp is shown.
    • loc_DecimalPoint/loc_GroupSeparator for any numeric display (may end up a no-op — worth checking first, per the original issue note).
    • loc_PreferredLanguages to pick the best-available catalog rather than only the primary locale's language.

    Leaving this open for that remaining scope.

  3. changed the title [-]Translations (locale.library catalogs) + broader locale-aware formatting[/-] [+]Locale: fall back through loc_PreferredLanguages when the primary language has no catalog[/+] on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions