Fix translation setup

Setup project according to
http://docs.openstack.org/infra/manual/creators.html#django-projects
* Fix paths in babel*cfg
* Remove wrong entries in setup.cfg

Right now the translation scrips do not work the configuration and
extract no translation strings. After this change, strings are properly
extracted.

Change-Id: I2c7dcd6bfea3e86a7507bd20888f944dfd00be03
This commit is contained in:
Andreas Jaeger 2016-03-13 08:56:52 +01:00 committed by Andreas Jaeger
parent 57837a3fd3
commit 9f9298e0bc
3 changed files with 5 additions and 14 deletions

View File

@ -1,5 +1,6 @@
[extractors]
django = django_babel.extract:extract_django
[python: ironic_ui/**.py]
[django: ironic_ui/**/templates/**.html]
[python: **.py]
[django: templates/**.html]
[django: **/templates/**.csv]

View File

@ -5,10 +5,10 @@
# details on how this works.
angular = horizon.utils.babel_extract_angular:extract_angular
[javascript: ironic_ui/**.js]
[javascript: **.js]
# We need to look into all static folders for HTML files.
# The **/static ensures that we also search within
# /openstack_dashboard/dashboards/XYZ/static which will ensure
# that plugins are also translated.
[angular: ironic_ui/**/static/**.html]
[angular: **/static/**.html]

View File

@ -33,13 +33,3 @@ upload-dir = doc/build/html
[compile_catalog]
directory = ironic_ui/locale
domain = ironic-ui
[update_catalog]
domain = ironic-ui
output_dir = ironic_ui/locale
input_file = ironic_ui/locale/ironic-ui.pot
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = ironic_ui/locale/ironic_ui.pot