]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
rename babel.localedata.list() to ease Python 3 transition (fixes #250)
authorFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Sat, 19 Mar 2011 19:48:23 +0000 (19:48 +0000)
committerFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Sat, 19 Mar 2011 19:48:23 +0000 (19:48 +0000)
babel/localedata.py
babel/messages/frontend.py

index 99cfd0300a72a8560ba0b2c7d3ab4051c3352153..78b23578a9dca072544eb490b88e5df1629b0d73 100644 (file)
@@ -25,7 +25,7 @@ except ImportError:
     import dummy_threading as threading
 from UserDict import DictMixin
 
-__all__ = ['exists', 'list', 'load']
+__all__ = ['exists', 'locale_identifiers', 'load']
 __docformat__ = 'restructuredtext en'
 
 _cache = {}
@@ -45,7 +45,7 @@ def exists(name):
     return os.path.exists(os.path.join(_dirname, '%s.dat' % name))
 
 
-def list():
+def locale_identifiers():
     """Return a list of all locale identifiers for which locale data is
     available.
     
index 6699bb8064cd9610191384998dc13d410837c7ff..a9648955c3066672cd39337587082db4b9b342cc 100755 (executable)
@@ -626,7 +626,7 @@ class CommandLineInterface(object):
 
         self._configure_logging(options.loglevel)
         if options.list_locales:
-            identifiers = localedata.list()
+            identifiers = localedata.locale_identifiers()
             longest = max([len(identifier) for identifier in identifiers])
             identifiers.sort()
             format = u'%%-%ds %%s' % (longest + 1)