Closed Bug 1554705 Opened 6 years ago Closed 5 years ago

[Translate.Next] Implement Fluent Rich Editor

Categories

(Webtools Graveyard :: Pontoon, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1580211

People

(Reporter: mathjazz, Assigned: adrian)

References

Details

(Whiteboard: tn-fluent-rich)

In addition to Fluent Source editor, we must also port the form-based Fluent Rich editor to Translate.Next.

The current code is in fluent_interface.js and consists of 3 core pieces:

  1. renderOriginal: renders the Fluent Rich source string panel.
  2. renderEditor: renders the Fluent Rich editor.
  3. serializeTranslation: serializes contents of the Rich editor into a Fluent message.

(Another piece would be getSimplePreview, which has already been ported in bug 1528178.)

Each of the pieces has different code paths for 3 different types of Fluent strings:

  1. Strings not supported in Rich editor.
  2. Simple strings and simple single-attribute strings.
  3. Complex strings (separately handled Value and Attributes).

A good way of testing feature parity is this test file:
https://github.com/mozilla-l10n/pontoon-ftl/blob/master/en-US/demo.ftl

A checklist of not so obvious features to support:

  • Ability to switch between Source and Rich editor.
  • A special UI for AccessKeys UI.
  • For simple single-attribute strings, we show attribute in the metadata section.
  • Add/Remove custom Term variants (wrongly called Attributes in the current code/UI).
  • getFTLEditorContentsAsSource is used for checking unsaved changes
Assignee: nobody → adrian
Status: NEW → ASSIGNED
Depends on: 1566476
Depends on: 1566477
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.