diff --git a/qt/i18n/extract-po-string.py b/qt/i18n/extract-po-string.py index 7b3b5b6be..d1fcbd677 100644 --- a/qt/i18n/extract-po-string.py +++ b/qt/i18n/extract-po-string.py @@ -10,7 +10,7 @@ import polib # extract a translated string from the gettext catalogs and insert it into ftl # eg: # $ python extract-po-string.py media-check.ftl delete-unused "Delete Unused Media" "", 1 -# $ python extract-po-string.py media-check.ftl delete-unused "%(a)s %(b)s" "%(a)s=val1,%(b)s=val2" 0 +# $ python extract-po-string.py media-check.ftl delete-unused "%(a)s %(b)s" "%(a)s=$val1,%(b)s=$val2" 0 ftl_filename, key, msgid, repls, dry_run = sys.argv[1:] replacements = [] @@ -34,7 +34,7 @@ for (lang, cat) in cats: msg = entry.msgstr if replacements: for (old,new) in replacements: - msg = msg.replace(old, f"{{${new}}}") + msg = msg.replace(old, f"{{{new}}}") print(lang, "has", msg) to_insert.append((lang, msg)) break @@ -47,7 +47,7 @@ for (lang, cat) in cats: for _k, msg in plurals: if replacements: for (old,new) in replacements: - msg = msg.replace(old, f"{{${new}}}") + msg = msg.replace(old, f"{{{new}}}") adjusted.append(msg) print(lang, "has", adjusted) if len(adjusted) > 1: