bugGNU 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)

Submitted by:  Kristian Rietveld <krietvel>
Submitted on:  Tue 08 Nov 2016 08:01:46 PM UTC  
Category: End-user / runtimeSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

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:


Starting with Sierra, this has changed to:


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>


Attached Files
file #38908:  gettext-fix-English-language-fallback-for-macOS-Sierra.patch added by krietvel (1KiB - application/octet-stream - Proposed patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by krietvel (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 12:19:24 PM UTChaibleCategoryNone=>End-user / runtime
    Tue 08 Nov 2016 08:01:46 PM UTCkrietvelAttached File-=>Added gettext-fix-English-language-fallback-for-macOS-Sierra.patch, #38908

    Back to the top

    Powered by Savane 3.1-cleanup1