Closed Bug 1576120 Opened 1 year ago Closed 1 year ago

[FTL] Store strings in TM as simple strings

Categories

(Webtools :: Pontoon, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: mathjazz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We store entire FTL strings - including their identifiers and other syntax sigils - in TM.

As a consequence, even for simple FTL strings we never find any 100% matches, because the id is different. E.g., if the source string is key1 = Value and we have key2 = Value stored in TM, we'll display translation of the Value in Machinery as a 92% match (11 out of 12 characters are the same). On top of that, strings also appear with their full syntax in downloadable TMX files, which renders string reuse useless.

To circumvent these problems, we should store Fluent strings in TM formatted with as_simple_translation(), which we use in several places like the string list or dashboards. This will solve problems with TM matching and TMX export for most strings. Specifically, for all value-only or single-attribute FTL strings without any selectors.

Check out bug 1453341 to see how we intend to further improve TM experience for more complex strings.

As part of this bug we will:

  • start storing Fluent source strings and translations in TranslationMemoryEntry table formatted with as_simple_translation().
  • stop converting TM responses with as_simple_translation().
  • reformat all Fluent source strings and translations in TranslationMemoryEntry table with as_simple_translation().
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.