1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 07:22:34 +00:00

Update fabfile

This commit is contained in:
zhengxie
2014-11-01 11:58:42 +08:00
parent cf7887c8df
commit eb396fe8fe

8
fabfile.py vendored
View File

@@ -7,22 +7,24 @@ from fabric.colors import red, green
def i18n_upload(): def i18n_upload():
"""Update source language, and upload to Transifex. """Update source language, and upload to Transifex.
""" """
_debug('django-admin.py makemessages -l en -e py,html -i "thirdpart*"')
local('django-admin.py makemessages -l en -e py,html -i "thirdpart*"') local('django-admin.py makemessages -l en -e py,html -i "thirdpart*"')
# some version of makemessages will produce "%%" in the string, replace that # some version of makemessages will produce "%%" in the string, replace that
# to "%". # to "%".
_inplace_change('locale/en/LC_MESSAGES/django.po', '%%', '%') _inplace_change('locale/en/LC_MESSAGES/django.po', '%%', '%')
_debug('tx push -s')
local('tx push -s') local('tx push -s')
def i18n_pull(): def i18n_pull():
"""Update local po files with Transifex. """Update local po files with Transifex.
""" """
_debug('tx pull')
local('tx pull') local('tx pull')
def i18n_compile():
"""Compile po files.
"""
local('django-admin.py compilemessages')
########## utility functions ########## utility functions
def _inplace_change(filename, old_string, new_string): def _inplace_change(filename, old_string, new_string):
s = open(filename).read() s = open(filename).read()