0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00

fix two bugs in manage crowdin

This commit is contained in:
nobnago 2012-07-16 13:50:29 +02:00
parent 4c7b3abce2
commit 7deb72e58c

View File

@ -21,6 +21,8 @@
import pycurl
import StringIO
import sys
import string
import os
CROWDIN_KEY = ''
PROJECT_IDENTIFIER = 'ankidroid'
@ -34,6 +36,8 @@ alllang = ['ar', 'ca', 'cs', 'de', 'el', 'es-ES', 'fi', 'fr', 'hu', 'id', 'it',
def uploadtranslation(language, filename, sourcefile):
if len(language) > 2:
pathlan = string.replace(language, '-', '-r')
if not os.path.exists('../res/values-' + pathlan):
pathlan = pathlan[:2]
else:
pathlan = language
path = '../res/values-' + pathlan + '/'
@ -119,7 +123,7 @@ elif sel == 't':
for s in files:
uploadtranslation(language, s, s)
else:
uploadtranslation(language, files[int(selu)-1], s)
uploadtranslation(language, files[int(selu)-1], sourcefile)
elif selu == 'all':
for s in files:
uploadtranslation(language, s, s)