Closed
Bug 1455191
Opened 7 years ago
Closed 7 years ago
[FTL] Machinery presents strings as source
Categories
(Webtools Graveyard :: Pontoon, defect, P2)
Webtools Graveyard
Pontoon
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: felix.bau, Assigned: mathjazz)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180415100032
Steps to reproduce:
Used Machinery.
Actual results:
The percentage wasn't correct.
Expected results:
Machinery should compare text to the "non-FTL" variant (the actual string)
two examples:
92% instead of 100%:
https://pontoon.mozilla.org/de/common-voice/all-resources/?string=178203
79% instead of 100%:
https://pontoon.mozilla.org/de/common-voice/all-resources/?string=178208
about the second string:
clicking gives you the exact same string
The referenced string:
https://pontoon.mozilla.org/de/common-voice/all-resources/?search=privacy-info&string=176569
None of them use html entities at all.
Summary: machinery → machinery compares text version of a string to ftl version of a string and encodes characters as html entities
weird, for other strings it doesn't happen:
https://pontoon.mozilla.org/de/common-voice/all-resources/?time=201803250706-201804190125&string=177865
Updated•7 years ago
|
Component: General → Pontoon
Assignee | ||
Comment 3•7 years ago
|
||
To clarify: we store TranslationMemoryEntries of FTL Translation objects as source FTL, but don't convert them to simple text in Machinery.
That why:
1. Source strings and suggestions from TM appear as source FTL.
2. When you click on the suggestion it gets inserted to the textarea as source (bug 1455189).
We also need to prevent escaping of HTML from the source string to propagate to the source string in TM entries in Machinery, e.g. here:
https://pontoon.mozilla.org/de/common-voice/all-resources/?string=178208
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Summary: machinery compares text version of a string to ftl version of a string and encodes characters as html entities → [FTL] Machinery presents strings as source
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Assignee: nobody → m
Comment 5•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/pontoon
https://github.com/mozilla/pontoon/commit/620353442d2f76df46e83fc916e9b638fa04e7a9
Fix bug 1455191: [FTL] Convert TM strings to simple strings (#959)
Also:
* Use raw source string when querying TM
* Add parameter to distinguish between custom machinery queries and
source string queries.
* Turn getSimplePreview into a as_simple_translation clone. It
simplifies the code and reduces the number of arguments.
* Rename isPluralized function to reflect what it actually does.
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Thanks for working on a fix!
When will the change be live, so I can confirm that it's fixed? :)
Assignee | ||
Comment 7•7 years ago
|
||
It's already on prod!
Note the your first example (https://pontoon.mozilla.org/de/common-voice/all-resources/?string=178203) no longer returns any matches from TM, because with the changes introduced in the patch (Use raw source string when querying TM), the 255 character limitation of Postgres levenshtein implementation is exceeded.
The percentage mismatch in the second example (https://pontoon.mozilla.org/de/common-voice/all-resources/?string=178208) will be resolved as part of bug 1453341.
The other problems are fixed:
- key is no longer part of the TM strings
- HTML entities are presented unescaped
ah, very good!
Those were exactly the two things I was wondering about and would've asked about now :)
Updated•3 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•