]> cat aescling's git repositories - mastodon.git/commitdiff
Fix `ku` locale not being right-to-left (#15252)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 30 Nov 2020 22:02:32 +0000 (23:02 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Nov 2020 22:02:32 +0000 (23:02 +0100)
app/helpers/application_helper.rb

index 8914b015ce34c3ebf4229188b92fca6b8278c4e7..bf5742d34f2ff4107c2d6d73db99482e83cd274c 100644 (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'