Vote #67745
完了RTL layout
100%
説明
Hello,
Following #5972 I thought of a better way to implement RTL support.
Instead of using a theme, which affects all users (unless installing theme changer, see #5993), I moved the css file to the standard stylesheet directory, named rtl.css, and added a link tag if current language is Hebrew (suppose Arabic support will be added, it will need to be added to this patch as well).
Another downside that is handled with this method is the dependency between the language and the selected theme - the rtl theme uses 'alternate' as its base theme, so if the admin wants to use it, he must either use the alternate theme or manually edit the css file to include some other theme.
With this new method, this dependency is removed, and any theme should work with it.
rtl.css should be added to public/stylesheets, and the rtl theme may be removed
journals
This approach is similar to "Qt translation":http://qt.gitorious.org/qt/qt/blobs/4.6/translations/qt_he.ts#line888. It requires no changes to base.rhtml when adding a new RTL language. All the translator needs to do is define direction: RTL in the yml file.
--------------------------------------------------------------------------------
Find a patch against trunk in attachment that implements RTL support, and adds direction string to all locale files. I've used rtl.css of Orgad Shaneh.
--------------------------------------------------------------------------------
The patch looks good to me. Looks like a clean approach. I haven't tried it though.
Could you please check and confirm that it works with all distributed themes? Once that's done, I vote for inclusion / replacement of the RTL theme.
--------------------------------------------------------------------------------
I wouldn't submit it without checking :)
I added another entry for <pre> in the css, and made a few changes in the translation file (can I have svn account for the translation, instead of posting it here with each change?)
--------------------------------------------------------------------------------
Orgad,
# Please keep this ticket for the RTL changes only, for updated of the Hebrew translation, please use a new ticket.
# Please post patches instead of whole files.
The question for further checking was not meant to insult you. Sorry if that may have sounded so. I just want to make sure that the patches are of the known good quality. As I am unable to check it myself due to my lack of RTL language knowledge, I just ask the community :)
--------------------------------------------------------------------------------
Regarding Mohammad's patch, the rtl stylesheet must be referenced after all other stylesheets (ses the difference between "rtl-layout.patch":/attachments/4233/rtl-layout.patch and attachment:rtl.patch)
--------------------------------------------------------------------------------
This is a rather difficult question (with larger boundaries as only this patch).
The question is: which parts of the stylesheets should be evaluated last (and thus has the greatest power to overwrite stuff without having to resort to @!important@.
In my opinion, the order should be:
# application style
# specific module and plugin styles
# themes
The RTL patch then should be inserted after the module styles.
Unfortunately the theme is currently loaded first which makes it very hard to overwrite default plugin styles. However, I think the RTL style provide defaults which should be easily overwritable by plugins. If this is a problem with current core styles, I think those should be changes instead. In this sense, I consider the rtl.css as a part of application.css which should be evaluated in the same context.
--------------------------------------------------------------------------------
It should at least appear after context menu (which it overrides)
--------------------------------------------------------------------------------
I commited RTL layout. For context menu I think better create own rtl css file, see patch for my idea (patch not good, need more work from ruby-guru).
--------------------------------------------------------------------------------
Azamat sent me a style bug for me to look at with the context menu before the 1.0.1 release. The context menu arrows are on the right instead of the left.
--------------------------------------------------------------------------------
See "note 6":http://www.redmine.org/issues/6012#note-6 (Is there a normal way to reference a note?)
--------------------------------------------------------------------------------
Holger Just and Orgad Shaneh:
I think it would be good to discuss the stylesheet load order in the forums. Based on Redmine's limited theme support, there are several edge cases that we would need to think about in order to support application, theme, rtl, and plugin styles.
--------------------------------------------------------------------------------
Updated the context menu to support RTL using Azamat's patch. I also fixed the icon's css, the context menu added it's own styles that override the rtl.css. (r4014)
--------------------------------------------------------------------------------
Merged to 1.0-stable.
--------------------------------------------------------------------------------
related_issues
duplicates,Closed,962,Hebrew translation and RTL Layout
duplicates,Closed,2318,RTL Theme