diff options
author | ThibG <thib@sitedethib.com> | 2020-12-05 22:03:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-05 22:03:28 +0100 |
commit | 25f725d67a6d2542cd586ab7c56baca572eb4f88 (patch) | |
tree | 4272423a87ddacaf63efc0ee6cd8df4a63e61419 /app/helpers | |
parent | 13df125b6c75923ccc21a5c57053e680cea75f38 (diff) | |
parent | 40e2de3904c553f3fe4ec30cdbe3ae0e89796291 (diff) |
Merge pull request #1470 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/helpers')
-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 2936545a0..5a9496bd4 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' |