From 55781bebf49d76869f3c939ad922233a487ea501 Mon Sep 17 00:00:00 2001 From: Haruki Yamanashi Date: Thu, 28 Jan 2016 15:34:06 +0900 Subject: [PATCH] This is a preparation for using Zanata Monasca project plans to use Zanata for translating monasca-ui Added two configuration files Change-Id: I3e73582e6077c5ee4a938e834b75bd3c0d3b6c65 Closes-Bug: #1538904 --- babel-django.cfg | 5 +++++ babel-djangojs.cfg | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 babel-django.cfg create mode 100644 babel-djangojs.cfg diff --git a/babel-django.cfg b/babel-django.cfg new file mode 100644 index 00000000..e78d6c0f --- /dev/null +++ b/babel-django.cfg @@ -0,0 +1,5 @@ +[extractors] +django = django_babel.extract:extract_django + +[python: **.py] +[django: **/templates/**.html] diff --git a/babel-djangojs.cfg b/babel-djangojs.cfg new file mode 100644 index 00000000..a8273b62 --- /dev/null +++ b/babel-djangojs.cfg @@ -0,0 +1,14 @@ +[extractors] +# We use a custom extractor to find translatable strings in AngularJS +# templates. The extractor is included in horizon.utils for now. +# See http://babel.pocoo.org/docs/messages/#referencing-extraction-methods for +# details on how this works. +angular = horizon.utils.babel_extract_angular:extract_angular + +[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: **/static/**.html]