Closed
Bug 1294737
Opened 9 years ago
Closed 9 years ago
Recognize whole placeables in format %(something)_
Categories
(Webtools Graveyard :: Pontoon, defect, P3)
Webtools Graveyard
Pontoon
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mstanke, Assigned: mstanke, Mentored)
References
()
Details
Attachments
(1 file)
Pontoon recognizes only the word in brackets as placeable. If you check the URL, instead of "%(passwordChangeLink)s", only %("passwordChangeLink")s is being matched. I think the same would be for %(foo)d, if it appears in a string.
Comment 1•9 years ago
|
||
Thanks for reporting, Michal!
Would you be willing to provide a patch if I mentor you?
Priority: -- → P3
| Assignee | ||
Comment 2•9 years ago
|
||
Yes. :) I have refreshed my laptop recently, but started installing local Pontoon right now.
Updated•9 years ago
|
Assignee: nobody → mstanke
Mentor: m
Comment 3•9 years ago
|
||
This is where we keep the placeables code:
https://github.com/mozilla/pontoon/blob/master/pontoon/base/utils.py#L44
| Assignee | ||
Comment 4•9 years ago
|
||
How are these placeables exactly called? I cannot find, where do they originally come from.
Comment 5•9 years ago
|
||
In pontoon.base.models.py:Entity.map_entities() a list of entities is generated to be sent to the translate view. Entity.marked property is used for storing the source string representation with placeables markup. And the marked property is basically pontoon.base.utils.mark_placeables(Entity.string).
Let me know if that helps. I'm also available in #pontoon.
| Assignee | ||
Comment 6•9 years ago
|
||
Comment 8•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/pontoon
https://github.com/mozilla/pontoon/commit/94ae3c976f220a463ace4aa56fc5188dd531d61b
Fix bug 1294737: Recognize string format named placeables (#452)
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•