ubuntu_language.patch adds the collect_locales_from_ubuntu() function to gnome-languages.c. collect_locales_from_ubuntu() is called from collect_locales() and populates the hash table gnome_available_locales_map via the add_locale() function.
Since the function cc_common_language_get_initial_regions() in gnome-control-center calls gnome_get_all_locales() in gnome-languages.c, which in turn uses the gnome_available_locales_map hash table, it incorrectly grabs the list of languages.
Originally (in 3.6) the call for /usr/share/language-tools/language-options happened directly in the function which populated the list of available languages. To achieve something similar, this could be done:
- Drop the addition of collect_locales_from_ubuntu() and the changes to
collect_locales() from ubuntu_language.patch
- Let cc_common_language_add_user_languages() call
/usr/share/language-tools/language-options directly somehow (via
52_region_language.patch)
Another approach might be to replace the use of gnome_get_all_locales() in cc_common_language_get_initial_regions() with a 'locale -a' list.
@Tim,
I noticed a similar problem at Ask Ubuntu: askubuntu. com/questions/ 616688
http://
So I had a look, and I think the problem lies in two Ubuntu patches, so it hasn't likely been fixed upstream.
* gnome-desktop3, ubuntu_ language. patch center, 52_region_ language. patch
* gnome-control-
ubuntu_ language. patch adds the collect_ locales_ from_ubuntu( ) function to gnome-languages.c. collect_ locales_ from_ubuntu( ) is called from collect_locales() and populates the hash table gnome_available _locales_ map via the add_locale() function.
Since the function cc_common_ language_ get_initial_ regions( ) in gnome-control- center calls gnome_get_ all_locales( ) in gnome-languages.c, which in turn uses the gnome_available _locales_ map hash table, it incorrectly grabs the list of languages.
Originally (in 3.6) the call for /usr/share/ language- tools/language- options happened directly in the function which populated the list of available languages. To achieve something similar, this could be done:
- Drop the addition of collect_ locales_ from_ubuntu( ) and the changes to language. patch
collect_locales() from ubuntu_
- Let cc_common_ language_ add_user_ languages( ) call share/language- tools/language- options directly somehow (via language. patch)
/usr/
52_region_
Another approach might be to replace the use of gnome_get_ all_locales( ) in cc_common_ language_ get_initial_ regions( ) with a 'locale -a' list.