FS#45981 - RTL layout support
Attached to Project:
AUR web interface
Opened by Safa Alfulaij (SafaAlfulaij) - Friday, 14 August 2015, 09:14 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 30 August 2015, 15:04 GMT
Opened by Safa Alfulaij (SafaAlfulaij) - Friday, 14 August 2015, 09:14 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 30 August 2015, 15:04 GMT
|
Details
The AUR interface don't support RTL layout. I've attached a
simple patch to support that (just minimal right now). I can
view the pages that I have access to only, which means I
can't decide wether other pages (like votes, charts, etc.)
contains problems in the layout or not.
I'm not a web developer, so I couldn't change the header.php file and include (dir="rtl") in the html main object. Hopefully one can do it :) The language codes that are RTL languages (from Django source code) are: ["he", "ar", "fa", "ur"] Testing done only by Stylish add-on in Firefox. |
This task depends upon
I may need a little guidance with Django though, where can I define an array of language with specially crafted CSS or enforcing "dir=rtl" when one of these languages is selected?
I found this file: https://github.com/lfos/aurweb/blob/master/web/lib/translator.inc.php
I'm not really sure where do I go from here.
Is this mailing list is still the way to go or a patch on GitHub is enough?
I don't think you need to make any changes to anything except for the CSS. As I suggested before, have a look at how this was implemented before, in commit 3d6c6cc (Support for langauges written right-to-left, 2011-02-15).
Patches should be sent to the aur-dev mailing list; see [1].
[1] https://lists.archlinux.org/listinfo/aur-dev
I'm terribly sorry for bothering you about this.
[1] https://git.archlinux.org/aurweb.git/commit/?id=3d6c6cc
I'm sorry for all the mess, GitHub web interface does not allow squashing the commits and it created all sorts of weird branch names, if you prefer I can resubmit this pull request in a more organised way:
https://github.com/lfos/aurweb/pull/7
I will also create a patch from it to present it to the list when we'll agree on the content.
Thank you and sorry for all the trouble.
You should not modify archweb.css --- this file is synced with the archweb project and will be overwritten on the next update. Please add all modifications to aurweb.css instead.
I'll resubmit it in the next couple of days.
https://github.com/lfos/aurweb/pull/8
I've consulted some colleagues and apparently the only way to go is to set direction:rtl or dir=rtl, instead of specifying the language codes.
Is there a way to add those rules for specific languages?
If so I'll keep going that way.
Thanks, I'll create another commit soon.
This is the combined regex of both replacements done:
https://regex101.com/r/9eTBz1/1
The PRs are waiting patiently in line for their turn.
Thank you and feel free to reply if you think none of the solutions work nor optimal.
The second PR also won't work since you don't set the direction anywhere.