pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

Can switch from Rich editor to Simple via Source

Open bugzilla-to-github opened this issue 6 years ago • 3 comments

This issue was created automatically by a script.

Bug 1592254

Bug Reporter: @adngdb CC: @Pike, @mathjazz

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.

bugzilla-to-github avatar Oct 28 '19 23:10 bugzilla-to-github

Comment Author: @mathjazz

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?

bugzilla-to-github avatar Oct 29 '19 00:10 bugzilla-to-github

Comment Author: @Pike

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.

bugzilla-to-github avatar Oct 29 '19 01:10 bugzilla-to-github

Comment Author: @mathjazz

(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.

bugzilla-to-github avatar Oct 29 '19 01:10 bugzilla-to-github

This issue has been fixed.

mathjazz avatar Jun 21 '23 09:06 mathjazz