Added first step of babel-based translations.

Change-Id: I34e3f49e96cf6e68306770781e8114e56a6b3556
This commit is contained in:
Monty Taylor 2012-02-20 11:46:46 -08:00
parent b563deb797
commit d8f0c382ef
6 changed files with 1232 additions and 13 deletions

1
babel.cfg Normal file
View File

@ -0,0 +1 @@
[python: **.py]

View File

1214
glance/locale/glance.pot Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,20 @@ tag_build =
tag_date = 0
tag_svn_revision = 0
[compile_catalog]
directory = glance/locale
domain = glance
[update_catalog]
domain = glance
output_dir = glance/locale
input_file = glance/locale/glance.pot
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = glance/locale/glance.pot
[nosetests]
# NOTE(jkoelker) To run the test suite under nose install the following
# coverage http://pypi.python.org/pypi/coverage

View File

@ -21,19 +21,6 @@ import subprocess
from setuptools import setup, find_packages
from setuptools.command.sdist import sdist
# In order to run the i18n commands for compiling and
# installing message catalogs, we use DistUtilsExtra.
# Don't make this a hard requirement, but warn that
# i18n commands won't be available if DistUtilsExtra is
# not installed...
try:
from DistUtilsExtra.auto import setup
except ImportError:
from setuptools import setup
print "Warning: DistUtilsExtra required to use i18n builders. "
print "To build glance with support for message catalogs, you need "
print " https://launchpad.net/python-distutils-extra >= 2.18"
gettext.install('glance', unicode=1)
from glance import version

View File

@ -1,6 +1,9 @@
# Packages needed for dev testing
distribute>=0.6.24
# For translations processing
Babel
# Needed for testing
mox
nose