Browse Source

Fix `ku` locale not being right-to-left (#15252)

master
Eugen Rochko 3 years ago
committed by GitHub
parent
commit
a55e6e99c0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      app/helpers/application_helper.rb

+ 8
- 1
app/helpers/application_helper.rb View File

@ -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'

Loading…
Cancel
Save