GNOME Bugzilla – Bug 660725
Language pane doesn't detect all available languages
Last modified: 2011-10-07 14:23:31 UTC
The regional settings panel looks like it plucked some code from gdm to determine the list of all available languages. Contained within it does this: if (!collect_locales_from_archive ()) { ... collect_locales_from_directory (); } ie: the locales directory is only consulted if the locale archive was non-existent or invalid. This isn't how the libc works. It first consults the locales archive, but then looks at the contents of the directory as a fallback if the named locale isn't contained in the archive. I suspect the correct fix is to collect_locales_from_directory() always.
In fact, I'd say that there is an argument for promoting those languages that appear specifically in the directory to the default list of languages (since it is clear that the user took some effort to directly install them in this case).
(In reply to comment #0) > The regional settings panel looks like it plucked some code from gdm to > determine the list of all available languages. Contained within it does this: > > if (!collect_locales_from_archive ()) { > ... > collect_locales_from_directory (); > } > > > ie: the locales directory is only consulted if the locale archive was > non-existent or invalid. > > This isn't how the libc works. It first consults the locales archive, but then > looks at the contents of the directory as a fallback if the named locale isn't > contained in the archive. In the future, please include links to the code that does that, so I don't need to go second guess you. http://repo.or.cz/w/glibc.git/blob/HEAD:/locale/findlocale.c#l62 > I suspect the correct fix is to collect_locales_from_directory() always. Yup. (In reply to comment #1) > In fact, I'd say that there is an argument for promoting those languages that > appear specifically in the directory to the default list of languages (since it > is clear that the user took some effort to directly install them in this case). In the case of a distribution where the locales are pick'n'choose, which is weird to begin with.
mmit 760430c55c851fe45ade2a0fe6a9f4f32c553ac4 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 7 15:19:38 2011 +0100 common: Always collect locales from the directory Even if those locales do not exist in the locale-archive file, their definition could be in the locale directories. The glibc will look in directories as well when the locale-archive doesn't contain it, so both behaviours match. See also: http://repo.or.cz/w/glibc.git/blob/HEAD:/locale/findlocale.c#l62 https://bugzilla.gnome.org/show_bug.cgi?id=660725