1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 17:33:18 +00:00

update translation

This commit is contained in:
王健辉
2021-09-17 11:51:58 +08:00
parent 47fbbc622f
commit be46d47d48
76 changed files with 27049 additions and 21814 deletions

View File

@@ -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')