mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Make save and saving messages translatable in subscriptions items panel
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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1056,6 +1056,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
|
||||
|
||||
Reference in New Issue
Block a user