OSDN Git Service

Real RTL-theme support in locales (#6012)
authorAzamat Hackimov <azamat.hackimov@gmail.com>
Thu, 19 Aug 2010 16:57:44 +0000 (16:57 +0000)
committerAzamat Hackimov <azamat.hackimov@gmail.com>
Thu, 19 Aug 2010 16:57:44 +0000 (16:57 +0000)
Now each locale-file have direction string (ltr - left-to-right - by default).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4005 e93f8b46-1217-0410-a6f0-8f06a7374b81

45 files changed:
app/views/layouts/base.rhtml
config/locales/bg.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/da.yml
config/locales/de.yml
config/locales/el.yml
config/locales/en-GB.yml
config/locales/en.yml
config/locales/es.yml
config/locales/eu.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hr.yml
config/locales/hu.yml
config/locales/id.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ko.yml
config/locales/lt.yml
config/locales/lv.yml
config/locales/mn.yml
config/locales/nl.yml
config/locales/no.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sr-YU.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/th.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-TW.yml
config/locales/zh.yml
public/stylesheets/rtl.css [moved from public/themes/rtl/stylesheets/application.css with 76% similarity]
public/themes/rtl/stylesheets/context_menu.css [deleted file]

index 2daae7c..0393815 100644 (file)
@@ -7,6 +7,7 @@
 <meta name="keywords" content="issue,bug,tracker" />
 <%= favicon %>
 <%= stylesheet_link_tag 'application', :media => 'all' %>
+<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
 <%= javascript_include_tag :defaults %>
 <%= heads_for_wiki_formatter %>
 <!--[if IE]>
index 320c209..d31abee 100644 (file)
@@ -1,4 +1,5 @@
 bg:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 3d476ae..fbc0c28 100644 (file)
@@ -1,6 +1,7 @@
 #Ernad Husremovic hernad@bring.out.ba
 
 bs:
+  direction: ltr
   date:
     formats:
       default: "%d.%m.%Y"
index 913d2f3..b9adf3e 100644 (file)
@@ -1,4 +1,5 @@
 ca:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 9ceb21e..88bb99e 100644 (file)
@@ -1,4 +1,5 @@
 cs:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index b241a52..f70deb0 100644 (file)
@@ -3,6 +3,7 @@
 # updated and upgraded to 0.9 by Morten Krogh Andersen (http://www.krogh.net)
 
 da:
+  direction: ltr
   date:
     formats:
       default: "%d.%m.%Y"
index 411e9e9..5761703 100644 (file)
@@ -2,6 +2,7 @@
 # by Clemens Kofler (clemens@railway.at)
 
 de:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index cb4941c..d505c38 100644 (file)
@@ -2,6 +2,7 @@
 # by Vaggelis Typaldos (vtypal@gmail.com),  Spyros Raptis (spirosrap@gmail.com)
 
 el:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 24aa6e9..e087c35 100644 (file)
@@ -1,4 +1,5 @@
 en-GB:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index b3d8751..a6b6a4f 100644 (file)
@@ -1,4 +1,6 @@
 en:
+  # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
@@ -64,6 +66,11 @@ en:
         other: "almost {{count}} years"
 
   number:
+    # Default format for numbers
+    format:
+      separator: "." 
+      delimiter: ""
+      precision: 3
     human:
       format:
         delimiter: ""
index e7abd43..8f996b1 100644 (file)
@@ -141,6 +141,7 @@ es:
       attributes:
         # Overrides model and default messages.
 
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 350f238..a5937cf 100644 (file)
@@ -3,6 +3,7 @@
 # 2010-01-25
 # Distributed under the same terms as the Redmine itself.
 eu:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index b6b48ba..4645b69 100644 (file)
@@ -2,6 +2,7 @@
 # by Marko Seppä (marko.seppa@gmail.com)
 
 fi:
+  direction: ltr
   date:
     formats:
       default: "%e. %Bta %Y"
index 8eb82ad..ff3be75 100644 (file)
@@ -4,6 +4,7 @@
 # contributor: Thibaut Cuvelier - Developpez.com
 
 fr:
+  direction: ltr
   date:
     formats:
       default: "%d/%m/%Y"
index 2a1d97e..68d26ba 100644 (file)
@@ -45,6 +45,7 @@ gl:
           tb: "TB"
   
   
+  direction: ltr
   date:
     formats:
       default:  "%e/%m/%Y"
index 532c601..053776c 100644 (file)
@@ -3,6 +3,7 @@
 # Jul 2010 - Updated by Orgad Shaneh (orgads@gmail.com)
 
 he:
+  direction: rtl
   date:
     formats:
       default: "%d/%m/%Y"
index 442adef..7324e42 100644 (file)
@@ -2,6 +2,7 @@
 # by Helix d.o.o. (info@helix.hr)
 
 hr:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 088027f..8c1a1bb 100644 (file)
@@ -6,6 +6,7 @@
 # updated by Gábor Takács (taky77@gmail.com)
 
 "hu":
+  direction: ltr
   date:
     formats:
       default: "%Y.%m.%d."
index ec6688e..7ea96f5 100644 (file)
@@ -2,6 +2,7 @@
 # by Raden Prabowo (cakbowo@gmail.com)
 
 id:
+  direction: ltr
   date:
     formats:
       default: "%d-%m-%Y"
index aec2c8e..37f0b41 100644 (file)
@@ -3,6 +3,7 @@
 # by Diego Pierotto (ita.translations@tiscali.it)
 
 it:
+  direction: ltr
   date:
     formats:
       default: "%d-%m-%Y"
index 4c513fe..26db1d2 100644 (file)
@@ -3,6 +3,7 @@
 # AR error messages are basically taken from Ruby-GetText-Package. Thanks to Masao Mutoh.
 
 ja:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index d79c86c..1998e76 100644 (file)
@@ -4,6 +4,7 @@
 # by Yonghwan SO(please insert your email), last update at 2009-09-11
 # last update at 2010-01-23 by Kihyun Yoon
 ko:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 9bcafc7..1aad337 100644 (file)
@@ -4,6 +4,7 @@
 #                      and Sergej Jegorov sergej.jegorov@gmail.com
 #                                         and Gytis Gurklys gytis.gurklys@gmail.com
 lt:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 70822de..70bc4f7 100644 (file)
@@ -1,6 +1,7 @@
 # translated by Dzintars Bergs (dzintars.bergs@gmail.com)
 
 lv:
+  direction: ltr
   date:
     formats:
       default: "%d.%m.%Y"
index 5b4b79e..713890d 100644 (file)
@@ -1,4 +1,5 @@
 mn:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 46c5ca8..d86a00b 100644 (file)
@@ -1,4 +1,5 @@
 nl:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 7d49537..9603c92 100644 (file)
@@ -3,6 +3,7 @@
   support:
     array:
       sentence_connector: "og"
+  direction: ltr
   date:
     formats:
       default: "%d.%m.%Y"
index 2dadc84..2deeb9e 100644 (file)
@@ -33,6 +33,7 @@ pl:
           gb: "GB"
           tb: "TB"
 
+  direction: ltr
   date:
     formats:
       default: "%Y-%m-%d"
index a66f237..1cb7f25 100644 (file)
@@ -1,5 +1,6 @@
 pt-BR:
   # formatos de data e hora
+  direction: ltr
   date:
     formats:
       default: "%d/%m/%Y"
index 615f316..c7bbe5b 100644 (file)
@@ -6,6 +6,7 @@ pt:
       sentence_connector: "e"
       skip_last_comma: true
     
+  direction: ltr
   date:
     formats:
       default: "%d/%m/%Y"
index 45fdd1e..9d4ae11 100644 (file)
@@ -1,4 +1,5 @@
 ro:
+  direction: ltr
   date:
     formats:
       default: "%d-%m-%Y"
index 9d9e5e0..ada2b0f 100644 (file)
@@ -11,6 +11,7 @@
 # была возможность минимальной локализации приложения на русский язык.
 
 ru:
+  direction: ltr
   date:
     formats:
       default: "%d.%m.%Y"
index 0b2351e..1ea796f 100644 (file)
@@ -1,4 +1,5 @@
 sk:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index a51cd97..06fda64 100644 (file)
@@ -1,4 +1,5 @@
 sl:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index bc8a854..d290f62 100644 (file)
@@ -1,6 +1,7 @@
 # Serbian translations for Redmine
 # by Vladimir Medarović (vlada@medarovic.com)
 sr-YU:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 0c022ee..e5ef865 100644 (file)
@@ -1,6 +1,7 @@
 # Serbian translations for Redmine
 # by Vladimir Medarović (vlada@medarovic.com)
 sr:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 42f0bc9..6e9fa8a 100644 (file)
@@ -131,6 +131,7 @@ sv:
         not_same_project: "tillhör inte samma projekt"
         circular_dependency: "Denna relation skulle skapa ett cirkulärt beroende"
 
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index eaf4cc2..539a5c9 100644 (file)
@@ -1,4 +1,5 @@
 th:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index db43309..d91cfcf 100644 (file)
@@ -5,6 +5,7 @@ tr:
   locale:
     native_name: Türkçe
     address_separator: " "
+  direction: ltr
   date:
     formats:
       default: "%d.%m.%Y"
index 951a546..bec1658 100644 (file)
@@ -1,4 +1,5 @@
 uk:
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index f8ca507..1b5d435 100644 (file)
@@ -140,6 +140,7 @@ vi:
         not_same_project: "không thuộc cùng dự án"
         circular_dependency: "quan hệ có thể gây ra lặp vô tận"
 
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index 5a08041..55b54bd 100644 (file)
@@ -3,6 +3,7 @@
 # See http://github.com/svenfuchs/rails-i18n/ for details.
 
 "zh-TW":
+  direction: ltr
   date:
     formats:
       # Use the strftime parameters for formats.
index eeac629..ddee001 100644 (file)
@@ -2,6 +2,7 @@
 # by tsechingho (http://github.com/tsechingho)
 
 zh:
+  direction: ltr
   date:
     formats:
       default: "%Y-%m-%d"
similarity index 76%
rename from public/themes/rtl/stylesheets/application.css
rename to public/stylesheets/rtl.css
index 74f20b4..9136673 100644 (file)
@@ -1,5 +1,3 @@
-@import url(../../alternate/stylesheets/application.css);
-
 body, #wrapper { direction: rtl;}
 
 #quick-search { float: left; }
@@ -20,11 +18,23 @@ body, #wrapper { direction: rtl;}
        float: right;
        margin-left: auto;
 }
