Repository navigation
Conversation
|
I'm not really sure that the bar below the editor is the right place for the RLM indicator, as it's not at all obvious which point of the string it's inserted into. I agree with @ItielMaN that the translator should be made aware of what's happening, even if the rendering in Pontoon is correct. It might make sense to explicitly show the RLM inline in the editor, which effectively means that we ought to tackle #4332 before fixing this. |
|
Thanks that makes sense: the badge doesn't show where the mark goes. I'll convert this to a draft for now. Is anyone working on #4332? If not I'd be happy to pick it up following @ayshushus design. Once point marks like RLM/LRM/ALM can be shown inline this PR could show the RLM where its added of the badge. Alternatively if it helps to land this I could replace the badge with an inline marker, at the start of each pattern that gets the RLM styled like the point marks proposed in #4332. Which would you prefer? |
|
Working on #4332 sounds like an excellent idea; that's not actively worked on by anyone atm. I think you may need to comment on that issue before we can assign it to you? Let's not land this before that, and figure out in general how to represent invisible characters, rather than RLM specifically first. |
Fixes #3236
Adds the fix suggested in the issue. In RTL locales, where the beginning strong character in a translation is LTR (such as placeholders and brand names), and there is some RTL text in that translation, an RLM will be added to the beginning of all patterns on save to display it RTL. Bidi isolation in Firefox is off (
intl.l10n.enable-bidi-marks, bug 1439018), so a leading placeable does set the paragraph direction.RLM" badge in the editor menu becomes visible if this mark is going to be added.End-to-end tested in Firefox/Edge with plain and Fluent strings (saving, reloading, opt-out, source view).
The open question is whether it makes sense to add the ability to insert the LRM as a response to clicking the badge, as typing an LRM as an opt-out in a particular case depends on the OS and the keyboard layout (for example, Ctrl+Shift+3 on Windows Persian, AltGr+9 on Linux, nothing standard on macOS).
Screenshots