RTL support - #2263
Conversation
|
@mxmou King 👑 |
|
What happens when someone enables editor-stage-left? |
|
@apple502j It moves the stage to the right. |
Oh wow.
We probably don't want to merge this before those are solved - for RTL users, our settings page probably got worse, not better, at the current state of this PR. We don't have complete translations for Arabic or Hebrew yet anyway (this is a bit of a mouse and cat game anyway, I know). So I guess that for the settings page, we'll not only have to support LTR and RTL, but RTL with LTR translation fallbacks as well, which kinda hurts, but is strictly needed, at least for now.
Your changes add new calls to |
@apple502j If you want, this would be a good moment to add support for translator notes inside |
|
@WorldLanguages It could be fixed by adding |
|
@mxmou Why is it a bad idea? |
|
@WorldLanguages When a new element with punctuation is added, it would also need the attribute. |
|
Well, that's not ideal, but what are the alternatives? |
I don't know any. |
Maybe I could move all changes to hide-flyout, including the ones that add RTL support? They're bigger than changes to other addons. |
|
Yeah you can move all changes from hide-flyout or just some, you decide |
|
@mxmou ? |
|
@WorldLanguages I think I'll work on this later today. |
They will be included in a separate PR.
|
Why did Prettier make changes to unrelated files? |
It does that sometimes lol ¯\(ツ)/¯ |
|
I think this PR is now finished. Note that it adds some uses of |
|
Do not merge yet |
TODO: is this ok, alternatives? 🤔 |
If it isn't, the best alternative is .something {
left: 10px;
}
[dir="rtl"] .something {
left: 0;
right: 10px;
} |
|
We currently want core to be functional in Chrome 80+ and Firefox 74+ (both released ~1 year from now) The CSS properties I found used here that are not supported in those browsers are:
I guess a good compromise we could do is officially support RTL only for Chrome 89+ For example: el {
inset-inline-end: 25px;
}would become: el {
right: 25px;
inset-inline-end: 25px;
}Which would now support LTR for Chrome 80+ and all Firefox versions, as well as RTL in Chrome 89+ and all Firefox versions. @mxmou What do you think? It will be easy to migrate when our minimum browser version requirements change (all we need to do is remove properties) and there's no need to do Note that I'm talking exclusively about extension core CSS. Not addon CSS (which uses |
|
@WorldLanguages This would work, but I'm not sure if having different version requirements for LTR and RTL layouts makes sense. If we want core to work in a certain browser version, it should probably work with that version regardless of the language. |
|
@mxmou What do you suggest then? 🤔 We haven't supported RTL until now, so it feels like a good compromise to avoid separate |
|
@WorldLanguages I guess it would work, I just don't think there's anything wrong with adding |
|
Then do that I guess :P |
|
Solve conflicts and merge? |
@WorldLanguages 17 months later, Arabic and Hebrew are 54% and 46% translated respectively. I think we forgot to enable this :P |
|
@RedGuy12 Those languages didn't hit the necessary threshold for them to be included. See https://github.com/ScratchAddons/ScratchAddons/tree/master/_locales But we should pay close attention, they might appear soon automatically |


Resolves
Resolves #1844
Resolves #1877
Changes
Adds support for right-to-left scripts to the settings page, popup and editor addons. Website addons don't need it because the website itself doesn't have proper RTL support. Notes:
hide-flyoutaddon were necessary, so I also fixed a few bugs.Reason for changes
#1844
Tests
Tested by changing the browser and Scratch language.