Closed Bug 1382538 Opened 7 years ago Closed 7 years ago

[FTL] Upgrade python-fluent to incorporate serializer fixes

Categories

(Webtools Graveyard :: Pontoon, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Assigned: jotes)

References

Details

Attachments

(2 files)

Attached image History example
I completely translated the project last night, I woke up this morning and found several strings "suggested" (they were submitted last night).

History for all strings is off: there is my translation, and then Pontoon adds an "imported string" that becomes the approved translation, losing autorship.

https://pontoon.mozilla.org/it/firefox-screenshots/server.ftl/?string=168612

That string never changed after the first submit last night.

Pontoon just did a new sync, re-added all the "imported strings" that I tried to remove, and marked at least one string as "suggested".

Something is clearly off with FTL files.
Not sure if it's related, but I can't scroll and show more strings in this page
https://pontoon.mozilla.org/it/firefox-screenshots/server.ftl/?string=168513

Load GIF keeps spinning, and the load bar on top doesn't complete. It was working fine yesterday, and it seems to work in other languages (tried French)
Last sync just happened and marked four random strings as suggested.
Summary: Sync with FTL file (Screenshots) is off → Sync with FTL file (Screenshots) is misbehaving
Turns out it's not that random…
homePageButtonMyShots
notFoundPageTitle
shotPageAlertErrorUpdatingExpirationTime

The serialized file is quite broken
https://github.com/mozilla-services/screenshots/commit/2911cf66e10a89f5ccf3db533c53721c7e77af3e#diff-8a4bcf2e078d56be4d0c7d27f515fd12

Those strings appear on the same line of a comment.
Also comments seem to collapse on one line in some cases
https://github.com/mozilla-services/screenshots/blob/2911cf66e10a89f5ccf3db533c53721c7e77af3e/locales/it/server.ftl#L7

Italian file generated by Pontoon

// Creating page// Note: {$title} is a placeholder for the title of the web page
// captured in the screenshot. The default, for pages without titles, is
// creatingPageTitleDefault.

English file

// Creating page

// Note: {$title} is a placeholder for the title of the web page
// captured in the screenshot. The default, for pages without titles, is
// creatingPageTitleDefault.
Assignee: nobody → m
Severity: major → normal
Priority: -- → P2
Depends on: 1382619
Commit pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/55f1f702d607064cc4fcd0918647ecf57567a951
Bug 1382538: Store FTL translations with trailing newline (#633)

That's because we need to serialize translations consistently with the
python-fluent serializer. Otherwise translations get re-imported.
Commits pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/f8f6c41d9831ad40ce10134dbee2f4d92205d52b
Bug 1382538: Store FTL translations without comments

That's because we need to serialize translations consistently on the
client when submitting translations and on the server during sync.

We could also change the code on the client and store translation
comments there, but that turns out to be harder to implement. Besides,
we don't really use translation comments.

https://github.com/mozilla/pontoon/commit/4acb5b323fdc5f39597c99c509a416118b1c34d5
Bug 1382538: Run FTL translation through FluentSerializer

Before writing translation submitted via Pontoon to the DB, run them
through the FluentSerializer for consistency with Python Serializer.
That way translation doesn't get reimported on next sync, because it
appears exactly the same when read from the DB and VCS.
Pontoon fixes landed in production.

I'm leaving this bug open to:
- observe the behaviour in production
- wait for the next release of python-fluent with fix for bug 1382619

I'll also look into fixing re-imported translations.
Summary: Sync with FTL file (Screenshots) is misbehaving → [FTL] Upgrade python-fluent to incorporate serializer fixes
As We discussed on at irc -> I'm taking this one.
Assignee: m → poke
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: