FS#57737 - Aurweb has no RTL support

Attached to Project: AUR web interface
Opened by Yaron Shahrabani (yaron) - Wednesday, 07 March 2018, 09:21 GMT
Last edited by Lukas Fleischer (lfleischer) - Saturday, 01 February 2020, 14:41 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 4.6.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
The aurweb UI is translated to both Hebrew and Arabic, these languages are written from Right to Left (aka RTL).
Some CSS changes are needed to enable full support.
First there should be some condition indicating whether the language is RTL or LTR and then select an additional CSS file according to the selection (the rules that make the change will have !important at the end, something like: "float: right !important" for example).

I can create a pull request for the CSS but I'm not familiar with the code to enable conditional CSS selection.

Thanks!
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Saturday, 01 February 2020, 14:41 GMT
Reason for closing:  Duplicate
Additional comments about closing:  Dupe of FS#45981.
Comment by Eli Schwartz (eschwartz) - Wednesday, 07 March 2018, 12:54 GMT
Well, see https://developer.mozilla.org/en-US/docs/Web/CSS/direction

But simply globally enabling this doesn't entirely have the right effect regarding some of the layout elements...

If you can get this to work, please submit a patch as per the project contribution guidelines described in https://git.archlinux.org/aurweb.git/tree/doc/CodingGuidelines
Comment by Yaron Shahrabani (yaron) - Thursday, 08 March 2018, 07:35 GMT
Yeah I kinda figured that, furthermore, we can't change the top banner because it's not AUR specific.

Can I have your assistance with all the CSS selection part? I will try to come up with a good working CSS sheet and I'll submit it as a PR.
Comment by Yaron Shahrabani (yaron) - Thursday, 08 March 2018, 12:56 GMT
Looking good but still needs more work, I need to make some decisions regarding usability and breaking RTL and then I'll be able to submit the patch, I can post my CSS in the meanwhile if you'd like to take a look.
Comment by Yaron Shahrabani (yaron) - Sunday, 15 July 2018, 08:48 GMT
Hey, I was thinking, all the help I actually need is the mechanism to load a different CSS when selecting a certain language, I will create the patch on top of that, will you be able to assist me with that?
Comment by Yaron Shahrabani (yaron) - Monday, 27 August 2018, 11:07 GMT
Main screen looking good, I don't know how to create a different CSS file when selecting a language, otherwise I would just create a pull request for it.
   aur_rtl.png (160.4 KiB)
Comment by Eli Schwartz (eschwartz) - Monday, 27 August 2018, 18:22 GMT
You could just use PHP to check for the $LANG variable (which we set to the user's current language) and, depending on whether a language-specific CSS file exists, include it in the rendered HTML.

Alternatives include setting the CSS selector :lang() but as per https://developer.mozilla.org/en-US/docs/Web/CSS/:lang#Specifications you cannot really specify multiple languages for one rule that way...
Comment by Jelle van der Waa (jelly) - Friday, 09 August 2019, 07:31 GMT
This is a duplicate of https://bugs.archlinux.org/task/45981?project=2 and notice that it has a patch.

Loading...