After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 604815 - g_get_language_names can return incorrect redundant entries
g_get_language_names can return incorrect redundant entries
Status: RESOLVED DUPLICATE of bug 161087
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-12-17 10:10 UTC by Dan Winship
Modified: 2011-09-22 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
g_get_language_names: don't include redundant languages (3.04 KB, patch)
2009-12-17 10:10 UTC, Dan Winship
none Details | Review

Description Dan Winship 2009-12-17 10:10:26 UTC
if you set LANG to "es_ES:es_MX", g_get_language_names() will return

    es_ES, es, es_MX, es

which, even ignoring the redundancy, is wrong, because it includes generic es before es_MX. It should output

    es_ES, es_MX, es
Comment 1 Dan Winship 2009-12-17 10:10:54 UTC
Created attachment 149900 [details] [review]
g_get_language_names: don't include redundant languages
Comment 2 Christian Persch 2009-12-17 13:37:46 UTC
I made the same request in bug 161087 but it was rejected.
Comment 3 Dan Winship 2009-12-17 14:36:02 UTC
hm... I'd say gettext's behavior is wrong. :-)

i was looking at this in the context of bug 597004 (automatic Accept-Language support in libsoup). if people don't want to change g_get_language_names() I can put the sorting there instead.
Comment 4 Dan Winship 2011-09-22 18:56:17 UTC

*** This bug has been marked as a duplicate of bug 161087 ***