Problem
When choosing Arabic in the installer, the profile selector should already display in RTL, but that is not the case.
Proposal
Installer should show in RTL from the profile step. We should use our pre-stored information to display the installer in the proper orientation (from the standard language list).
Comment | File | Size | Author |
---|---|---|---|
#10 | drupaltest23123.jpg.jpeg | 91.41 KB | ricardoamaro |
#4 | Screenshot_4_25_13_10_50_AM.png | 44.11 KB | Gábor Hojtsy |
#4 | interdiff.txt | 1000 bytes | Gábor Hojtsy |
#4 | installer-rtl-4.patch | 2.02 KB | Gábor Hojtsy |
#3 | Screenshot_4_25_13_10_33_AM.png | 88.26 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyLikely not a very hard issue to solve, assuming the installer has RTL styling in the theme already. Marking as medium.
Comment #2
Gábor HojtsyLooks like the lang="en" and dir="ltr" on the page even if you pick Arabic. We should fix that first and foremost. If that is fixed (I just hand-edited locally), the page would look like this:
While that does not fix it completely (the indicators are on the wrong side of the step list), this page is being redesigned at #1337554: Develop and use separate branding for the installer.
Comment #3
Gábor HojtsyAll right, the problem is until the database is set up, we don't have a persistent storage to set language_default and we just don't temporarily set it to inform the theme system to act accordingly. If we do this right after configuration is inited, we get the behaviour as screenshot in #2. There is still a CSS assignment issue since later the Druplicon and the steps move to the left side proper:
So this does not yet happen as early as the profile selection step but it should. CSS at the configure page includ:
The swapped installer sidebar layout comes via seven's style-rtl.css. Still needs to be figured out why RTL CSS is not added to the page even though the installer now recognizes it is Arabic and RTL.
Comment #4
Gábor HojtsyFound the CSS problem too. The maintenance theme assembles CSS but the RTL CSS addition is in a hook with language module. So obviously before you pick the first profile, there are no modules enabled whatsoever. However, we should still add corresponding RTL CSS when available, so we should do a little manual intervention there and call out to the appropriate code in language.module. Thankfully drupal_get_css() already supports injecting a modified list of CSS from the outside (otherwise falling back on drupal_add_css()) so we can easily do that. Also, language module's alter is multi-run-safe, so if the module is indeed enabled, it will not re-add the CSS multiple times (if maintenance page is run on an installed site that is).
So this looks to me the complete solution. Reviews now welcome :)
Note every placement looks correct, arrow point from/to the right direction, etc :)
Comment #5
Gábor HojtsyComment #6
Gábor HojtsyComment #7
Gábor HojtsyQuick simplytest.me testing link: http://simplytest.me/project/drupal/8.x?patch[]=http://drupal.org/files/installer-rtl-4.patch
Comment #8
Gábor HojtsyBetter title since the installer does become RTL at some point, but pretty late.
Comment #9
ricardoamaro CreditAttribution: ricardoamaro commentedhaving a look at the simpletest of this patch
Comment #10
ricardoamaro CreditAttribution: ricardoamaro commentedThe installer is failing for me now and the druplicon is still align to the right:
Comment #11
Gábor HojtsyThanks for testing!
I think the Druplicon aligning to the right is fine for now, I don't want to mix in CSS fixes here especially that #1337554: Develop and use separate branding for the installer proposes redoing the CSS altogether (and has its own RTL testing there :).
As for the simplytest.me error, I've found that at #1974912: Problems installing Drupal 8, and it does work for me with reloading this page and going forward, so I'm just doing it for now in my testing. Looks like it might be fixed in core soon given there is a working patch :)
Apart from that any other issues?
Comment #12
ricardoamaro CreditAttribution: ricardoamaro commentedTested 2 times and against the normal installation.
I see no other issues
Works to me!
Comment #13
ricardoamaro CreditAttribution: ricardoamaro commentedComment #14
alexpottLets try and use Drupal::moduleHandler() here instead of include_once... this might not be possible but I think it is...
Comment #15
alexpottIgnore me... language is not enabled at this point... so the following will apply...
Comment #16
webchickNot sure what that meant. :) Assigning to alexpott since it looks like he had his fingers in here.
My only comment would be whether or not it's kosher to be introducing more $GLOBALS['something']['something'] rather than just pulling that from the Request object.
Comment #17
Gábor Hojtsylanguage_default is not anywhere close to being anywhere on the Request object, its a site-global setting, which you cannot really have without even selecting a profile/set up DB obviously.
Comment #18
alexpottCommitted ba6d6e9 and pushed to 8.x. Thanks!
Comment #19
Gábor HojtsySuperb, thanks! I have not checked if this applies to Drupal 7. It might or might not. The span/effect of it on Drupal 7 would be much less, since you pick language after you picked a profile and then the screens showing before Drupal is properly installed are DB setup and the module batch screen. Those may show in LTR. In Drupal 8, we moved language ahead, and strive for a fully flawless multilingual experience from the first step. If someone finds this not working in Drupal 7, please reopen for backport.
Comment #20
YesCT CreditAttribution: YesCT commenteddoes not need manual testing now that it is in. :)
Comment #21.0
(not verified) CreditAttribution: commentedUpdate with proposal section
Comment #22
Gábor HojtsyThis regressed unfortunately: #2240007: Regression: early installer is not in RTL after selecting RTL language :(