summaryrefslogtreecommitdiff
path: root/editor/translations/extract.py
diff options
context:
space:
mode:
Diffstat (limited to 'editor/translations/extract.py')
-rwxr-xr-xeditor/translations/extract.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/translations/extract.py b/editor/translations/extract.py
index ebb032fd6f..70eb15da62 100755
--- a/editor/translations/extract.py
+++ b/editor/translations/extract.py
@@ -38,8 +38,8 @@ unique_str = []
unique_loc = {}
main_po = """
# LANGUAGE translation of the Godot Engine editor
-# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@@ -60,7 +60,7 @@ def process_file(f, fname):
lc = 1
while (l):
- patterns = ['RTR(\"', 'TTR(\"']
+ patterns = ['RTR(\"', 'TTR(\"', 'TTRC(\"']
idx = 0
pos = 0
while (pos >= 0):
@@ -70,7 +70,7 @@ def process_file(f, fname):
idx += 1
pos = 0
continue
- pos += 5
+ pos += len(patterns[idx])
msg = ""
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...")
for fname in matches:
- with open(fname, "rb") as f:
+ with open(fname, "r") as f:
process_file(f, fname)
-with open("editor.pot", "wb") as f:
+with open("editor.pot", "w") as f:
f.write(main_po)
if (os.name == "posix"):