Closed Bug 1294737 Opened 9 years ago Closed 9 years ago

Recognize whole placeables in format %(something)_

Categories

(Webtools Graveyard :: Pontoon, defect, P3)

defect

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.
Thanks for reporting, Michal! Would you be willing to provide a patch if I mentor you?
Priority: -- → P3
Yes. :) I have refreshed my laptop recently, but started installing local Pontoon right now.
Assignee: nobody → mstanke
Mentor: m
How are these placeables exactly called? I cannot find, where do they originally come from.
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.
Created PR on GitHub.
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: