python-format flag incorrectly forced on all extractors

17 views
Skip to first unread message

Wichert Akkerman

unread,
Apr 8, 2013, 3:12:48 AM4/8/13
to python...@googlegroups.com
I tried to file this as a bugreport in the tracker, but it was rejected as possible spam :(

During extraction the results from an extractor plugin are used to create a message which is then added to the catalog. When the Message instance is created it can set the {{{python-format}}} flag if the text matches a specific regular expression. That means that a text like this:

   Did you know 50% of all users do not know how to do this?

will be flagged as a python-format string even it does not originate from python code, or from a piece of python code that will never use formatting. This is breaking our translations in a pretty bad way currently.

As far as I can see the extractor is the only thing that should decide the flags for a message. The Message class itself should never try to guess flags or force, especially since extractors have no way to override this behaviour.

Regards,
Wichert.
Reply all
Reply to author
Forward
0 new messages