mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
update translation
This commit is contained in:
@@ -10,26 +10,8 @@ from fabric.colors import red, green
|
||||
def make(default=True, lang='en'):
|
||||
"""Update source language.
|
||||
"""
|
||||
# check branch name
|
||||
with open('.git/HEAD') as f:
|
||||
b1 = f.readline()
|
||||
|
||||
with open('../seahub-extra/.git/HEAD') as f:
|
||||
b2 = f.readline()
|
||||
|
||||
if b1 != b2:
|
||||
print('Error: inconsistent Git branch names.')
|
||||
return
|
||||
|
||||
|
||||
# add strings in 'organization'
|
||||
os.symlink('../../seahub-extra/seahub_extra/organizations', 'seahub/organizations')
|
||||
|
||||
local('django-admin.py makemessages -s -l %s -e py,html -i "thirdpart*" -i "docs*" -i "seahub/two_factor/gateways" -i "seahub/two_factor/templates/two_factor/core/otp_required.html" -i "seahub/two_factor/templates/two_factor/core/phone_register.html" -i "seahub/two_factor/templates/two_factor/profile/profile.html" -i "seahub/two_factor/models/phone.py" -i "seahub/two_factor/models/base.py" -i "seahub/two_factor/templates/two_factor/core/setup_complete.html"' % lang)
|
||||
|
||||
# remove 'organization' symlink to make codebase clean
|
||||
os.remove('seahub/organizations')
|
||||
|
||||
# some version of makemessages will produce "%%" in the string, replace that
|
||||
# to "%".
|
||||
_inplace_change('locale/%s/LC_MESSAGES/django.po' % lang, '%%s', '%s')
|
||||
|
Reference in New Issue
Block a user