Closed
Bug 1316640
Opened 8 years ago
Closed 8 years ago
Create a module for migrating legacy translations to FTL
Categories
(Localization Infrastructure and Tools :: Fluent Migration, defect)
Localization Infrastructure and Tools
Fluent Migration
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stas, Assigned: stas)
References
(Blocks 1 open bug)
Details
(Whiteboard: [gecko-l20n])
Attachments
(2 files)
In bug 1280685 we want to create a workflow for migrating legacy translations (DTD, properties) to the new FTL format used by L20n. This PR adds the l20n.migrate module able to run migrations "spec" files written by developers and serialize the resulting FTL files. A tool using this module (e.g. a mach command, see bug 1315005) can then commit the serialized resources, thus preserving the attribution of localizers. The migration specification was discussed in mozilla-l10n/roadmap#13 (comment). The attribution requirement was discussed in bug 1288141 and bug 1288146.
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8809481 [details] [review] Pull request I'd like to get input about this from the rest of the team. I'm flagging Zibi and Pike for review, especially of the changes to l20n/format and the overall design of the transforms. See tools/migrate/about_dialog.py for an example of a migration spec. I'd also like to get feedback from flod and Matjaž; it will be good if more people on the team know how the migrations work so that we can all help developers write them. Thanks!
Attachment #8809481 -
Flags: review?(l10n)
Attachment #8809481 -
Flags: review?(gandalf)
Attachment #8809481 -
Flags: feedback?(m)
Attachment #8809481 -
Flags: feedback?(francesco.lodolo)
Comment 3•8 years ago
|
||
Some general comments outside of the PR. I did start to file at least one bug to get things out of this PR and on to new bugs, 1317336. Maybe the same for PLURALS? Generally mutli-line string handling tests?
Comment 4•8 years ago
|
||
Comment on attachment 8809481 [details] [review] Pull request f+ on parser changes
Attachment #8809481 -
Flags: review?(gandalf) → feedback+
Comment 5•8 years ago
|
||
Comment on attachment 8809481 [details] [review] Pull request Left a few comments in the PR and did some tests, I guess it's time to clear the flag.
Attachment #8809481 -
Flags: feedback?(francesco.lodolo) → feedback+
Assignee | ||
Comment 6•8 years ago
|
||
Zibi, what is the best way to generate new JSON fixtures which will reflect the changes I made to the AST?
Flags: needinfo?(gandalf)
Comment 7•8 years ago
|
||
He did fix the tools/parse.py command line parser in https://github.com/l20n/python-l20n/pull/6/files#diff-c2a1848348217806f8f50973a68b4bbe, which dumps the AST and errors to stdout. Does that help?
Assignee | ||
Comment 8•8 years ago
|
||
Yeah, thanks. It looks like the fixture AST were previously generated by l20n.js and now python's JSON serializes them in a completely different property order. Is that fine?
Assignee | ||
Comment 9•8 years ago
|
||
We'll need to port the changes to the Python implementation of the parser and the AST to l20n.js. With the changes ported I should be able to use l20n.js's generate-parser-fixtures.js to generate the fixtures without messing up the JSON too much.
Attachment #8812319 -
Flags: review?(gandalf)
Comment 10•8 years ago
|
||
Comment on attachment 8809481 [details] [review] Pull request I think the state of the branch we have now is good to land, and then we'll pound it a bit with some more practical examples :-)
Attachment #8809481 -
Flags: review?(l10n) → review+
Assignee | ||
Comment 11•8 years ago
|
||
Landed in python-l20n: https://github.com/l20n/python-l20n/commit/14fd5842c929e9afd328877cc97a9c49a203c5a0 I'll keep this bug open until the l20n.js PR lands.
Flags: needinfo?(gandalf)
Comment 12•8 years ago
|
||
Comment on attachment 8812319 [details] [review] Pull request against l20n.js lgtm
Attachment #8812319 -
Flags: review?(gandalf) → review+
Assignee | ||
Comment 13•8 years ago
|
||
Landed in l20n.js: https://github.com/l20n/l20n.js/commit/62f39864b3934a213d8e477d55d34efcfcff3048 Marking as fixed \o/.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Attachment #8809481 -
Flags: feedback?(m) → feedback+
Assignee | ||
Updated•6 years ago
|
Component: Python Library → Fluent Migration
Product: L20n → Localization Infrastructure and Tools
You need to log in
before you can comment on or make changes to this bug.
Description
•