mathjazz / pontoon

In-place localization tool
https://pontoon.mozilla.org/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

[FTL] Translate Toolkit checks not working on FTL strings #1138

Open mathjazz opened 6 years ago

mathjazz commented 6 years ago

This issue was created automatically by a script.

Bug 1459440

Bug Reporter: Mohammed Ammar <ksmammar@gmail.com> CC: @Pike, @mathjazz, @zbraniecki

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20100101

Steps to reproduce:

While translating FTL string in pontoon I put extra white space in translated string.

Actual results:

The string is submitted without QA warning.

Expected results:

There should be QA warning about white space.

mathjazz commented 6 years ago

Comment Author: @mathjazz

Note that compare-locales and internal Pontoon checks are enabled, whereas Translate Toolkit checks are indeed disabled for FTL strings.

That's because the complexity of the FTL syntax and the way we store FTL strings (together with the key) produces lots of false positives when running Translate Toolkit checks.

A possible solution is to extract TextElements from FTL strings and only pass that to translate toolkit checks.

mathjazz commented 4 years ago

Comment Author: GitHub Bugzilla PR Linker <pulgasaur@mozilla.bugs>

Created attachment 9148161 Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/1628

Attached file: file_417611893.txt (text/x-github-pull-request, 44 bytes) Description: Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/1628

mathjazz commented 4 years ago

Comment Author: @Pike

Probably something we should discuss here, what does the approach of comment 1 do for us? What's in it in actual checks, and what's in it in false positives?