From 24dab58de79a1fda1997bdaad1fb655042b68676 Mon Sep 17 00:00:00 2001 From: Hugo Daniel Date: Thu, 29 Nov 2018 15:15:56 +0100 Subject: [PATCH] Lazy load translations and add keys --- app/views/spree/admin/payment_methods/edit.html.haml | 4 ++-- app/views/spree/admin/payment_methods/new.html.haml | 4 ++-- config/locales/en.yml | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/spree/admin/payment_methods/edit.html.haml b/app/views/spree/admin/payment_methods/edit.html.haml index 527e19df2f..9d8f6b147d 100644 --- a/app/views/spree/admin/payment_methods/edit.html.haml +++ b/app/views/spree/admin/payment_methods/edit.html.haml @@ -1,12 +1,12 @@ - content_for :page_title do - = t(:editing_payment_method) + = t('.editing_payment_method') %i.icon-arrow-right = @payment_method.name - content_for :page_actions do %li = button_link_to t(:new), spree.new_admin_payment_method_path, icon: 'icon-plus' %li - = button_link_to t(:back_to_payment_methods_list), spree.admin_payment_methods_path, icon: 'icon-arrow-left' + = button_link_to t('.back_to_payment_methods_list'), spree.admin_payment_methods_path, icon: 'icon-arrow-left' = render partial: 'spree/shared/error_messages', locals: { target: @payment_method } = form_for @payment_method, url: admin_payment_method_path(@payment_method) do |f| %fieldset.no-border-top diff --git a/app/views/spree/admin/payment_methods/new.html.haml b/app/views/spree/admin/payment_methods/new.html.haml index 8a05230dfe..c3039cc169 100644 --- a/app/views/spree/admin/payment_methods/new.html.haml +++ b/app/views/spree/admin/payment_methods/new.html.haml @@ -1,8 +1,8 @@ - content_for :page_title do - = t(:new_payment_method) + = t('.new_payment_method') - content_for :page_actions do %li - = button_link_to t(:back_to_payment_methods_list), admin_payment_methods_path, icon: 'icon-arrow-left' + = button_link_to t('.back_to_payment_methods_list'), admin_payment_methods_path, icon: 'icon-arrow-left' = render partial: 'spree/shared/error_messages', locals: { target: @payment_method } = form_for @payment_method, url: collection_url do |f| %fieldset.no-border-top diff --git a/config/locales/en.yml b/config/locales/en.yml index 9d4320f53e..28bb006ae7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2696,6 +2696,12 @@ See the %{link} to find out more about %{sitename}'s features and to start using other: "You have %{count} active order cycles." manage_order_cycles: "MANAGE ORDER CYCLES" payment_methods: + new: + new_payment_method: "New Payment Method" + back_to_payment_methods_list: "Back To Payment Methods List" + edit: + editing_payment_method: "Editing Payment Method" + back_to_payment_methods_list: "Back To Payment Methods List" stripe_connect: enterprise_select_placeholder: Choose... loading_account_information_msg: Loading account information from stripe, please wait...