Christian Boos  committed 4ddbc8b

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 `` file can be

Fixes #10855.

  • Participants
  • Parent commits 09a5830
  • Branches 1.0-stable

Comments (0)

Files changed (1)

File trac/util/

             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/' % dirname)]
         except Exception:
             return []