GNU gettext - Bugs: bug #49560, [PATCH]...
You are not allowed to post comments on this tracker with your current authentication level.
bug #49560: [PATCH] _nl_language_preferences_default needs updating for macOS Sierra (10.12)
Submitter: | Kristian Rietveld <krietvel> | ||
Submitted: | Tue 08 Nov 2016 08:01:46 PM UTC | ||
Votes: | 1 | ||
Category: | End-user / runtime | Severity: | 3 - Normal |
Item Group: | None | Status: | Fix Released |
Privacy: | Public | Assigned to: | haible |
Open/Closed: | Closed |
Sat 05 Feb 2022 06:38:53 PM UTC, comment #4: |
Eric Gallager <egallager> |
Mon 15 Nov 2021 12:10:41 AM UTC, comment #3:
|
Eric Gallager <egallager> |
Thu 09 May 2019 07:24:46 PM UTC, comment #2: The fix is contained in the gettext-0.20 release. |
Bruno Haible <haible>![]() ![]() |
Sun 16 Sep 2018 02:58:52 AM UTC, comment #1: Thanks for the report and problem analysis.
It's fixed through https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=aeab87f30d60f17817477901672bcd20083ea2a3
In your patch, you test against "en-". But since the previous call nl_locale_name_canonicalize (buf) converts "en-CC" to "en_CC", I had to test against "en" instead.
Also, For most of the combinations, such as "de_US", "en_DE", etc. no translations are available. To make use of existing translations, I convert "ll-CC" not only to "ll_CC" but to "ll_CC:ll". |
Bruno Haible <haible>![]() ![]() |
Tue 08 Nov 2016 08:01:46 PM UTC, original submission:
_nl_language_preferences_default() (in gettext-runtime/intl/langprefs.c) has a special implementation for macOS. In this function all preferred languages as configured in the Operating System are iterated. As soon as the English language is detected, the iteration is stopped and no further languages are considered. This is because many GNU programs don't ship an en.mo catalog.
The problem is that detection of the English language is no longer working properly on macOS Sierra (10.12), causing preferred languages with a lower priority than English to be considered. This problem has been reported numerous times in the GIMP bug tracker (see https://bugzilla.gnome.org/show_bug.cgi?id=770708).
The attached patch solves the problem. (Although the patch is not against the most recent release of gettext, the code in git HEAD also shows this problem).
Before Sierra, preferred languages were listed as:
en
Starting with Sierra, this has changed to:
en-CA
which is way modification of the string comparison is required. This change is elaborated in the following Apple TechNote: https://developer.apple.com/library/content/technotes/tn2418/_index.html
|
Kristian Rietveld <krietvel> |
Depends on the following items: None found
Items that depend on this one: None found
There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2023-01-04 | haible | Status | Fixed | ![]() |
Fix Released |
2021-11-15 | egallager | Carbon-Copy | - | ![]() |
Added egallager |
2019-04-22 | apjanke | Carbon-Copy | - | ![]() |
Added -email is unavailable- |
2018-09-16 | haible | Status | None | ![]() |
Fixed |
Assigned to | None | ![]() |
haible | ||
Open/Closed | Open | ![]() |
Closed | ||
2016-11-27 | haible | Category | None | ![]() |
End-user / runtime |
2016-11-08 | krietvel | Attached File | - | ![]() |
Added gettext-fix-English-language-fallback-for-macOS-Sierra.patch, #38908 |
comment #3:
Actually never mind; gettext has since been updated in MacPorts, so a backport is now no longer necessary.