Edgewall Software

Changes between Version 1 and Version 5 of Ticket #10855


Ignore:
Timestamp:
Feb 1, 2013, 12:17:13 AM (11 years ago)
Author:
Christian Boos
Comment:

Maybe we could even have a way to remove them from the list now? (trac.util.translation.get_available_locales() could look for messages.mo files instead of just the directories).

  • trac/util/translation.py

     
    337337
    338338        try:
    339339            return [dirname for dirname
    340340                    in pkg_resources.resource_listdir('trac', 'locale')
    341                     if '.' not in dirname]
     341                    if '.' not in dirname
     342                    and pkg_resources.resource_exists(
     343                    'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname)]
    342344        except Exception:
    343345            return []

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10855

    • Property Owner set to Christian Boos
    • Property Status newassigned
    • Property Milestone1.0.2
  • Ticket #10855 – Release Notes

    v1 v5  
     1Only populate the language menus with languages for which the compiled message catalogs are actually available.