Browse Source

Added babel/gettext build support.

changes/30/930/1
Monty Taylor 11 years ago
parent
commit
00808c08c6
  1. 2
      babel.cfg
  2. 2130
      locale/nova.pot
  3. 14
      setup.cfg
  4. 15
      setup.py

2
babel.cfg

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

2130
locale/nova.pot
File diff suppressed because it is too large
View File

14
setup.cfg

@ -8,3 +8,17 @@ tag_build =
tag_date = 0
tag_svn_revision = 0
[compile_catalog]
directory = locale
domain = nova
[update_catalog]
domain = nova
output_dir = locale
input_file = locale/nova.pot
[extract_messages]
keywords = _ l_ lazy_gettext
mapping_file = babel.cfg
output_file = locale/nova.pot

15
setup.py

@ -57,14 +57,25 @@ class local_sdist(sdist):
changelog_file.write(str_dict_replace(changelog, mailmap))
sdist.run(self)
nova_cmdclass= { 'sdist': local_sdist,
'build_sphinx' : local_BuildDoc }
try:
from babel.messages import frontend as babel
nova_cmdclass['compile_catalog'] = babel.compile_catalog
nova_cmdclass['extract_messages'] = babel.extract_messages
nova_cmdclass['init_catalog'] = babel.init_catalog
nova_cmdclass['update_catalog'] = babel.update_catalog
except:
pass
setup(name='nova',
version=version.canonical_version_string(),
description='cloud computing fabric controller',
author='OpenStack',
author_email='nova@lists.launchpad.net',
url='http://www.openstack.org/',
cmdclass={ 'sdist': local_sdist,
'build_sphinx' : local_BuildDoc },
cmdclass=nova_cmdclass,
packages=find_packages(exclude=['bin', 'smoketests']),
include_package_data=True,
test_suite='nose.collector',

Loading…
Cancel
Save