Skip to content

Commit e00a595

Browse files
committed
fabfile: update i18n helpers
Split the i18n helpers in two: - one to update the source language (english) translation in transifex - one to get the update translations and compile them This has been done so hopefully the translatable strings can be updated more frequently and translators don't waste time translating strings removed. While at it add force options to tx pull as for some reason it changed default behaviour to not override already available translations which means to do nothing by default.
1 parent 71fa1d8 commit e00a595

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

fabfile.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@
66
fabfile_dir = os.path.dirname(__file__)
77

88

9-
def i18n():
9+
def i18n_push_source():
10+
"""rebuild and push the source language to transifex"""
1011
with lcd('readthedocs'):
1112
local('rm -rf rtd_tests/tests/builds/')
12-
local('tx pull')
13-
local('django-admin makemessages --all')
13+
local('django-admin makemessages -l en')
1414
local('tx push -s')
15+
16+
17+
def i18n_pull():
18+
"""pull the updated translation from transifex"""
19+
with lcd('readthedocs'):
20+
local('rm -rf rtd_tests/tests/builds/')
21+
local('tx pull -f ')
22+
local('django-admin makemessages --all')
1523
local('django-admin compilemessages')
1624

1725

0 commit comments

Comments
 (0)