diff options
Diffstat (limited to 'editor/translations')
-rw-r--r-- | editor/translations/Makefile | 2 | ||||
-rwxr-xr-x | editor/translations/extract.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/editor/translations/Makefile b/editor/translations/Makefile index 4f5d9f165f..1843114f06 100644 --- a/editor/translations/Makefile +++ b/editor/translations/Makefile @@ -7,7 +7,7 @@ LANGS = $(POFILES:%.po=%) all: update merge update: - @cd ../..; python2 editor/translations/extract.py + @cd ../..; python3 editor/translations/extract.py merge: @for po in $(POFILES); do \ diff --git a/editor/translations/extract.py b/editor/translations/extract.py index 2075bd5f3c..70eb15da62 100755 --- a/editor/translations/extract.py +++ b/editor/translations/extract.py @@ -60,7 +60,7 @@ def process_file(f, fname): lc = 1 while (l): - patterns = ['RTR(\"', 'TTR(\"','TTRC(\"'] + 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"): |