mozilla / pontoon

Mozilla's Localization Platform
https://pontoon.mozilla.org
BSD 3-Clause "New" or "Revised" License
1.46k stars 528 forks source link

Translate Toolkit checks not working on FTL strings #2128

Open bugzilla-to-github opened 6 years ago

bugzilla-to-github 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.

bugzilla-to-github 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.

bugzilla-to-github 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

bugzilla-to-github 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?