Open yarons opened 4 years ago
This would be excellent.
I'm certain we make some wrong assumptions. We're probably using "left" and "right" when we should be using start and end and things like that. Although, I guess some of that flips directions.
There are still some floats (that we still need to get rid of for multiple other reasons too) in the UI, and those could cause issues as well.
Since we now have Hebrew translations (thanks!), the overall steps I'd imagine we would want to do are:
Step 4 - 6 can be done in parallel. Unless there are a lot of string issues, such as the mentioned “Hello (World)” -> “(Hello (World” problems, I think the hardest part would be to fix item # 6.
I guess we'd probably need at least @yarons, @martinpitt, and @garrett working on this, to some extent. And probably others pitching in effort too.
Sounds like a plan @garrett, is there any staging/dev environment for that?
In https://github.com/cockpit-project/cockpit/pull/14078 the new language is introduced.
@marusak Great news but we still have to take care of RTL (Not only for Hebrew), otherwise it might be pretty confusing for Hebrew speakers to use it.
I'm currently on the nav
branch, which will probably be landing in the next few days, so it's most likely representative of what's to come soon.
I don't have the Hebrew language commit merged in yet, but I did set direction: rtl
in the root element on both the shell and the page inside the iframe too.
Just from this super-quick in-browser test, I see that some of the popups are truncated off the side of the screen and margin/padding of various elements are not really optimal.
We'd want to set <body dir="rtl">
instead of using CSS for the direction. It's a bit more robust and considered a "more proper" way to change direction.
(And then we might want to make things generic based on direction whenever possible in the CSS and then key it off of [dir=rtl]
for the "one-off" places where we cannot specify beginning/end instead of left/right. And then still align things to the left or right in some cases anyway...)
Here's a starter document about some of these issues: https://hacks.mozilla.org/2015/09/building-rtl-aware-web-apps-and-websites-part-1/
Here are some of the first-pass screenshots of flipping the UI in action (where you can see some of the issues). This is independent of having it in Hebrew for now (as this branch is out of sync with master
):
Does it solve the CSS issues as well or only the backend mechanism to support the layout?
No it does not solve CSS yet. It only switches the direction based on selected language. It will take longer time to fix all the UI and it will be iterative process. Help is very much welcomed!
Re-opening this to help track RTL issues now that initial support has landed, as the UI is only partially adapted to RTL.
Page: All of them
Now that Cockpit is completely translated to Hebrew we need to make sure the UI will adjust properly to the change.
Hebrew is written from Right to Left (hence RTL) which means that our books are starting from the other side and we need all sorts of adjustments and crutches to make it visually compelling.
One example I can show is this UI overview by the Spotify team (Done for Arabic and Persian but applies to Hebrew as well): https://labs.spotify.com/2019/04/15/right-to-left-the-mirror-world/
Another way of explaining these peculiarities: https://blogs.sap.com/2015/11/27/understanding-rtl-language-support-in-sapui5/
Thanks and I'd love to help if necessary.