diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-11-30 23:02:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 23:02:32 +0100 |
commit | a55e6e99c0a8e757eca54ceb1b0496c7124ec9c4 (patch) | |
tree | d2b09a4ee55cec2f47bf75799938c526a810c482 /app | |
parent | 68775b60392152d32deda45a261bc1d4f848b44a (diff) |
Fix `ku` locale not being right-to-left (#15252)
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8914b015c..bf5742d34 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -7,6 +7,13 @@ module ApplicationHelper follow ).freeze + RTL_LOCALES = %i( + ar + fa + he + ku + ).freeze + def active_nav_class(*paths) paths.any? { |path| current_page?(path) } ? 'active' : '' end @@ -44,7 +51,7 @@ module ApplicationHelper end def locale_direction - if [:ar, :fa, :he].include?(I18n.locale) + if RTL_LOCALES.include?(I18n.locale) 'rtl' else 'ltr' |