1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-24 23:26:42 +09:00

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

This commit is contained in:
Eugen Rochko 2020-11-30 23:02:32 +01:00 committed by GitHub
parent 68775b6039
commit a55e6e99c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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'