|
@@ -14,11 +14,11 @@ for root, dirnames, filenames in os.walk('.'):
|
|
if (filename.find("collada")!=-1):
|
|
if (filename.find("collada")!=-1):
|
|
continue
|
|
continue
|
|
matches.append(os.path.join(root, filename))
|
|
matches.append(os.path.join(root, filename))
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
unique_str=[]
|
|
unique_str=[]
|
|
main_po=""
|
|
main_po=""
|
|
-
|
|
|
|
|
|
+
|
|
for fname in matches:
|
|
for fname in matches:
|
|
|
|
|
|
f = open(fname,"rb")
|
|
f = open(fname,"rb")
|
|
@@ -28,8 +28,8 @@ for fname in matches:
|
|
l = f.readline()
|
|
l = f.readline()
|
|
lc=1
|
|
lc=1
|
|
while(l):
|
|
while(l):
|
|
-
|
|
|
|
- pos = 0
|
|
|
|
|
|
+
|
|
|
|
+ pos = 0
|
|
while(pos>=0):
|
|
while(pos>=0):
|
|
pos = l.find('TTR(\"',pos)
|
|
pos = l.find('TTR(\"',pos)
|
|
if (pos==-1):
|
|
if (pos==-1):
|
|
@@ -40,7 +40,7 @@ for fname in matches:
|
|
while (pos < len(l) and (l[pos]!='"' or l[pos-1]=='\\') ):
|
|
while (pos < len(l) and (l[pos]!='"' or l[pos-1]=='\\') ):
|
|
msg+=l[pos]
|
|
msg+=l[pos]
|
|
pos+=1
|
|
pos+=1
|
|
-
|
|
|
|
|
|
+
|
|
if (not msg in unique_str):
|
|
if (not msg in unique_str):
|
|
main_po+="\n#:"+fname+":"+str(lc)+"\n"
|
|
main_po+="\n#:"+fname+":"+str(lc)+"\n"
|
|
main_po+='msgid "'+msg+'"\n'
|
|
main_po+='msgid "'+msg+'"\n'
|
|
@@ -56,5 +56,3 @@ for fname in matches:
|
|
f = open("tools.pot","wb")
|
|
f = open("tools.pot","wb")
|
|
f.write(main_po)
|
|
f.write(main_po)
|
|
f.close()
|
|
f.close()
|
|
-
|
|
|
|
-
|
|
|