mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Merge pull request #3900 from luisramos0/subs_trans
Missing translations in Subscriptions
This commit is contained in:
@@ -10,14 +10,14 @@ angular.module("admin.subscriptions").controller "ProductsPanelController", ($sc
|
||||
|
||||
$scope.save = ->
|
||||
$scope.saving = true
|
||||
StatusMessage.display 'progress', 'Saving...'
|
||||
StatusMessage.display 'progress', t('js.saving')
|
||||
$scope.subscription.update().then (response) ->
|
||||
$scope.saving = false
|
||||
StatusMessage.display 'success', 'Saved'
|
||||
StatusMessage.display 'success', t('js.changes_saved')
|
||||
, (response) ->
|
||||
$scope.saving = false
|
||||
if response.data?.errors?
|
||||
keys = Object.keys(response.data.errors)
|
||||
StatusMessage.display 'failure', response.data.errors[keys[0]][0]
|
||||
else
|
||||
StatusMessage.display 'success', 'Saved'
|
||||
StatusMessage.display 'success', t('js.changes_saved')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#new-subscription-dialog
|
||||
.text-normal.margin-bottom-30.text-center
|
||||
= t('admin.subscriptions.index.please_select_a_shop')
|
||||
= t('js.admin.subscriptions.new.please_select_a_shop')
|
||||
|
||||
%form{ name: 'new_subscription_form', novalidate: true, ng: { submit: "newSubscription()" }}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
%input.ofn-select2.fullwidth#new_subscription_shop_id{ ng: { model: 'shop_id' }, required: true, name: 'shop_id', data: 'shops' }
|
||||
%div{ ng: { show: "submitted && new_subscription_form.$pristine" } }
|
||||
.error{ ng: { show: "new_subscription_form.shop_id.$error.required" } }
|
||||
= t('admin.subscriptions.index.please_select_a_shop')
|
||||
= t('js.admin.subscriptions.new.please_select_a_shop')
|
||||
|
||||
.text-center
|
||||
%input.button.red.icon-plus{ type: 'submit', value: t('continue') }
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.filter_select.five.columns.alpha
|
||||
%label{ :for => 'query', ng: {class: '{disabled: !shop_id}'} }=t('admin.quick_search')
|
||||
%br
|
||||
%input.fullwidth{ :type => "text", :id => 'query', ng: { model: 'query', disabled: '!shop_id'}, :placeholder => "Search by email..." }
|
||||
%input.fullwidth{ :type => "text", :id => 'query', ng: { model: 'query', disabled: '!shop_id'}, :placeholder => "#{t('.query_placeholder')}" }
|
||||
.filter_select.four.columns
|
||||
%label{ :for => 'shop_id', ng: { bind: "shop_id ? '#{t('admin.shop')}' : '#{t('admin.variant_overrides.index.select_a_shop')}'" } }
|
||||
%br
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
= render 'products'
|
||||
%a.button.update.fullwidth{ ng: { class: "{disabled: saved() && !saving, saving: saving}", click: "save()" } }
|
||||
%span{ ng: {hide: "saved() || saving" } }
|
||||
SAVE
|
||||
= t('.save')
|
||||
%i.icon-save
|
||||
%span{ ng: {show: "saved() && !saving" } }
|
||||
SAVED
|
||||
= t('.saved')
|
||||
%i.icon-ok-sign
|
||||
%span{ ng: {show: "saving" } }
|
||||
SAVING
|
||||
= t('.saving')
|
||||
%i.icon-refresh
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1013,12 +1013,13 @@ en:
|
||||
new: New Subscription
|
||||
create: Create Subscription
|
||||
edit: Edit Subscription
|
||||
index:
|
||||
please_select_a_shop: Please select a shop
|
||||
table:
|
||||
edit_subscription: Edit Subscription
|
||||
pause_subscription: Pause Subscription
|
||||
unpause_subscription: Unpause Subscription
|
||||
cancel_subscription: Cancel Subscription
|
||||
filters:
|
||||
query_placeholder: "Search by email..."
|
||||
setup_explanation:
|
||||
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"
|
||||
@@ -1051,6 +1052,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:
|
||||
@@ -1058,6 +1061,10 @@ en:
|
||||
address: Address
|
||||
products: Products
|
||||
no_open_or_upcoming_order_cycle: "No Upcoming Order Cycle"
|
||||
products_panel:
|
||||
save: "SAVE"
|
||||
saving: "SAVING"
|
||||
saved: "SAVED"
|
||||
product_already_in_order: This product has already been added to the order. Please edit the quantity directly.
|
||||
orders:
|
||||
number: Number
|
||||
@@ -1244,6 +1251,7 @@ en:
|
||||
state: State
|
||||
postcode: Postcode
|
||||
postcode_placeholder: eg. 3070
|
||||
suburb: Suburb
|
||||
state: State
|
||||
country: Country
|
||||
unauthorized: Unauthorized
|
||||
@@ -2578,6 +2586,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
add_a_new_customer_for: "Add a new customer for %{shop_name}"
|
||||
customer_placeholder: "customer@example.org"
|
||||
valid_email_error: "Please enter a valid email address"
|
||||
subscriptions:
|
||||
new:
|
||||
please_select_a_shop: "Please select a shop"
|
||||
insufficient_stock: "Insufficient stock available, only %{on_hand} remaining"
|
||||
out_of_stock:
|
||||
reduced_stock_available: Reduced stock available
|
||||
|
||||
Reference in New Issue
Block a user