Commit Graph

4 Commits

Author SHA1 Message Date
Akihiro Motoki 412c3c87e9 translation: drop babel extractor definitions
babel extractors are now registered via python entry points,
so there is no need to declare babel extractors in babel configs.

This change is important to make translation work in Django 2.2.
django-babel does not work with Django 2.2 and looks unmaintained
for over two years. The horizon team is thinking to switch the extractor
to enmerkar (a fork of django-babel) to make extraction of translation
string work again near future. It is important to drop the extractor
definition to make the transition smooth.

Change-Id: I6af7b37f310a8c76155c9686a78608cde0adccd8
2019-12-27 02:03:39 +09:00
Akihiro Motoki 3bb4264dab i18n: Extract strings from template files
Previously babel-django.cfg was configured to look up
template files only in $TOP_DIR/templates.
Templates dierctories in deeper directories
are not covered and all template files are located there.
As a result, Django templates cannot be translated.

Change-Id: I8c662ee2358afbf120464fdffeb72f8515e5a49c
2019-03-29 18:41:00 +09:00
Andreas Jaeger 9f9298e0bc 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
2016-03-13 08:00:06 +00:00
Andreas Jaeger 2533a8dd39 Translation setup
Setup translation for this repo as django project following the
common setup as documented in
http://specs.openstack.org/openstack-infra/infra-specs/specs/translation_setup.html

This adds the django babel files and removes the default one which will
not work with django.

Fixed package name, all python files are in ironic_ui, so package name
needs to be ironic_ui, not ironic-ui.

Change-Id: I8482a1896f16b4ed19a1117c7afc583bba5e13fb
2016-01-25 20:43:21 +01:00