|
@@ -60,7 +60,7 @@ def process_file(f, fname):
|
|
lc = 1
|
|
lc = 1
|
|
while (l):
|
|
while (l):
|
|
|
|
|
|
- patterns = ['RTR(\"', 'TTR(\"','TTRC(\"']
|
|
|
|
|
|
+ patterns = ['RTR(\"', 'TTR(\"', 'TTRC(\"']
|
|
idx = 0
|
|
idx = 0
|
|
pos = 0
|
|
pos = 0
|
|
while (pos >= 0):
|
|
while (pos >= 0):
|
|
@@ -70,7 +70,7 @@ def process_file(f, fname):
|
|
idx += 1
|
|
idx += 1
|
|
pos = 0
|
|
pos = 0
|
|
continue
|
|
continue
|
|
- pos += 5
|
|
|
|
|
|
+ pos += len(patterns[idx])
|
|
|
|
|
|
msg = ""
|
|
msg = ""
|
|
while (pos < len(l) and (l[pos] != '"' or l[pos - 1] == '\\')):
|
|
while (pos < len(l) and (l[pos] != '"' or l[pos - 1] == '\\')):
|
|
@@ -101,10 +101,10 @@ def process_file(f, fname):
|
|
print("Updating the editor.pot template...")
|
|
print("Updating the editor.pot template...")
|
|
|
|
|
|
for fname in matches:
|
|
for fname in matches:
|
|
- with open(fname, "rb") as f:
|
|
|
|
|
|
+ with open(fname, "r") as f:
|
|
process_file(f, fname)
|
|
process_file(f, fname)
|
|
|
|
|
|
-with open("editor.pot", "wb") as f:
|
|
|
|
|
|
+with open("editor.pot", "w") as f:
|
|
f.write(main_po)
|
|
f.write(main_po)
|
|
|
|
|
|
if (os.name == "posix"):
|
|
if (os.name == "posix"):
|