From eb42e81afc96f0d2d31bb4b0f2331f966a99bdee Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Tue, 4 Jun 2019 20:23:33 +0100 Subject: [PATCH] Make some text entries translatable in create subscription pages: title in step 1 details and 4 review and date placeholders in step 1 details --- app/views/admin/subscriptions/_details.html.haml | 6 +++--- app/views/admin/subscriptions/_review.html.haml | 2 +- config/locales/en.yml | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/admin/subscriptions/_details.html.haml b/app/views/admin/subscriptions/_details.html.haml index 7dedbf26f4..675c7671a9 100644 --- a/app/views/admin/subscriptions/_details.html.haml +++ b/app/views/admin/subscriptions/_details.html.haml @@ -1,5 +1,5 @@ %fieldset.no-border-bottom - %legend{ align: 'center'}= t("admin.subscriptions.form.details") + %legend{ align: 'center'}= t(".details") .row .seven.columns.alpha.field %label{ for: 'customer_id'}= t('admin.customer') @@ -34,11 +34,11 @@ .row .seven.columns.alpha.field %label{ for: 'begins_at'}= t('admin.begins_at') - %input.fullwidth#begins_at{ name: 'begins_at', type: 'text', placeholder: 'Select A Date', datepicker: 'subscription.begins_at', required: true, ng: { model: 'subscription.begins_at' } } + %input.fullwidth#begins_at{ name: 'begins_at', type: 'text', placeholder: "#{t('.begins_at_placeholder')}", datepicker: 'subscription.begins_at', required: true, ng: { model: 'subscription.begins_at' } } .error{ ng: { show: 'subscription_form.$submitted && subscription_details_form.begins_at.$error.required' } }= t(:error_required) .error{ ng: { repeat: 'error in errors.begins_at', show: 'subscription_details_form.begins_at.$pristine' } } {{ error }} .two.columns   .seven.columns.omega.field %label{ for: 'ends_at'}= t('admin.ends_at') - %input.fullwidth#ends_at{ name: 'ends_at', type: 'text', placeholder: 'Optional', datepicker: 'subscription.begins_at', ng: { model: 'subscription.ends_at' } } + %input.fullwidth#ends_at{ name: 'ends_at', type: 'text', placeholder: "#{t('.ends_at_placeholder')}", datepicker: 'subscription.begins_at', ng: { model: 'subscription.ends_at' } } .error{ ng: { repeat: 'error in errors.ends_at', show: 'subscription_details_form.ends_at.$pristine' } } {{ error }} diff --git a/app/views/admin/subscriptions/_review.html.haml b/app/views/admin/subscriptions/_review.html.haml index 4d06cb7859..0bcaf2eab2 100644 --- a/app/views/admin/subscriptions/_review.html.haml +++ b/app/views/admin/subscriptions/_review.html.haml @@ -1,5 +1,5 @@ %fieldset.no-border-bottom - %legend{ align: 'center'}= t("admin.subscriptions.form.review") + %legend{ align: 'center'}= t(".details") .row .eight.columns.alpha .row diff --git a/config/locales/en.yml b/config/locales/en.yml index da9a4c45ce..82bb5bca66 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1047,6 +1047,8 @@ en: charges_not_allowed: Charges are not allowed by this customer no_default_card: Customer has no cards available to charge card_ok: Customer has a card available to charge + begins_at_placeholder: "Select a Date" + ends_at_placeholder: "Optional" loading_flash: loading: LOADING SUBSCRIPTIONS review: