Closed Bug 1592254 Opened 6 years ago Closed 4 years ago

[FTL] Can switch from Rich editor to Simple via Source

Categories

(Webtools Graveyard :: Pontoon, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED MOVED

People

(Reporter: adrian, Unassigned)

Details

It is possible to start with a string in the rich editor, edit it in the source editor, and get back to the simple editor when switching source mode off. I am not sure if that's a bug or a feature though.

Steps to reproduce

  1. Go to an FTL string with a value and a single attribute (e.g. https://pontoon.mozilla.org/translate/fr/firefox/devtools/client/application.ftl/?string=179386 ).
  2. Clear the content of the value field.
  3. Switch to Source mode (click the FTL button).
  4. Switch back to Rich mode (click the FTL button again).

Expected result

You get back to the rich editor with an empty Value field.

Actual result

The Simple editor shows up, with only the content of the attribute.

I believe that's a feature.

I see the form-based editor as a tool that presents Fluent strings in the most simplistic way. Bug 1394110, bug 1423529 and the likes should take care of adding complexity to strings without using the source editor.

Pike, what are your thoughts?

Flags: needinfo?(l10n)

I think this is different, as the lack of the attribute on the message is an error.

I don't know what the right way to solve this is. Should the FTL button be blocked on errors?

Also, I just played around with this on stage, and pressing the FTL button a few times goes through funky stages.

I tried https://mozilla-pontoon-staging.herokuapp.com/translate/de/fluent/demo.ftl/?string=201933, and deleted the .label attribute in the source view, and just had a value for .accesskey. Going back to pretty made that a simple string, which, going back to source made that a plain value.

Something needs to be done here, and in a way that does something useful for Terms and Messages alike.

Flags: needinfo?(l10n)

(In reply to Axel Hecht [:Pike] from comment #2)

I think this is different, as the lack of the attribute on the message is an error.

In case of errors, we're hitting bug 1566476.

Status: UNCONFIRMED → NEW
Ever confirmed: true
*This bug has been moved to GitHub.* *Please check it out on https://github.com/mozilla/pontoon/issues.*
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → MOVED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.