From 5f26e914a20bdf16885089a834993c60049462ec Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Thu, 26 Dec 2024 10:46:54 +0100 Subject: [PATCH] Improve delete confirmation wording details (references #2624) --- localization/strings.pot | 52 +++++++++++++++--------------- public/js/grocy_datatables.js | 2 +- public/viewjs/batteries.js | 2 +- public/viewjs/chores.js | 2 +- public/viewjs/equipment.js | 2 +- public/viewjs/locations.js | 2 +- public/viewjs/manageapikeys.js | 2 +- public/viewjs/mealplan.js | 4 +-- public/viewjs/mealplansections.js | 2 +- public/viewjs/productform.js | 4 +-- public/viewjs/productgroups.js | 2 +- public/viewjs/products.js | 2 +- public/viewjs/quantityunitform.js | 2 +- public/viewjs/quantityunits.js | 2 +- public/viewjs/recipeform.js | 4 +-- public/viewjs/recipes.js | 6 ++-- public/viewjs/shoppinglist.js | 6 ++-- public/viewjs/shoppinglocations.js | 2 +- public/viewjs/taskcategories.js | 2 +- public/viewjs/tasks.js | 2 +- public/viewjs/userentities.js | 2 +- public/viewjs/userfields.js | 2 +- public/viewjs/userobjects.js | 2 +- public/viewjs/users.js | 2 +- 24 files changed, 56 insertions(+), 56 deletions(-) diff --git a/localization/strings.pot b/localization/strings.pot index d5a77da3..9bcde374 100644 --- a/localization/strings.pot +++ b/localization/strings.pot @@ -270,7 +270,7 @@ msgstr "" msgid "Invalid credentials, please try again" msgstr "" -msgid "Are you sure to delete battery \"%s\"?" +msgid "Are you sure you want to delete battery \"%s\"?" msgstr "" msgid "Yes" @@ -279,7 +279,7 @@ msgstr "" msgid "No" msgstr "" -msgid "Are you sure to delete chore \"%s\"?" +msgid "Are you sure you want to delete chore \"%s\"?" msgstr "" msgid "\"%s\" could not be resolved to a product, how do you want to proceed?" @@ -300,16 +300,16 @@ msgstr "" msgid "Add as new product and prefill barcode" msgstr "" -msgid "Are you sure to delete quantity unit \"%s\"?" +msgid "Are you sure you want to delete quantity unit \"%s\"?" msgstr "" -msgid "Are you sure to delete product \"%s\"?" +msgid "Are you sure you want to delete product \"%s\"?" msgstr "" -msgid "Are you sure to delete location \"%s\"?" +msgid "Are you sure you want to delete location \"%s\"?" msgstr "" -msgid "Are you sure to delete store \"%s\"?" +msgid "Are you sure you want to delete store \"%s\"?" msgstr "" msgid "Manage API keys" @@ -426,13 +426,13 @@ msgstr "" msgid "Edit recipe ingredient" msgstr "" -msgid "Are you sure to delete recipe \"%s\"?" +msgid "Are you sure you want to delete recipe \"%s\"?" msgstr "" -msgid "Are you sure to delete recipe ingredient \"%s\"?" +msgid "Are you sure you want to delete recipe ingredient \"%s\"?" msgstr "" -msgid "Are you sure to empty shopping list \"%s\"?" +msgid "Are you sure you want to empty shopping list \"%s\"?" msgstr "" msgid "Clear list" @@ -473,7 +473,7 @@ msgstr "" msgid "Put missing amount on shopping list" msgstr "" -msgid "Are you sure to put all missing ingredients for recipe \"%s\" on the shopping list?" +msgid "Are you sure you want to put all missing ingredients for recipe \"%s\" on the shopping list?" msgstr "" msgid "Added for recipe %s" @@ -488,7 +488,7 @@ msgstr "" msgid "Users" msgstr "" -msgid "Are you sure to delete user \"%s\"?" +msgid "Are you sure you want to delete user \"%s\"?" msgstr "" msgid "Create user" @@ -582,7 +582,7 @@ msgstr "" msgid "Only check if any amount is in stock" msgstr "" -msgid "Are you sure to consume all ingredients needed by recipe \"%s\" (ingredients marked with \"only check if any amount is in stock\" will be ignored)?" +msgid "Are you sure you want to consume all ingredients needed by recipe \"%s\" (ingredients marked with \"only check if any amount is in stock\" will be ignored)?" msgstr "" msgid "Removed all ingredients of recipe \"%s\" from stock" @@ -636,7 +636,7 @@ msgstr "" msgid "Edit task" msgstr "" -msgid "Are you sure to delete task \"%s\"?" +msgid "Are you sure you want to delete task \"%s\"?" msgstr "" msgid "%s task is due to be done" @@ -670,7 +670,7 @@ msgstr "" msgid "Product group" msgstr "" -msgid "Are you sure to delete product group \"%s\"?" +msgid "Are you sure you want to delete product group \"%s\"?" msgstr "" msgid "Stay logged in permanently" @@ -976,7 +976,7 @@ msgstr "" msgid "Create shopping list" msgstr "" -msgid "Are you sure to delete shopping list \"%s\"?" +msgid "Are you sure you want to delete shopping list \"%s\"?" msgstr "" msgid "Average shelf life" @@ -1169,7 +1169,7 @@ msgstr "" msgid "Time of printing" msgstr "" -msgid "Are you sure to delete equipment \"%s\"?" +msgid "Are you sure you want to delete equipment \"%s\"?" msgstr "" msgid "Parent product" @@ -1281,7 +1281,7 @@ msgstr "" msgid "Consume product on chore execution" msgstr "" -msgid "Are you sure to delete user field \"%s\"?" +msgid "Are you sure you want to delete user field \"%s\"?" msgstr "" msgid "Userentities" @@ -1302,7 +1302,7 @@ msgstr "" msgid "Create %s" msgstr "" -msgid "Are you sure to delete this userobject?" +msgid "Are you sure you want to delete this userobject?" msgstr "" msgid "Icon CSS class" @@ -1386,7 +1386,7 @@ msgstr "" msgid "If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be missing, only this product" msgstr "" -msgid "Are you sure to remove this conversion?" +msgid "Are you sure you want to remove this conversion?" msgstr "" msgid "Unit price" @@ -1404,7 +1404,7 @@ msgstr "" msgid "Clear" msgstr "" -msgid "Are you sure to remove the included recipe \"%s\"?" +msgid "Are you sure you want to remove the included recipe \"%s\"?" msgstr "" msgid "Period interval" @@ -1478,7 +1478,7 @@ msgstr "" msgid "Booking does not exist or was already undone" msgstr "" -msgid "Are you sure to delete API key \"%s\"?" +msgid "Are you sure you want to delete API key \"%s\"?" msgstr "" msgid "Add note" @@ -1529,7 +1529,7 @@ msgstr "" msgid "Frozen" msgstr "" -msgid "Are you sure to delete userentity \"%s\"?" +msgid "Are you sure you want to delete userentity \"%s\"?" msgstr "" msgid "Shopping list settings" @@ -1799,7 +1799,7 @@ msgstr "" msgid "Copy" msgstr "" -msgid "Are you sure to remove this barcode?" +msgid "Are you sure you want to remove this barcode?" msgstr "" msgid "Due date type" @@ -1935,7 +1935,7 @@ msgstr "" msgid "Reset" msgstr "" -msgid "Are you sure to reset the table options?" +msgid "Are you sure you want to reset the table options?" msgstr "" msgid "Hide/view columns" @@ -2159,13 +2159,13 @@ msgstr "" msgid "Edit meal plan section" msgstr "" -msgid "Are you sure to delete meal plan section \"%s\"?" +msgid "Are you sure you want to delete meal plan section \"%s\"?" msgstr "" msgid "Section" msgstr "" -msgid "Are you sure to empty the shopping list?" +msgid "Are you sure you want to empty the shopping list?" msgstr "" msgid "This is the default which will be prefilled on purchase" diff --git a/public/js/grocy_datatables.js b/public/js/grocy_datatables.js index d1ef35e6..58efd8c3 100644 --- a/public/js/grocy_datatables.js +++ b/public/js/grocy_datatables.js @@ -295,7 +295,7 @@ $(".change-table-columns-visibility-button").on("click", function(e) callback: function() { bootbox.confirm({ - message: __t("Are you sure to reset the table options?"), + message: __t("Are you sure you want to reset the table options?"), closeButton: false, buttons: { cancel: { diff --git a/public/viewjs/batteries.js b/public/viewjs/batteries.js index 3e7eaffb..7e6cb097 100644 --- a/public/viewjs/batteries.js +++ b/public/viewjs/batteries.js @@ -33,7 +33,7 @@ $(document).on('click', '.battery-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-battery-id'); bootbox.confirm({ - message: __t('Are you sure to delete battery "%s"?', objectName), + message: __t('Are you sure you want to delete battery "%s"?', objectName), buttons: { confirm: { label: __t('Yes'), diff --git a/public/viewjs/chores.js b/public/viewjs/chores.js index 6c2f789d..5734df84 100644 --- a/public/viewjs/chores.js +++ b/public/viewjs/chores.js @@ -32,7 +32,7 @@ $(document).on('click', '.chore-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-chore-id'); bootbox.confirm({ - message: __t('Are you sure to delete chore "%s"?', objectName), + message: __t('Are you sure you want to delete chore "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/equipment.js b/public/viewjs/equipment.js index 86adca12..d834c44f 100644 --- a/public/viewjs/equipment.js +++ b/public/viewjs/equipment.js @@ -119,7 +119,7 @@ $(document).on('click', '.equipment-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-equipment-id'); bootbox.confirm({ - message: __t('Are you sure to delete equipment "%s"?', objectName), + message: __t('Are you sure you want to delete equipment "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/locations.js b/public/viewjs/locations.js index 33db0ce1..3ed75efa 100644 --- a/public/viewjs/locations.js +++ b/public/viewjs/locations.js @@ -31,7 +31,7 @@ $(document).on('click', '.location-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-location-id'); bootbox.confirm({ - message: __t('Are you sure to delete location "%s"?', objectName), + message: __t('Are you sure you want to delete location "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/manageapikeys.js b/public/viewjs/manageapikeys.js index d8b642e7..16f708c5 100644 --- a/public/viewjs/manageapikeys.js +++ b/public/viewjs/manageapikeys.js @@ -32,7 +32,7 @@ $(document).on('click', '.apikey-delete-button', function(e) var objectId = button.attr('data-apikey-id'); bootbox.confirm({ - message: __t('Are you sure to delete API key "%s"?', objectName), + message: __t('Are you sure you want to delete API key "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index dd3dbec2..b5870675 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -761,7 +761,7 @@ $(document).on('click', '.recipe-order-missing-button', function(e) var servings = $(e.currentTarget).attr('data-mealplan-servings'); bootbox.confirm({ - message: __t('Are you sure to put all missing ingredients for recipe "%s" on the shopping list?', objectName), + message: __t('Are you sure you want to put all missing ingredients for recipe "%s" on the shopping list?', objectName), closeButton: false, buttons: { confirm: { @@ -870,7 +870,7 @@ $(document).on('click', '.recipe-consume-button', function(e) var mealPlanEntryId = $(e.currentTarget).attr('data-mealplan-entry-id'); bootbox.confirm({ - message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName), + message: __t('Are you sure you want to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/mealplansections.js b/public/viewjs/mealplansections.js index 410f89cf..4e84d2ba 100644 --- a/public/viewjs/mealplansections.js +++ b/public/viewjs/mealplansections.js @@ -31,7 +31,7 @@ $(document).on('click', '.mealplansection-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-mealplansection-id'); bootbox.confirm({ - message: __t('Are you sure to delete meal plan section "%s"?', objectName), + message: __t('Are you sure you want to delete meal plan section "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/productform.js b/public/viewjs/productform.js index 7675e2a1..5a4a1239 100644 --- a/public/viewjs/productform.js +++ b/public/viewjs/productform.js @@ -282,7 +282,7 @@ $(document).on('click', '.qu-conversion-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-qu-conversion-id'); bootbox.confirm({ - message: __t('Are you sure to remove this conversion?'), + message: __t('Are you sure you want to remove this conversion?'), closeButton: false, buttons: { confirm: { @@ -319,7 +319,7 @@ $(document).on('click', '.barcode-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-barcode-id'); bootbox.confirm({ - message: __t('Are you sure to remove this barcode?'), + message: __t('Are you sure you want to remove this barcode?'), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/productgroups.js b/public/viewjs/productgroups.js index 4f303625..81362566 100644 --- a/public/viewjs/productgroups.js +++ b/public/viewjs/productgroups.js @@ -31,7 +31,7 @@ $(document).on('click', '.product-group-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-group-id'); bootbox.confirm({ - message: __t('Are you sure to delete product group "%s"?', objectName), + message: __t('Are you sure you want to delete product group "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/products.js b/public/viewjs/products.js index c3ccd59a..4fa26869 100644 --- a/public/viewjs/products.js +++ b/public/viewjs/products.js @@ -70,7 +70,7 @@ $(document).on('click', '.product-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-product-id'); bootbox.confirm({ - message: __t('Are you sure to delete product "%s"?', objectName) + '

' + __t('This also removes any stock amount, the journal and all other references of this product - consider disabling it instead, if you want to keep that and just hide the product.'), + message: __t('Are you sure you want to delete product "%s"?', objectName) + '

' + __t('This also removes any stock amount, the journal and all other references of this product - consider disabling it instead, if you want to keep that and just hide the product.'), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/quantityunitform.js b/public/viewjs/quantityunitform.js index 76959b26..4f037eb8 100644 --- a/public/viewjs/quantityunitform.js +++ b/public/viewjs/quantityunitform.js @@ -159,7 +159,7 @@ $(document).on('click', '.qu-conversion-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-qu-conversion-id'); bootbox.confirm({ - message: __t('Are you sure to remove this conversion?'), + message: __t('Are you sure you want to remove this conversion?'), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/quantityunits.js b/public/viewjs/quantityunits.js index 1a943493..778b077d 100644 --- a/public/viewjs/quantityunits.js +++ b/public/viewjs/quantityunits.js @@ -31,7 +31,7 @@ $(document).on('click', '.quantityunit-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-quantityunit-id'); bootbox.confirm({ - message: __t('Are you sure to delete quantity unit "%s"?', objectName), + message: __t('Are you sure you want to delete quantity unit "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/recipeform.js b/public/viewjs/recipeform.js index e5a35179..e7842402 100644 --- a/public/viewjs/recipeform.js +++ b/public/viewjs/recipeform.js @@ -136,7 +136,7 @@ $(document).on('click', '.recipe-pos-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-recipe-pos-id'); bootbox.confirm({ - message: __t('Are you sure to delete recipe ingredient "%s"?', objectName), + message: __t('Are you sure you want to delete recipe ingredient "%s"?', objectName), closeButton: false, buttons: { confirm: { @@ -173,7 +173,7 @@ $(document).on('click', '.recipe-include-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-recipe-include-id'); bootbox.confirm({ - message: __t('Are you sure to remove the included recipe "%s"?', objectName), + message: __t('Are you sure you want to remove the included recipe "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/recipes.js b/public/viewjs/recipes.js index 0fcb0772..7b33bc37 100644 --- a/public/viewjs/recipes.js +++ b/public/viewjs/recipes.js @@ -137,7 +137,7 @@ $(".recipe-delete").on('click', function(e) var objectId = $(e.currentTarget).attr('data-recipe-id'); bootbox.confirm({ - message: __t('Are you sure to delete recipe "%s"?', objectName), + message: __t('Are you sure you want to delete recipe "%s"?', objectName), closeButton: false, buttons: { confirm: { @@ -192,7 +192,7 @@ $(document).on('click', '.recipe-shopping-list', function(e) var objectId = $(e.currentTarget).attr('data-recipe-id'); bootbox.confirm({ - message: __t('Are you sure to put all missing ingredients for recipe "%s" on the shopping list?', objectName) + "

" + __t("Uncheck ingredients to not put them on the shopping list") + ":" + $("#missing-recipe-pos-list")[0].outerHTML.replace("d-none", ""), + message: __t('Are you sure you want to put all missing ingredients for recipe "%s" on the shopping list?', objectName) + "

" + __t("Uncheck ingredients to not put them on the shopping list") + ":" + $("#missing-recipe-pos-list")[0].outerHTML.replace("d-none", ""), closeButton: false, buttons: { confirm: { @@ -238,7 +238,7 @@ $(".recipe-consume").on('click', function(e) var objectId = $(e.currentTarget).attr('data-recipe-id'); bootbox.confirm({ - message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName), + message: __t('Are you sure you want to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/shoppinglist.js b/public/viewjs/shoppinglist.js index 910e6b34..983b736d 100644 --- a/public/viewjs/shoppinglist.js +++ b/public/viewjs/shoppinglist.js @@ -86,7 +86,7 @@ $("#delete-selected-shopping-list").on("click", function() var objectId = $("#selected-shopping-list").val(); bootbox.confirm({ - message: __t('Are you sure to delete shopping list "%s"?', objectName), + message: __t('Are you sure you want to delete shopping list "%s"?', objectName), closeButton: false, buttons: { confirm: { @@ -183,10 +183,10 @@ $(document).on('click', '#add-overdue-expired-products', function(e) $(document).on('click', '#clear-shopping-list', function(e) { - var confirmMessage = __t('Are you sure to empty shopping list "%s"?', $("#selected-shopping-list option:selected").text()); + var confirmMessage = __t('Are you sure you want to empty shopping list "%s"?', $("#selected-shopping-list option:selected").text()); if (!BoolVal(Grocy.FeatureFlags.GROCY_FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS)) { - confirmMessage = __t('Are you sure to empty the shopping list?'); + confirmMessage = __t('Are you sure you want to empty the shopping list?'); } bootbox.confirm({ diff --git a/public/viewjs/shoppinglocations.js b/public/viewjs/shoppinglocations.js index 93e3a9ec..712c6eec 100644 --- a/public/viewjs/shoppinglocations.js +++ b/public/viewjs/shoppinglocations.js @@ -31,7 +31,7 @@ $(document).on('click', '.shoppinglocation-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-shoppinglocation-id'); bootbox.confirm({ - message: __t('Are you sure to delete store "%s"?', objectName), + message: __t('Are you sure you want to delete store "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/taskcategories.js b/public/viewjs/taskcategories.js index 364064d3..f61f0e9f 100644 --- a/public/viewjs/taskcategories.js +++ b/public/viewjs/taskcategories.js @@ -31,7 +31,7 @@ $(document).on('click', '.task-category-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-category-id'); bootbox.confirm({ - message: __t('Are you sure to delete task category "%s"?', objectName), + message: __t('Are you sure you want to delete task category "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/tasks.js b/public/viewjs/tasks.js index 07b75335..e3a944c3 100644 --- a/public/viewjs/tasks.js +++ b/public/viewjs/tasks.js @@ -138,7 +138,7 @@ $(document).on('click', '.delete-task-button', function(e) var objectId = $(e.currentTarget).attr('data-task-id'); bootbox.confirm({ - message: __t('Are you sure to delete task "%s"?', objectName), + message: __t('Are you sure you want to delete task "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/userentities.js b/public/viewjs/userentities.js index cf97a39b..e1248c51 100644 --- a/public/viewjs/userentities.js +++ b/public/viewjs/userentities.js @@ -31,7 +31,7 @@ $(document).on('click', '.userentity-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-userentity-id'); bootbox.confirm({ - message: __t('Are you sure to delete userentity "%s"?', objectName), + message: __t('Are you sure you want to delete userentity "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/userfields.js b/public/viewjs/userfields.js index 4985de29..d2c4c7f3 100644 --- a/public/viewjs/userfields.js +++ b/public/viewjs/userfields.js @@ -45,7 +45,7 @@ $(document).on('click', '.userfield-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-userfield-id'); bootbox.confirm({ - message: __t('Are you sure to delete user field "%s"?', objectName), + message: __t('Are you sure you want to delete user field "%s"?', objectName), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/userobjects.js b/public/viewjs/userobjects.js index ffc84940..4edf4721 100644 --- a/public/viewjs/userobjects.js +++ b/public/viewjs/userobjects.js @@ -30,7 +30,7 @@ $(document).on('click', '.userobject-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-userobject-id'); bootbox.confirm({ - message: __t('Are you sure to delete this userobject?'), + message: __t('Are you sure you want to delete this userobject?'), closeButton: false, buttons: { confirm: { diff --git a/public/viewjs/users.js b/public/viewjs/users.js index 8be42c93..7b6e3fb6 100644 --- a/public/viewjs/users.js +++ b/public/viewjs/users.js @@ -31,7 +31,7 @@ $(document).on('click', '.user-delete-button', function(e) var objectId = $(e.currentTarget).attr('data-user-id'); bootbox.confirm({ - message: __t('Are you sure to delete user "%s"?', objectName), + message: __t('Are you sure you want to delete user "%s"?', objectName), closeButton: false, buttons: { confirm: {