summaryrefslogtreecommitdiff
path: root/openstack_dashboard/management
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-08-12 17:52:31 +0000
committerAkihiro Motoki <amotoki@gmail.com>2017-08-12 17:52:31 +0000
commit19a4012b9119643a612cf5d61be5c7d8ed128a65 (patch)
tree20240727fd966ae72093de42531b18512fcc3dba /openstack_dashboard/management
parent99f5b69df1072c254f7ad2761679e24b6a9d6f41 (diff)
downloadhorizon-19a4012b9119643a612cf5d61be5c7d8ed128a65.tar.gz
extract_messages: Specify input directory
Currently horizon/locale/{django,djangojs}.js contain strings from openstack_dashboard and vice versa. To avoid this, --input-dirs option needs to be passed to python setup.py extract_messages. Change-Id: Iee874616f4c037cc68bc3b0c7d8586d86f7153f4 Closes-Bug: #1710396
Diffstat (limited to 'openstack_dashboard/management')
-rw-r--r--openstack_dashboard/management/commands/extract_messages.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/openstack_dashboard/management/commands/extract_messages.py b/openstack_dashboard/management/commands/extract_messages.py
index 95049e8c9..567b2962e 100644
--- a/openstack_dashboard/management/commands/extract_messages.py
+++ b/openstack_dashboard/management/commands/extract_messages.py
@@ -39,13 +39,14 @@ class Command(BaseCommand):
def handle(self, *args, **options):
cmd = ('python setup.py {quiet} extract_messages '
'-F babel-{domain}.cfg '
- '-o {module}/locale/{domain}.pot')
+ '--input-dirs {module} '
+ '-o {potfile}')
distribution = Distribution()
distribution.parse_config_files(distribution.find_config_files())
quiet = '-q' if int(options['verbosity']) == 0 else ''
if options['check_only']:
- cmd += " ; rm {module}/locale/{domain}.pot"
+ cmd += " ; rm {potfile}"
for module in options['module']:
for domain in options['domain']: