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. (Note that getSimplePreview has already been ported in bug 1528178.) Each of the pieces has different code paths for 3 Fluent string categories: 1. Strings not supported in Rich editor. 2. Simple strings and simple single-attribute strings. 3. Complex strings (separately handles 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. - Add/Remove custom Term variants (wrongly called Attributes in the current code/UI).
Bug 1554705 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
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