Lines 339-349
Link Here
|
339 |
directory is enough. |
339 |
directory is enough. |
340 |
""" |
340 |
""" |
341 |
try: |
341 |
try: |
342 |
return [dirname for dirname |
342 |
locales = [dirname for dirname |
343 |
in pkg_resources.resource_listdir('trac', 'locale') |
343 |
in pkg_resources.resource_listdir('trac', 'locale') |
344 |
if '.' not in dirname |
344 |
if '.' not in dirname |
345 |
and (not check_catalog or pkg_resources.resource_exists( |
345 |
and (not check_catalog or pkg_resources.resource_exists( |
346 |
'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname))] |
346 |
'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname))] |
|
|
347 |
if 'en_US' not in locales: |
348 |
locales.append('en_US') |
349 |
return locales |
347 |
except Exception: |
350 |
except Exception: |
348 |
return [] |
351 |
return [] |
349 |
|
352 |
|
350 |
----------------------------------------------------------------------- |
|
|