GNOME Bugzilla – Bug 167650
Please use iso-codes package for language name translations in GDM
Last modified: 2010-06-04 19:38:39 UTC
The file gui/gdmlanguages.c in GDM contains a long list of language names that are all marked for translation. However, translating these language names over and over in different applications is both a tedious, error-prone, and unnecessarily duplicated process for translators. That's why there has been an effort to centralize all these translations of all iso-639 language names into a single package that other applications can then depend upon, namely "iso-codes" (http://www2.iro.umontreal.ca/translation/registry.cgi?domain=iso_639, http://people.debian.org/~mckinstry/iso-codes-0.019.tar.gz). Please use the iso-codes package in GDM and make GDM depend on it, instead of marking the languages for translation in GDM itself. For reference, both Epiphany and Galeon (bug 139781) have already done this.
If you create a patch, I will apply it.
Murray recently used iso-codes for his currency list in Glom; perhaps he can help. The thread started at http://mail.gnome.org/archives/gnome-i18n/2005-March/msg00401.html and the most helpful answer was at http://mail.gnome.org/archives/gnome-i18n/2005-March/msg00409.html.
As far as I can tell, iso-codes has a list of languages (e.g. "en"), but not locales (e.g. "en_US" or "en_US.UTF-8"): http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/iso-codes/iso_639/iso_639.xml?rev=1.24&content-type=text/x-cvsweb-markup&cvsroot=pkg-isocodes If you find a list of locales I'd be interested for Glom.
Can this even be used in GDM? I think we need further information about how you think this should be implemented.
Why couldn't it be used in GDM? It's just an XML file and some gettext translations. This C++ code might give you the idea of how to use it: http://svn.gnome.org/viewcvs/glom/trunk/glom/libglom/data_structure/iso_codes.cc?view=markup
I'd really like to see this happen, too. iso-codes has message catalogs mapping language codes to language names and country codes to country names so you can't directly map en_US -> American English but you can map en -> English US -> United States and combine that like English (United States)
I guess the way to do this is to: 1. Get available locales from local-archive (if it exists) or read directories from /usr/lib/locale 2. Parse locale name into components A_B.C 3. Map A -> language using iso_639.xml 4. Map B -> country using iso_3166.xml 5. Display "language (country)" Sound right? I'm working on this for the gobject branch.
Mostly working: http://svn.gnome.org/viewcvs/gdm2/branches/mccann-gobject/gui/simple-greeter/gdm-language-chooser-widget.c?view=markup
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.