Skip to content

fix(prefs): correct English picker IDs and add explicit U.S. entry - #60

Merged
got3nks merged 2 commits into
amule-org:masterfrom
got3nks:fix/english-language-picker
Jun 10, 2026
Merged

fix(prefs): correct English picker IDs and add explicit U.S. entry#60
got3nks merged 2 commits into
amule-org:masterfrom
got3nks:fix/english-language-picker

Conversation

@got3nks

@got3nks got3nks commented Jun 10, 2026

Copy link
Copy Markdown

Summary

The Preferences language picker had one English entry mapped to wxLANGUAGE_ENGLISH and labelled "English (U.K.)". wxLANGUAGE_ENGLISH's CanonicalName is "en", not "en_GB", so selecting it saved Language=en and at startup wx looked for an en.mo that does not ship — falling through to the source .pot (American English). The U.K. label silently delivered American English, and there was no way to select American English explicitly or the actual en_GB catalog.

The picker now has two entries:

  • English (U.K.)wxLANGUAGE_ENGLISH_UK → CanonicalName en_GB → loads po/en_GB.mo
  • English (U.S.)wxLANGUAGE_ENGLISH_US → CanonicalName en_US → falls through to the .pot source strings

Cfg_Lang::UpdateChoice special-cases ENGLISH_US so it is marked available without requiring an en_US.mo (the .pot source strings are already American English).

Fixes #58.

Test plan

  • Picker now lists both English (U.K.) and English (U.S.) in Preferences → General → Language → Change Language
  • Selecting English (U.S.) persists Language=en_US to amule.conf (previously: no such option)
  • Selecting English (U.K.) persists Language=en_GB to amule.conf (previously: Language=en)
  • First-run / System default behaviour unchanged
  • Round-trip: picker re-opens on the previously chosen entry after restart
  • Other languages (sanity-checked with French) continue to load their catalogs correctly

Note: po/en_GB.po currently has no populated translations, so the visible UI text is identical between U.S. and U.K. selections today. Populating UK English spellings is a translator-team task and is intentionally out of scope for this PR.

got3nks added 2 commits June 10, 2026 16:32
The language picker had a single English entry using wxLANGUAGE_ENGLISH
labelled "English (U.K.)". wxLANGUAGE_ENGLISH's CanonicalName is "en",
not "en_GB", so selecting it persisted Language=en and at startup wx
looked for an en.mo catalog that does not exist — falling through to the
.pot source strings (American English). The U.K. label was therefore
silently giving American English, and there was no way to pick the
actual en_GB catalog or to pick American English explicitly.

Replace the single entry with two:

  wxLANGUAGE_ENGLISH_UK  → CanonicalName "en_GB", loads po/en_GB.mo
  wxLANGUAGE_ENGLISH_US  → CanonicalName "en_US", source-language fallback

Special-case ENGLISH_US in Cfg_Lang::UpdateChoice so it is marked
available without requiring an en_US.mo catalog to exist on disk
(the .pot source strings are already American English).

Fixes amule-project#58.
Runs scripts/update-po.sh to propagate the new wxTRANSLATE("English (U.S.)")
string from src/Preferences.cpp into amule.pot and merge into all po/*.po
files. New entry lands fuzzy in every translated catalog with the closest
existing string as a hint for translators.

CI "App catalogs in sync with source" check required this.
@got3nks
got3nks merged commit 32f0392 into amule-org:master Jun 10, 2026
9 checks passed
@got3nks
got3nks deleted the fix/english-language-picker branch June 10, 2026 14:44
got3nks added a commit that referenced this pull request Jun 10, 2026
The portability commit changed two msgids -- the two "Terminating /
Killing amuleweb instance with pid '%d' ... " log messages -- from
`%ld` to `%d` to match the new `int` type of `webserver_pid`.
CFormat is type-safe so the rendered output is unchanged, but the
extracted msgids drift so the .pot and every .po has to be regenerated.

msgmerge marked the two updated entries `#, fuzzy` in each catalog
that previously translated them. The only difference between the old
and new msgstr is the same %ld -> %d swap, so this is a mechanical
fix: each affected msgstr has its `%ld` replaced with `%d` and the
fuzzy marker dropped. No human translation work needed -- all
languages keep their existing wording.

Catalogs that already had the entries untranslated, and unrelated
pre-existing fuzzy entries (e.g. the English (U.S.) marker from
PR #60), are left untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In aMule language selection I see English (UK)

1 participant