summaryrefslogtreecommitdiff
path: root/tools/translations/extract.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/translations/extract.py')
-rwxr-xr-xtools/translations/extract.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/translations/extract.py b/tools/translations/extract.py
index ef3ad4da65..237664ab6a 100755
--- a/tools/translations/extract.py
+++ b/tools/translations/extract.py
@@ -83,7 +83,9 @@ for fname in matches:
unique_loc[msg] = [location]
elif (not location in unique_loc[msg]):
# Add additional location to previous occurence too
- msg_pos = main_po.find('\nmsgid "' + msg)
+ msg_pos = main_po.find('\nmsgid "' + msg + '"')
+ if (msg_pos == -1):
+ print("Someone apparently thought writing Python was as easy as GDScript. Ping Akien.")
main_po = main_po[:msg_pos] + ' ' + location + main_po[msg_pos:]
unique_loc[msg].append(location)