fix(prefs): correct English picker IDs and add explicit U.S. entry - #60
Merged
Merged
Conversation
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.
2 tasks
3 tasks
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.
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
The Preferences language picker had one English entry mapped to
wxLANGUAGE_ENGLISHand labelled "English (U.K.)".wxLANGUAGE_ENGLISH'sCanonicalNameis"en", not"en_GB", so selecting it savedLanguage=enand at startup wx looked for anen.mothat 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 actualen_GBcatalog.The picker now has two entries:
wxLANGUAGE_ENGLISH_UK→ CanonicalNameen_GB→ loadspo/en_GB.mowxLANGUAGE_ENGLISH_US→ CanonicalNameen_US→ falls through to the.potsource stringsCfg_Lang::UpdateChoicespecial-casesENGLISH_USso it is marked available without requiring anen_US.mo(the.potsource strings are already American English).Fixes #58.
Test plan
English (U.K.)andEnglish (U.S.)inPreferences → General → Language → Change LanguageEnglish (U.S.)persistsLanguage=en_UStoamule.conf(previously: no such option)English (U.K.)persistsLanguage=en_GBtoamule.conf(previously:Language=en)System defaultbehaviour unchangedNote:
po/en_GB.pocurrently 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.