From 581a246b4fbc3a7cab32e272619cf9af48a5dcf3 Mon Sep 17 00:00:00 2001 From: Robin Klaus Date: Fri, 31 Jul 2020 16:16:06 +1000 Subject: [PATCH 1/2] Added translation key for subscriptions heading --- config/locales/en.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 3726167337..a0c3551a46 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -347,6 +347,8 @@ en: volume: Volume items: Items select_all: Select all + subscription: + subscriptions: Subscriptions # General form elements quick_search: Quick Search From 85e9819c3b262dd93069a2a6b7bb3b4a1e78375a Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Fri, 31 Jul 2020 08:59:11 +0100 Subject: [PATCH 2/2] Make more translation keys use lazy look ups --- app/views/admin/subscriptions/_form.html.haml | 2 +- app/views/admin/subscriptions/edit.html.haml | 2 +- app/views/admin/subscriptions/index.html.haml | 4 ++-- app/views/admin/subscriptions/new.html.haml | 2 +- .../subscriptions/setup_explanation.html.haml | 2 +- config/locales/en.yml | 16 ++++++++++------ 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/views/admin/subscriptions/_form.html.haml b/app/views/admin/subscriptions/_form.html.haml index 2b3a06673b..cfb4feddaf 100644 --- a/app/views/admin/subscriptions/_form.html.haml +++ b/app/views/admin/subscriptions/_form.html.haml @@ -4,7 +4,7 @@ %a.button{ href: main_app.admin_subscriptions_path, ng: { show: "['details','review'].indexOf(view) >= 0" } }= t(:cancel) %input{ type: "button", value: t(:back), ng: { click: 'back()', show: '!!backCallbacks[view]'} } %input.red{ type: "button", value: t(:next), ng: { click: 'next()', show: '!!nextCallbacks[view]' } } - %input.red{ type: "submit", value: t('admin.subscriptions.create'), ng: { show: "view == 'review'" } } + %input.red{ type: "submit", value: t('.create'), ng: { show: "view == 'review'" } } %div{ ng: { show: 'subscription.id' } } %a.button{ href: main_app.admin_subscriptions_path }= t(:close) %input.red{ type: "button", value: t(:review), ng: { click: "setView('review')", show: "view != 'review'" } } diff --git a/app/views/admin/subscriptions/edit.html.haml b/app/views/admin/subscriptions/edit.html.haml index 2084e9d761..51b4c40045 100644 --- a/app/views/admin/subscriptions/edit.html.haml +++ b/app/views/admin/subscriptions/edit.html.haml @@ -1,5 +1,5 @@ - content_for :page_title do - =t('admin.subscriptions.edit') + =t('.title') -# - content_for :page_actions do -# %li= button_link_to "Back to subscriptions list", main_app.admin_subscriptions_path, icon: 'icon-arrow-left' diff --git a/app/views/admin/subscriptions/index.html.haml b/app/views/admin/subscriptions/index.html.haml index 4dd37c4f75..f6688693f7 100644 --- a/app/views/admin/subscriptions/index.html.haml +++ b/app/views/admin/subscriptions/index.html.haml @@ -1,5 +1,5 @@ - content_for :page_title do - = t('admin.subscriptions.subscriptions') + = t('.title') - content_for :main_ng_app_name do = "admin.subscriptions" @@ -7,7 +7,7 @@ - content_for :page_actions do %li %a.button.icon-plus#new-subscription{ href: "javascript:void(0)", "new-subscription-dialog" => true } - = t('admin.subscriptions.new') + = t('.new') = render :partial => 'spree/admin/shared/order_sub_menu' diff --git a/app/views/admin/subscriptions/new.html.haml b/app/views/admin/subscriptions/new.html.haml index c82824891c..6ac3749982 100644 --- a/app/views/admin/subscriptions/new.html.haml +++ b/app/views/admin/subscriptions/new.html.haml @@ -1,7 +1,7 @@ -# = render :partial => 'spree/shared/error_messages', :locals => { :target => @enterprise } - content_for :page_title do - =t('admin.subscriptions.new') + =t('.title') -# - content_for :page_actions do -# %li= button_link_to "Back to subscriptions list", main_app.admin_subscriptions_path, icon: 'icon-arrow-left' diff --git a/app/views/admin/subscriptions/setup_explanation.html.haml b/app/views/admin/subscriptions/setup_explanation.html.haml index 676483a55e..a3e7a8017e 100644 --- a/app/views/admin/subscriptions/setup_explanation.html.haml +++ b/app/views/admin/subscriptions/setup_explanation.html.haml @@ -1,4 +1,4 @@ -%h1.text-center.margin-bottom-30= t('admin.subscription.subscriptions') +%h1.text-center.margin-bottom-30= t('.title') .row .four.columns.alpha   diff --git a/config/locales/en.yml b/config/locales/en.yml index a0c3551a46..80803d7aa5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -347,8 +347,6 @@ en: volume: Volume items: Items select_all: Select all - subscription: - subscriptions: Subscriptions # General form elements quick_search: Quick Search @@ -1093,10 +1091,13 @@ en: name: "Enterprise Fee Summary" description: "Summary of Enterprise Fees collected" subscriptions: - subscriptions: Subscriptions - new: New Subscription - create: Create Subscription - edit: Edit Subscription + index: + title: "Subscriptions" + new: "New Subscription" + new: + title: "New Subscription" + edit: + title: "Edit Subscription" table: edit_subscription: Edit Subscription pause_subscription: Pause Subscription @@ -1105,6 +1106,7 @@ en: filters: query_placeholder: "Search by email..." setup_explanation: + title: "Subscriptions" just_a_few_more_steps: 'Just a few more steps before you can begin:' enable_subscriptions: "Enable subscriptions for at least one of your shops" enable_subscriptions_step_1_html: 1. Go to the %{enterprises_link} page, find your shop, and click "Manage" @@ -1118,6 +1120,8 @@ en: create_at_least_one_schedule_step_3: 3. Click '+ New Schedule', and fill out the form once_you_are_done_you_can_html: Once you are done, you can %{reload_this_page_link} reload_this_page: reload this page + form: + create: "Create Subscription" steps: details: 1. Basic Details address: 2. Address