Skip to content
This repository has been archived by the owner on Dec 22, 2018. It is now read-only.

Commit

Permalink
Fix right-to-left locales
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Schwyn authored and frenkel committed Oct 15, 2018
1 parent 86ebaa8 commit e841e24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ def set_locale
end
end

if I18n.locale == :fa
@rtl = true
else
@rtl = false
end
@rtl = %i(ar fa).include?(I18n.locale)
end
end
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<%= csrf_meta_tags %>
</head>

<body style="<%= 'direction:rtl;' if [:ar].include?(I18n.locale)%> <%= 'background: #30363e' if user_signed_in? %>">
<body style="<%= 'direction:rtl;' if @rtl %> <%= 'background: #30363e' if user_signed_in? %>">

<% if user_signed_in? %>
<nav class="top-bar" data-topbar>
Expand Down

0 comments on commit e841e24

Please sign in to comment.