Merge "Add openstack_auth to translation-related commands"

This commit is contained in:
Zuul 2021-02-17 14:59:38 +00:00 committed by Gerrit Code Review
commit 5c8e2d6ab0
3 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ import requests
ZANATA_LOCALES_URL = ("https://translate.openstack.org/rest/project"
"/horizon/version/master/locales")
DOMAINS = ['django', 'djangojs']
MODULES = ['horizon', 'openstack_dashboard']
MODULES = ['horizon', 'openstack_dashboard', 'openstack_auth']
PROJECT = 'horizon'
BRANCH = 'master'
POFILE = "{module}/locale/{locale}/LC_MESSAGES/{domain}.po"

View File

@ -20,7 +20,7 @@ from subprocess import call
from django.core.management.base import BaseCommand
DOMAINS = ['django', 'djangojs']
MODULES = ['openstack_dashboard', 'horizon']
MODULES = ['openstack_dashboard', 'horizon', 'openstack_auth']
class Command(BaseCommand):

View File

@ -29,7 +29,7 @@ LANGUAGE_CODES = [language[0] for language in settings.LANGUAGES
POTFILE = "{module}/locale/{domain}.pot"
POFILE = "{module}/locale/{locale}/LC_MESSAGES/{domain}.po"
DOMAINS = ['django', 'djangojs']
MODULES = ['openstack_dashboard', 'horizon']
MODULES = ['openstack_dashboard', 'horizon', 'openstack_auth']
def translate(segment):
@ -127,5 +127,5 @@ class Command(BaseCommand):
msg.string = translate(msg.id)
new_cat[msg.id] = msg
with open(pofile, 'w') as f:
with open(pofile, 'wb') as f:
babel_pofile.write_po(f, new_cat, ignore_obsolete=True)