diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-10-17 10:52:26 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-10-17 10:52:26 +0400 |
commit | 6e9c3a9abf9b75f87b98ad30560d4d62e954498e (patch) | |
tree | b1ff50a5700264a78e172071e32ce7d52cc5d9c9 /release/scripts/modules/bl_i18n_utils/utils.py | |
parent | bf462838b346e93ca2c149dde0762ead9634d141 (diff) |
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.
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils/utils.py')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py index 1b6d65d89d0..bef7de00126 100644 --- a/release/scripts/modules/bl_i18n_utils/utils.py +++ b/release/scripts/modules/bl_i18n_utils/utils.py @@ -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: |