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:
parent
4c7b3abce2
commit
7deb72e58c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user