Closed Bug 1501168 Opened 4 years ago Closed 4 years ago

[FTL] Importing FTL file adds comment to the translation

Categories

(Webtools Graveyard :: Pontoon, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Assigned: mathjazz)

Details

Attachments

(2 files)

This morning I fixed a couple of translations in the German file, and uploaded it to Pontoon. Imagine my surprise when I realized I had 21 strings assigned to me…

Turns out that Pontoon import the comment as part of the translation.

https://pontoon.mozilla.org/de/firefox-monitor-website/app.ftl/?search=layout-support&string=191981

Coce's FTL (when switching to advanced mode)

layout-support = Hilfe


My FTL

# Descriptive headline for a column of links where users can give feedback, or get additional information about, Firefox Monitor.
layout-support = Hilfe


The serialized file looks good though
https://github.com/mozilla/blurts-server/commit/fb5d4099324c34e4fa6f13841b70e3fde05e2cdd
Assignee: nobody → m
Status: NEW → ASSIGNED
Priority: -- → P3
We currently store source strings as serialized FTL messages in Entity.string and translations as serialized FTL messages in Translation.string. The only difference is that we remove comments for translations.

But we fail to do that on file upload, and this is what this bug is about.

Since comments are also separately stored in Entity.comment, we should just stop storing them in Entity.string and Translation.string. And remove them from existing Entity.string and Translation.string columns.
Commit pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/bfb3199d835d2eb33f19fef4ae2d21f14e248bfd
Fix bug 1501168: No more FTL comments in string column (#1135)

As a consequence, FTL translations will be uploaded without comments.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.