Truncated strings in several modules
Bug #1083142 reported by
Numérigraphe
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Wishlist
|
OpenERP R&D Addons Team 1 |
Bug Description
The module purchase contains the following truncated string, which is impossible to translate :
"When you sell this product, OpenERP will trigger".
Same problem in the modules "procurement", "mrp" and maybe others.
Usually this type of bug is due to developers using string concatenation instead of formatting.
Ie: to allow translations, "xxx %s yyy" must be used instead of "xxx "+bla+" yyy"
Lionel Sausin.
summary: |
- Truncated string in the module "purchase" + Several truncated strings |
summary: |
- Several truncated strings + Truncated strings in several modules |
description: | updated |
description: | updated |
To post a comment you must log in.
In this case it comes from HTML content with nested tags[1] inside view definitions, and is a consequence of the way we extract the terms to translate and how we restore them. Not sure how to improve it without making the code overly complex and brittle.
We could try to avoid splitting the terms on some of the HTML elements that are not meant to end a sentence, but even a simple <span> could be either part of a sentence or meant to start something else.
As a mitigating factor there should not be too many cases where text is used directly in the view definitions (I hope), and the context displayed on Launchpad as a translator comment gives you a hint as to which view contains it. So the translators could have a look at the actual view, if they have some technical skills (or e.g. by testing the view on runbot)
[1] http:// bazaar. launchpad. net/~openerp/ openobject- addons/ trunk/view/ 8124/purchase/ purchase_ view.xml# L604