I tried switching an Umami site to a right-to-left language (Hebrew) and it didn't look good.
Some issues visible in the screenshots below include:
1. The theming of the menu links near the top of the page is messed up.
2. The front page recipe content is missing (and the "No front page content has been created yet" message is displayed instead).
The first problem above seems to happen no matter what. The second only happened for me if I switched languages after installing in English (i.e., by manually enabling the core Language module and then going to admin/config/regional/language
to add a new language and switch to it); if I installed from scratch in Hebrew, the front page content was shown correctly.
So this needs some investigation to figure out which parts of this are problems caused by Umami and which aren't.
Here is what the site looked like in a right-to-left language:
And here is what it looked like in English/left-to-right:
Comment | File | Size | Author |
---|---|---|---|
#41 | interdiff_36-40.txt | 1.23 KB | tsega |
#41 | umami-rtl-language-fix-2942011-40.patch | 11.91 KB | tsega |
#36 | interdiff_30-36.txt | 1.05 KB | tsega |
#36 | umami-rtl-language-fix-2942011-36.patch | 11.75 KB | tsega |
#30 | interdif_27-30.txt | 465 bytes | tsega |
Comments
Comment #2
cchoudhary CreditAttribution: cchoudhary at ]init[ AG commentedRegarding point 2
This main block displaying above message is actually a view http://192.168.33.10/d86/en/admin/structure/views/view/frontpage which has got a 'Translation language' filter. So when we switch to another language (irrespective of left to right or right to left language), there is no content already created for that language, which can appear in this view, we need to create new content for new language to make them appear in view.
Yes, this is true, because when the site is installed from scratch in one language and language module is not enabled , this 'Translation language' filter in view doesn't come into thepicture.
In short this problem is not related to umami profile.
Comment #3
ckrinaComment #4
ckrinaComment #6
Eli-TI agree with @cchoudhary in #2 that we shouldn't worry about the situation where Umami is installed in US English, then Language module enabled and the language switch until we support multi site.
However, we should not look obviously broken when installing after selecting a right to left language such as Hebrew on the first page of the installer.
I've just tested briefly with the latest version of Umami from Drupal 8.6.1 and this issue is not nearly as bad as it was when @David_Rothstein took the screenshots above. Therefore suggest next steps for this are to install in Hebrew and take screenshots of the different pages side by side with the default US English version, and highlighting where we need fixes. This would be a great novice task for Drupal Europe.
Note to install in Hebrew, select the following option on the first screen of the Drupal installation wizard (towards the bottom of the list):
Comment #7
Eli-TComment #8
aburrows CreditAttribution: aburrows at DigiDrop commentedThis is being worked on by Gvert at DrupalEurope who I am mentoring.
Comment #9
Gvert CreditAttribution: Gvert at Anvil commentedRobindh and I will be working on this at Drupal Europe.
Comment #10
Gvert CreditAttribution: Gvert at Anvil commentedEnglish (ltr):
Hebrew (rtl):
English (ltr):
Hebrew (rtl):
English (ltr):
Hebrew (rtl):
English (ltr):
Hebrew (rtl):
English (ltr):
Hebrew (rtl):
English (ltr):
Hebrew (rtl):
Comment #11
robindh CreditAttribution: robindh at Anvil commented1. The alert message icon is floated to the left of the page, it should be aligned to the right with the text.
English (ltr):
Hebrew (rtl):
2. On the contact page, at the bottom of the form: submit buttons do not have the correct padding / margins.
English (ltr):
Hebrew (rtl):
3. Margins on containers should be inverted:
English (ltr):
Hebrew (rtl):
4. Should the "find out more" arrow in the footer point the other way?
English (ltr):
Hebrew (rtl):
5. The search box styling in the header should be adapted for right to left and the "home" link should be correctly aligned with the other menu items. The "login" link in the header should be aligned left.
English (ltr):
Hebrew (rtl):
6. The "logout" and "user" links in the header should be aligned left
English (ltr):
Hebrew (rtl):
Comment #12
robindh CreditAttribution: robindh at Anvil commentedRestore Gvert's files, since I accidentally deleted them all.
Comment #13
tsega CreditAttribution: tsega commentedNice work by @Gvert and @robindh on the screenshots! Happy to say I have a fix for all of the issues but with some minor things not addressed (requiring some work)
Comment #14
tsega CreditAttribution: tsega commentedComment #15
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedWould it be possible to get screenshots of these fixes attached to this issue? I think we are going to need them to keep track of what is fixed by the issue.
Setting back to 'Needs work' so someone can gather the screenshots.
I haven't installed the site with this patch yet, but reading through it, it looks very promising, so thanks for all the work on it so far.
Comment #16
tsega CreditAttribution: tsega commentedHere are the screenshots
Header
Login Page
Recipe Page
Search Results Page
Home Page
Contact Page
Misc
Comment #17
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedThis is a huge improvement over what we currently have - even though we are not officially supporting RTL. It's great that even though we don't officially support RTL, things now don't look broken in RTL.
Let's mark this as RTBC, and if we find any other small RTL bugs later, we can squash them easily.
Thanks a lot for the work on this, especially @Gvert and @tsega and @robindh. Please continue to help us make the Out of the Box experience even better!
Comment #18
aburrows CreditAttribution: aburrows at DigiDrop commentedWell done @Gvert and @Robindh for working on this looking great!
Comment #19
tsega CreditAttribution: tsega commented@markconray, I'm glad to be of help! You can count me in on contributing to Umami or any other Drupal project for that matter. Participating in the mentored contributions was an eye-opener for me, thanks @ELI-T and @cferthorney for your kindness and patience in explaining the whole process.
On to the next then.
Comment #20
alexpottWe have some coding standards for comments in .css files for stuff that needs RTL specific styling. I think we should apply them here. See https://www.drupal.org/docs/develop/standards/css/css-formatting-guideli...
So for example we need to add
/* LTR */
to the LTR version here. This is so that if future us makes a change to the LTR version we know there is an RTL version to update.Comment #21
imalabyaAdded a patch to add the /* LTR */ comments for the CSS codes which have a RTL version.
Comment #22
Gábor HojtsyYay, thanks for working on this!
An all around 0 margin is not surprisingly not different in RTL either and therefore should not be marked as LTR and not have an RTL counterpart with the same style :)
(Also this fixes a missing space in the sheet :)
Comment #23
Gábor HojtsyWent ahead and reviewed the rest, sorry for not posting altogether.
How did 14px became 1rem in the RTL version?
Why is RTL getting a full border radius while LTR only has selective?
Hm, if this was normally in the center, why does it go to the right then?
Why was this not applied to LTR? Does it harm something there? What's the benefit in RTL?
Comment #24
volkswagenchicktagging for badcamp 2018
Comment #25
tsega CreditAttribution: tsega commentedThanks for the review guys! @imalabya nice work on the improvements!
@gábor:
The addition of the
margin: 0;
in RTL was because the base theme (Classy) was adding margins to tabs specifically for RTL and hence the need override that in Umami.That was changed to keep the Search Result title and result item boxes aligned on the right. See below:
As you can see form the LTR hover/focus state of the search button, all corners have a radius. I believe that is inherited from core/profiles/demo_umami/themes/umami/css/base.css:65. The reason that I'm applying the radius again is because for RTL we also have to switch the corners that are square and rounder; meaning a more specific styling that overrides the default one in base.css. Then on hover, the RTL specific one needs to be overridden to apply border radius for all corners. :D
The RTL rule is actually overriding the
0
part (equivalent to leftbackground-position: left;
) in the LTR. The center is for the vertical position which is shared by both.For the most part I worked on the RTL version of things, totally ignoring LTR. In this case, in
display: inline-block;
is needed to fix the "swapping" issue on pages that have a third-level breadcrumb. See below:Comment #26
Gábor HojtsyIt would be nice to add non-directional changes to the LTR sheet (the inline-block thing), so that the RTL is limited to directional changes rather than layout changes.
For the margin question, if the LTR one was
margin: 0 14px 1rem;
then both left and right are 14px, no? Why does that need to change for both left and right to 1rem in RTL? Sounds like 1rem would have been better originally, is that not aligned with other things in LTR? Then there is a sizing inconsistency between the two things placed?Comment #27
tsega CreditAttribution: tsega commented@Gábor, I have looked into the breadcrumb issue and applying the
display: inline-block;
style to both LTR and RTL produces the expected result and is consistent with the design.Similarly, I have checked the
14px -> 1rem
and it seems applying the 1rem value to the original style does not affect the design significantly (noticeably even); it only add 2 pixels more to the search results Header in LTR which is not aligned to anything else.Comment #28
tsega CreditAttribution: tsega commentedComment #29
Gábor HojtsyYay thanks, looks good other than this small thing:
hm if its the same value left/right, we don't usually add LTR since it would not need an RTL counterpart
Comment #30
tsega CreditAttribution: tsega commentedThanks for looking into this Gábor and nice catch!
I've made the changes.
Comment #31
tsega CreditAttribution: tsega commentedComment #32
penyaskitoAdded #2984447: Feature request: add multilingual functionalities to umami demo as parent.
Comment #33
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedGreat work everyone, thanks for all the help here. This is a great improvement.
Comment #34
Gábor HojtsyAssigning credits.
Comment #35
Gábor HojtsyWhile trying to commit these two style issues were identified by stylelint:
Comment #36
tsega CreditAttribution: tsega at Axelerant commented@Gábor, here are the fix for the above.
Comment #37
tsega CreditAttribution: tsega at Axelerant commentedComment #38
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedBack to RTBC
Comment #39
alexpottI think for these non-obvious not opposite LTR to RTL changes we should have a comment. So people don't file issues in the future saying this is wrong because the RTL version is not the opposite of the LTR version.
Comment #40
tsega CreditAttribution: tsega at Axelerant commentedComment #41
tsega CreditAttribution: tsega at Axelerant commented@alexpott I have added comments to the changes you've highlighted. Hope they are helpful enough to avoid future issues.
Comment #42
tsega CreditAttribution: tsega at Axelerant commentedComment #43
tsega CreditAttribution: tsega at Axelerant commentedComment #44
tsega CreditAttribution: tsega at Axelerant commentedComment #45
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedThird time lucky - back to RTBC
Comment #48
Gábor HojtsyYay, thanks, committed!