Commit 4d2d5a24 authored by cp's avatar cp

humanize locale tags

git-svn-id: http://svn.sp-service.com.ua/svnroot/svn/base_site/trunk@5 d975c5f9-4e99-4c31-b122-d878075b96d9
parent c3b6b53d
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
%ul.nav.nav-tabs %ul.nav.nav-tabs
-locales.each do |locale| -locales.each do |locale|
%li{class: ('active' if locale == I18n.locale.to_s)} %li{class: ('active' if locale == I18n.locale.to_s)}
%a{data: {toggle: 'tab'}, href: ".#{locale}_tab"}= t("locale.#{locale}") %a{data: {toggle: 'tab'}, href: ".#{locale}_tab"}= t("humanizers.locale.#{locale}")
- if locales.count > 1 - if locales.count > 1
%li.navbar-btn.dropdown#language_selector %li.navbar-btn.dropdown#language_selector
%button.btn.btn-default.btn-sm.style_lang.dropdown-toggle(id="language_selector" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false") %button.btn.btn-default.btn-sm.style_lang.dropdown-toggle(id="language_selector" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false")
= t("locale.#{I18n.locale}") = t("humanizers.locale.#{I18n.locale}")
%b.caret %b.caret
%ul.dropdown-menu.pull-right(aria-labelledby="language_selector") %ul.dropdown-menu.pull-right(aria-labelledby="language_selector")
-locales.each do |locale| -locales.each do |locale|
%li{class: ('active' if I18n.locale == locale.to_sym)}= link_to t("locale.#{locale}"), %li{class: ('active' if I18n.locale == locale.to_sym)}= link_to t("humanizers.locale.#{locale}"),
current_url_for_locale(locale), data: { no_turbolink: true } current_url_for_locale(locale), data: { no_turbolink: true }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment