Browse Source

Adding support for new locale schema in preview

development
Godwin 10 years ago
parent
commit
5f2a609dde
  1. 2
      app/views/shared/_footer.html.haml

2
app/views/shared/_footer.html.haml

@ -18,7 +18,7 @@
%ul
-I18n.backend.available_locales.each do |locale|
%li
%a{href: request.original_url.gsub(/^(https?:\/\/)(..\.)?(.*)$/, '\1' + locale + '.\3')}
%a{href: request.original_url.gsub(/^(https?:\/\/)(preview\-)?(..\.)?(.*)$/, '\1\2' + locale + '.\4')}
=_! locale.upcase
%span=I18n.t("languages.#{locale}", locale: locale, context: I18n.t("languages.#{locale}"))
.copy

Loading…
Cancel
Save