Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--app/views/layouts/application.mobile.haml3
-rw-r--r--config/assets.yml2
-rw-r--r--config/environment.rb2
-rw-r--r--config/locale_settings.yml3
-rw-r--r--public/stylesheets/sass/rtl.sass3
6 files changed, 15 insertions, 0 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index f59d9832b..a73371500 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -22,6 +22,8 @@
= stylesheet_link_tag "blueprint/screen", :media => 'screen'
= stylesheet_link_tag "blueprint/print", :media => 'print'
= include_stylesheets :default, :media => 'all'
+ - if RTL_LANGUAGES.include? I18n.locale
+ = include_stylesheets :rtl, :media => 'all'
<!--[if IE]>
= javascript_include_tag "/javascripts/ie.js"
diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml
index eb7ca442d..f4816f721 100644
--- a/app/views/layouts/application.mobile.haml
+++ b/app/views/layouts/application.mobile.haml
@@ -17,6 +17,9 @@
= stylesheet_link_tag 'vendor/jquery.mobile-1.0a4.min', 'mobile'
= csrf_meta_tag
+
+ - if RTL_LANGUAGES.include? I18n.locale
+ = include_stylesheets :rtl, :media => 'all'
= yield(:head)
diff --git a/config/assets.yml b/config/assets.yml
index 65c3911a6..2efd4455a 100644
--- a/config/assets.yml
+++ b/config/assets.yml
@@ -77,4 +77,6 @@ stylesheets:
- public/stylesheets/vendor/fileuploader.css
- public/stylesheets/vendor/tipsy.css
- public/stylesheets/vendor/autoSuggest.css
+ rtl:
+ - public/stylesheets/rtl.css
diff --git a/config/environment.rb b/config/environment.rb
index a64956a34..5db0d7a6f 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -13,11 +13,13 @@ if File.exists?(File.expand_path("./config/locale_settings.yml"))
DEFAULT_LANGUAGE = (AVAILABLE_LANGUAGES.include?(locale_settings['default'])) ? locale_settings['default'] : AVAILABLE_LANGUAGES.keys[0].to_s
AVAILABLE_LANGUAGE_CODES = locale_settings['available'].keys.map { |v| v.to_s }
LANGUAGE_CODES_MAP = locale_settings['fallbacks']
+ RTL_LANGUAGES = locale_settings['rtl']
else
AVAILABLE_LANGUAGES = { :en => 'English' }
DEFAULT_LANGUAGE = 'en'
AVAILABLE_LANGUAGE_CODES = ['en']
LANGUAGE_CODES_MAP = {}
+ RTL_LANGUAGES = []
end
# Initialize the rails application
diff --git a/config/locale_settings.yml b/config/locale_settings.yml
index 38b53bd6e..f3a8e12d6 100644
--- a/config/locale_settings.yml
+++ b/config/locale_settings.yml
@@ -56,3 +56,6 @@ fallbacks:
zh:
- :zh-CN
- :zh-TW
+rtl:
+ - :ar
+ - :he
diff --git a/public/stylesheets/sass/rtl.sass b/public/stylesheets/sass/rtl.sass
new file mode 100644
index 000000000..1831ed4ac
--- /dev/null
+++ b/public/stylesheets/sass/rtl.sass
@@ -0,0 +1,3 @@
+body
+ :direction rtl
+ :text-align right