diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-07-18 12:51:45 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-07-18 12:51:45 +0100 |
commit | 6d67f4df65f8b56c9d54d71d449d46b1c6c92be2 (patch) | |
tree | 92067ff1d11b3000040162a98bb751f544ba42d1 | |
parent | 62c3e800542b3ea3a3b19fbaaf044f3209d4c1de (diff) |
gettext_i18n_rails patches I18n.locale= so that it changes underscores in locale names (as used in the gettext world) to the dashes that I18n prefers. So for locales that include an underscore the equality test was returning false. Use FastGettext.locale instead to be consistent. Fixes #998.
-rw-r--r-- | app/views/general/_locale_switcher.html.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/general/_locale_switcher.html.erb b/app/views/general/_locale_switcher.html.erb index d0040bb0d..a318f61f3 100644 --- a/app/views/general/_locale_switcher.html.erb +++ b/app/views/general/_locale_switcher.html.erb @@ -2,7 +2,7 @@ <div id="user_locale_switcher"> <div class="btn-group"> <% for possible_locale in FastGettext.default_available_locales %> - <% if possible_locale == I18n.locale.to_s %> + <% if possible_locale == FastGettext.locale %> <a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a> <% else %> <a href="<%= url_for params.merge(:locale => possible_locale) %>" class="btn"><%= locale_name(possible_locale) %></a> |