Mercurial > babel > old > babel-test
annotate babel/__init__.py @ 546:b33c36615fe9
rename babel.localedata.list() to ease Python 3 transition (fixes #250)
author | fschwarz |
---|---|
date | Sat, 19 Mar 2011 19:48:23 +0000 |
parents | 85e1beadacb0 |
children |
rev | line source |
---|---|
1 | 1 # -*- coding: utf-8 -*- |
2 # | |
530 | 3 # Copyright (C) 2007-2011 Edgewall Software |
1 | 4 # All rights reserved. |
5 # | |
6 # This software is licensed as described in the file COPYING, which | |
7 # you should have received as part of this distribution. The terms | |
8 # are also available at http://babel.edgewall.org/wiki/License. | |
9 # | |
10 # This software consists of voluntary contributions made by many | |
11 # individuals. For the exact contribution history, see the revision | |
12 # history and logs, available at http://babel.edgewall.org/log/. | |
13 | |
14 """Integrated collection of utilities that assist in internationalizing and | |
15 localizing applications. | |
16 | |
17 This package is basically composed of two major parts: | |
18 | |
19 * tools to build and work with ``gettext`` message catalogs | |
20 * a Python interface to the CLDR (Common Locale Data Repository), providing | |
21 access to various locale display names, localized number and date | |
22 formatting, etc. | |
23 | |
24 :see: http://www.gnu.org/software/gettext/ | |
25 :see: http://docs.python.org/lib/module-gettext.html | |
26 :see: http://www.unicode.org/cldr/ | |
27 """ | |
28 | |
4 | 29 from babel.core import * |
1 | 30 |
31 __docformat__ = 'restructuredtext en' | |
12
a2c54ef107c2
* Removed pkg_resources/setuptools requirement from various places.
cmlenz
parents:
4
diff
changeset
|
32 try: |
388
1c54b64a93bf
More graceful `__version__` initialization when Babel is not installed in a way Setuptools knows about it.
cmlenz
parents:
12
diff
changeset
|
33 from pkg_resources import get_distribution, ResolutionError |
1c54b64a93bf
More graceful `__version__` initialization when Babel is not installed in a way Setuptools knows about it.
cmlenz
parents:
12
diff
changeset
|
34 try: |
1c54b64a93bf
More graceful `__version__` initialization when Babel is not installed in a way Setuptools knows about it.
cmlenz
parents:
12
diff
changeset
|
35 __version__ = get_distribution('Babel').version |
1c54b64a93bf
More graceful `__version__` initialization when Babel is not installed in a way Setuptools knows about it.
cmlenz
parents:
12
diff
changeset
|
36 except ResolutionError: |
1c54b64a93bf
More graceful `__version__` initialization when Babel is not installed in a way Setuptools knows about it.
cmlenz
parents:
12
diff
changeset
|
37 __version__ = None # unknown |
12
a2c54ef107c2
* Removed pkg_resources/setuptools requirement from various places.
cmlenz
parents:
4
diff
changeset
|
38 except ImportError: |
388
1c54b64a93bf
More graceful `__version__` initialization when Babel is not installed in a way Setuptools knows about it.
cmlenz
parents:
12
diff
changeset
|
39 __version__ = None # unknown |