------------------------------------------------------------------------ r11684 | cboos | 2013-02-11 21:57:53 +0100 (Mon, 11 Feb 2013) | 10 lines 1.0.2dev: only list languages for which there's a message catalog. Previously we added to the list all the languages present in the repository. But sometimes a catalog might not be compiled (e.g. if marked as fuzzy), so better only propose a restricted choice consisting only of the languages for which a `messages.mo` file can be found. Fixes #10855. Index: trac/util/translation.py =================================================================== --- trac/util/translation.py (revision 11683) +++ trac/util/translation.py (revision 11684) @@ -337,7 +337,9 @@ try: return [dirname for dirname in pkg_resources.resource_listdir('trac', 'locale') - if '.' not in dirname] + if '.' not in dirname + and pkg_resources.resource_exists( + 'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname)] except Exception: return [] ------------------------------------------------------------------------