diff --git a/localization/strings.pot b/localization/strings.pot index fcd9172d..d478ac0e 100644 --- a/localization/strings.pot +++ b/localization/strings.pot @@ -352,7 +352,7 @@ msgstr "" msgid "This means it is estimated that a new execution of this chore is tracked %s days after the last was tracked" msgstr "" -msgid "Removed %1$s %2$s of %3$s from stock" +msgid "Removed %1$s of %2$s from stock" msgstr "" msgid "About grocy" @@ -364,10 +364,10 @@ msgstr "" msgid "Released on" msgstr "" -msgid "Added %1$s %2$s of %3$s to stock" +msgid "Added %1$s of %2$s to stock" msgstr "" -msgid "Stock amount of %1$s is now %2$s %3$s" +msgid "Stock amount of %1$s is now %2$s" msgstr "" msgid "Tracked execution of chore %1$s on %2$s" diff --git a/public/viewjs/consume.js b/public/viewjs/consume.js index febda997..d49fb8d7 100644 --- a/public/viewjs/consume.js +++ b/public/viewjs/consume.js @@ -66,7 +66,7 @@ } Grocy.FrontendHelpers.EndUiBusy("consume-form"); - toastr.success(__t('Removed %1$s %2$s of %3$s from stock', Math.abs(result.amount), __n(Math.abs(result.amount), productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '
' + __t("Undo") + ''); + toastr.success(__t('Removed %1$s of %2$s from stock', Math.abs(result.amount) + " " + __n(Math.abs(result.amount), productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '
' + __t("Undo") + ''); $("#amount").attr("min", "1"); $("#amount").attr("max", "999999"); diff --git a/public/viewjs/inventory.js b/public/viewjs/inventory.js index 42fe2577..cd05cd0e 100644 --- a/public/viewjs/inventory.js +++ b/public/viewjs/inventory.js @@ -51,7 +51,7 @@ } Grocy.FrontendHelpers.EndUiBusy("inventory-form"); - toastr.success(__t('Stock amount of %1$s is now %2$s %3$s', productDetails.product.name, jsonForm.new_amount, __n(jsonForm.new_amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)) + '
' + __t("Undo") + ''); + toastr.success(__t('Stock amount of %1$s is now %2$s', productDetails.product.name, jsonForm.new_amount + " " + __n(jsonForm.new_amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)) + '
' + __t("Undo") + ''); $('#inventory-change-info').addClass('d-none'); $("#tare-weight-handling-info").addClass("d-none"); diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js index 169af253..ee813a6d 100644 --- a/public/viewjs/purchase.js +++ b/public/viewjs/purchase.js @@ -53,7 +53,7 @@ ); } - var successMessage = __t('Added %1$s %2$s of %3$s to stock', result.amount, __n(result.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '
' + __t("Undo") + ''; + var successMessage = __t('Added %1$s of %2$s to stock', result.amount + " " +__n(result.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '
' + __t("Undo") + ''; if (GetUriParam("flow") === "shoppinglistitemtostock" && typeof GetUriParam("embedded") !== undefined) { diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index f8535c9e..0edc291b 100644 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -156,7 +156,7 @@ $(document).on('click', '.product-consume-button', function(e) } Grocy.FrontendHelpers.EndUiBusy(); - toastr.success(__t('Removed %1$s %2$s of %3$s from stock', consumeAmount, productQuName, productName)); + toastr.success(__t('Removed %1$s of %2$s from stock', consumeAmount, productQuName, productName)); RefreshContextualTimeago(); RefreshStatistics(); },