From d5d92062295b52749003d3bb538d8f079d315aaf Mon Sep 17 00:00:00 2001 From: Godwin Date: Tue, 13 Jun 2017 10:01:26 -0700 Subject: [PATCH] Added backup locale lists to locale not available page --- .../locale_not_available.html.haml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/application/locale_not_available.html.haml b/app/views/application/locale_not_available.html.haml index f9beb45..af09ea6 100644 --- a/app/views/application/locale_not_available.html.haml +++ b/app/views/application/locale_not_available.html.haml @@ -1,13 +1,13 @@ -= render :partial => 'application/header', :locals => {:image_file => 'runes.jpg'} += render partial: 'application/header', locals: {image_file: 'runes.jpg'} = row do - = columns(medium: 12) do - %p= _'error.locale_not_available.description', :p, @main_title_vars - %ul.locales - - @alt_lang_urls.each do |locale, url| - %li - - locale_translation = language_name(locale, true) - %a.button{href: url, lang: locale} - =_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale - %h2= _'error.locale_not_available.volunteer.title' - %p= _'error.locale_not_available.volunteer.description' - = render 'contact', cancel_btn: false, contact_reason: :website, locale: :en \ No newline at end of file + = columns(medium: 12) do + %p= _'error.locale_not_available.description', :p, @main_title_vars + %ul.locales + - (@alt_lang_urls || I18n.backend.enabled_locales.sort || [:en]).each do |locale, url| + %li + - locale_translation = language_name(locale, true) + %a.button{href: url, lang: locale} + =_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale + %h2= _'error.locale_not_available.volunteer.title' + %p= _'error.locale_not_available.volunteer.description' + = render 'contact', cancel_btn: false, contact_reason: :website, locale: :en