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:
- renderOriginal: renders the Fluent Rich source string panel.
- renderEditor: renders the Fluent Rich editor.
- 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:
- Strings not supported in Rich editor.
- Simple strings and simple single-attribute strings.
- Complex strings (separately handled Value and Attributes).
A good way of testing feature parity is this test file:
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