i18n utils: check not only that the number of printf markers are the same in msgid and msgstr, but also that they are of the same type and order. Sorry, should have done that from the beginning... :/
This should prevent any bug like [#37095] Timeline crash when chose any keying set then press keyframe-insert, to appear again.
This commit is contained in:
parent
bf462838b3
commit
6e9c3a9abf
@ -462,9 +462,10 @@ class I18nMessages:
|
||||
elif fix:
|
||||
tmp[real_key] = msg
|
||||
done_keys.add(key)
|
||||
if '%' in msgid and msgstr and len(_format(msgid)) != len(_format(msgstr)):
|
||||
if '%' in msgid and msgstr and _format(msgid) != _format(msgstr):
|
||||
if not msg.is_fuzzy:
|
||||
ret.append("Error! msg's format entities are not matched in msgid and msgstr ({})".format(real_key))
|
||||
ret.append("Error! msg's format entities are not matched in msgid and msgstr ({} / {})"
|
||||
"".format(real_key, msgstr))
|
||||
if fix:
|
||||
msg.msgstr = ""
|
||||
for k in rem:
|
||||
|
Loading…
Reference in New Issue
Block a user