-.tabular p { clear: right; }
+.tabular p
+{
+       clear: right;
+}
 .tabular label.block { text-align: right; }
-
-.icon { background-position: 100% 40%; padding-right: 20px; padding-left: 0px; }
-div#activity dt, #search-results dt { background-position: 100% 50%; padding-right: 20px; padding-left: 0px; }
+.icon
+{
+       background-position: 100% 40%;
+       padding-right: 20px;
+       padding-left: 0px;
+}
+div#activity dt, #search-results dt
+{
+       background-position: 100% 50%;
+       padding-right: 20px;
+       padding-left: 0px;
+}
 #content .tabs ul li { float: right; }
 #content .tabs ul { padding-left: auto; padding-right: 1em; }
 table.progress { float: right; }
@@ -48,3 +58,9 @@ table.list td.buttons a { padding-right: 20px; }
 div#issue-changesets { float: left; margin-right: 1em; margin-left: 0 }
 #activity dt, .journal { clear: right; }
 .journal-link { float: left; }
+div.wiki pre { direction: ltr; }
+
+#context-menu li.folder ul { left:auto; right:168px; }
+#context-menu li.folder>ul { left:auto; right:148px; }
+
+#context-menu li a.submenu { background:url("../images/bullet_arrow_left.png") left no-repeat; }
diff --git a/public/themes/rtl/stylesheets/context_menu.css b/public/themes/rtl/stylesheets/context_menu.css
deleted file mode 100644 (file)
index c400d3e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-@import url(../../../stylesheets/context_menu.css);
-
-#context-menu li.folder ul { left:auto; right:168px; }
-#context-menu li.folder>ul { left:auto; right:148px; }
-
-#context-menu li a.submenu { background:url("../../../images/bullet_arrow_left.png") left no-repeat; }