mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Translate unsaved products message correctly
This commit is contained in:
@@ -265,11 +265,11 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
|
||||
|
||||
$scope.displayDirtyProducts = ->
|
||||
if DirtyProducts.count() > 0
|
||||
message = if DirtyProducts.count() == 1 then t("one_product") else DirtyProducts.count() + t("products")
|
||||
StatusMessage.display 'notice', t("changes_to") + "#{message}" + t("remain_unsaved.")
|
||||
else
|
||||
StatusMessage.clear()
|
||||
count = DirtyProducts.count()
|
||||
switch count
|
||||
when 0 then StatusMessage.clear()
|
||||
when 1 then StatusMessage.display 'notice', t("one_product_unsaved")
|
||||
else StatusMessage.display 'notice', t("products_unsaved", n: count)
|
||||
|
||||
|
||||
filterSubmitProducts = (productsToFilter) ->
|
||||
|
||||
@@ -938,9 +938,8 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
success: "success"
|
||||
failure: "failure"
|
||||
unsaved_changes_confirmation: "Unsaved changes will be lost. Continue anyway?"
|
||||
one_product: "one product"
|
||||
changes_to: "Changes to"
|
||||
remain_unsaved: "remain unsaced"
|
||||
one_product_unsaved: "Changes to one product remain unsaved."
|
||||
products_unsaved: "Changes to %{n} products remain unsaved."
|
||||
add_manager: "Add a manager"
|
||||
is_already_manager: "is already a manager!"
|
||||
no_change_to_save: " No change to save"
|
||||
|
||||
Reference in New Issue
Block a user