summaryrefslogtreecommitdiff
path: root/tools/translations
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-05-04 15:31:47 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-05-04 15:31:47 +0200
commitfbe5a5e4a734b40f83d842105b5bf6652d73c197 (patch)
tree4b8ad01de5635dcffceffc8392d7a92ebe307dcf /tools/translations
parentfb277dbde6a337a3294867f54cebc54c7cd91653 (diff)
i18n: remove trailing spaces in script
Diffstat (limited to 'tools/translations')
-rw-r--r--tools/translations/extract.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/translations/extract.py b/tools/translations/extract.py
index 4a3415060e..ad78a9da60 100644
--- a/tools/translations/extract.py
+++ b/tools/translations/extract.py
@@ -14,11 +14,11 @@ for root, dirnames, filenames in os.walk('.'):
if (filename.find("collada")!=-1):
continue
matches.append(os.path.join(root, filename))
-
+
unique_str=[]
main_po=""
-
+
for fname in matches:
f = open(fname,"rb")
@@ -28,8 +28,8 @@ for fname in matches:
l = f.readline()
lc=1
while(l):
-
- pos = 0
+
+ pos = 0
while(pos>=0):
pos = l.find('TTR(\"',pos)
if (pos==-1):
@@ -40,7 +40,7 @@ for fname in matches:
while (pos < len(l) and (l[pos]!='"' or l[pos-1]=='\\') ):
msg+=l[pos]
pos+=1
-
+
if (not msg in unique_str):
main_po+="\n#:"+fname+":"+str(lc)+"\n"
main_po+='msgid "'+msg+'"\n'
@@ -56,5 +56,3 @@ for fname in matches:
f = open("tools.pot","wb")
f.write(main_po)
f.close()
-
-