Skip to content

Commit a32e9fb

Browse files
added command to compile translations
1 parent 1201dd4 commit a32e9fb

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

manage.py

+7
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ def list_routes():
167167
def i18n_extract_strings():
168168
subprocess.call(["pybabel", "extract", "-o", "rootio/messages.pot", "rootio"])
169169

170+
@manager.command
171+
def i18n_compile_translations(force = False):
172+
args = ["pybabel", "compile", "-d", "rootio/translations", "rootio"]
173+
if force:
174+
args.append("-f")
175+
subprocess.call(args)
176+
170177
@manager.command
171178
def i18n_update_translation(lang):
172179
f = open("./rootio/translations/{}/LC_MESSAGES/messages.po".format(lang), "w")

rootio/messages.pot

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PROJECT VERSION\n"
1010
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11-
"POT-Creation-Date: 2019-12-28 10:18+0000\n"
11+
"POT-Creation-Date: 2019-12-31 19:53+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -629,7 +629,7 @@ msgstr ""
629629
msgid "Sorry, no user found for that email address"
630630
msgstr ""
631631

632-
#: rootio/frontend/views.py:266
632+
#: rootio/frontend/views.py:268
633633
msgid "Language changed to "
634634
msgstr ""
635635

0 commit comments

Comments
 (0)