From e52ab2ecf1b267d8a6196abea5abcc9afe895c5f Mon Sep 17 00:00:00 2001 From: Simon Cossar Date: Tue, 14 Apr 2015 19:02:52 -0700 Subject: [PATCH] Update rtl conditional check in DiscourseSassCompiler --- lib/sass/discourse_sass_compiler.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sass/discourse_sass_compiler.rb b/lib/sass/discourse_sass_compiler.rb index ebb799ecc8d..bde2f84db00 100644 --- a/lib/sass/discourse_sass_compiler.rb +++ b/lib/sass/discourse_sass_compiler.rb @@ -64,12 +64,12 @@ class DiscourseSassCompiler }.merge(debug_opts)).render # Check if CSS needs to be RTLed after compilation - # and run RTLit gem on compiled CSS if true and RTLit gem is available + # and run R2 gem on compiled CSS if true and R2 gem is available css_output = css - if GlobalSetting.rtl_css + if !SiteSetting.allow_user_locale && SiteSetting.default_locale.in?(%w(he ar fa_IR)) begin - require 'rtlit' - css_output = RTLit::Converter.to_rtl(css) if defined?(RTLit) + require 'r2' + css_output = R2.r2(css) if defined?(R2) rescue; end end css_output