mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Fix compatibility of check_trans.py with Python 3.
This commit is contained in:
parent
8aa7e781a4
commit
7636039ada
@ -43,9 +43,9 @@ def _checkCore(corePath):
|
||||
potPath = os.path.join(os.getcwd(), 'locales', translation)
|
||||
po = open(potPath)
|
||||
if checkTranslation(pot, po):
|
||||
print 'OK: ' + potPath
|
||||
print('OK: ' + potPath)
|
||||
else:
|
||||
print 'ERROR: ' + potPath
|
||||
print('ERROR: ' + potPath)
|
||||
|
||||
|
||||
@changedir
|
||||
@ -60,15 +60,15 @@ def checkPlugin(pluginPath):
|
||||
potPath = os.path.join(os.getcwd(), 'locales', translation)
|
||||
po = open(potPath)
|
||||
if checkTranslation(pot, po):
|
||||
print 'OK: ' + potPath
|
||||
print('OK: ' + potPath)
|
||||
else:
|
||||
print 'ERROR: ' + potPath
|
||||
print('ERROR: ' + potPath)
|
||||
|
||||
def checkTranslation(pot, po):
|
||||
checking = False
|
||||
pot = set(map(operator.itemgetter(0), parse(pot)))
|
||||
po = set(map(operator.itemgetter(0), parse(po)))
|
||||
diff = filter(lambda x:x not in po, pot)
|
||||
diff = [x for x in pot if x not in po]
|
||||
return not bool(diff)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user