Small fix in translation tools

This commit is contained in:
Yorik van Havre
2018-02-21 13:35:32 -03:00
parent ce0a882b7e
commit 91fac9094a

View File

@@ -136,8 +136,10 @@ def updateqrc(qrcpath,lncode):
if ".qm" in line:
line = re.sub("_.*\.qm","_"+lncode+".qm",line)
else:
print "ERROR: no existing qm entry in this resource: Please add one manually " + qrcpath
sys.exit()
modname = os.path.splitext(os.path.basename(qrcpath))[0]
line = " <file>translations/"+modname+"_"+lncode+".qm</file>\n"
#print "ERROR: no existing qm entry in this resource: Please add one manually " + qrcpath
#sys.exit()
print "inserting line: ",line
resources.insert(pos+1,line)