diff --git a/app/components/ViewRecipe.vue b/app/components/ViewRecipe.vue index 708bb10b..f0091247 100644 --- a/app/components/ViewRecipe.vue +++ b/app/components/ViewRecipe.vue @@ -465,9 +465,7 @@ export default { ); }, showLastTried() { - this.toast = `${localize("triedInfo")} ${this.niceDate( - this.recipe.lastTried - )}`; + this.toast = localize("triedInfo", this.niceDate(this.recipe.lastTried)); utils.timer(5, (val) => { if (!val) this.toast = val; }); diff --git a/app/components/modal/ActionDialog.vue b/app/components/modal/ActionDialog.vue index 210298e2..ee69d937 100644 --- a/app/components/modal/ActionDialog.vue +++ b/app/components/modal/ActionDialog.vue @@ -103,16 +103,17 @@ export default { }, removeItem(item: string): void { let vm = this; + let localizedItem = `"${localize(item)}"`; function removeListItem(listName: string, desc: string): void { - vm.deletionConfirmation( - `${localize(desc)} "${localize(item)}"\n\n${localize("rmLIInfo")}` - ).then((action: boolean) => { - if (action != null && action) - vm.removeListItemAction({ - item, - listName, - }); - }); + vm.deletionConfirmation(`${localize(desc, localizedItem)}`).then( + (action: boolean) => { + if (action != null && action) + vm.removeListItemAction({ + item, + listName, + }); + } + ); } switch (this.title) { case "cui": diff --git a/app/i18n/en-GB.default.json b/app/i18n/en-GB.default.json index c103dcd3..0b77fc1f 100644 --- a/app/i18n/en-GB.default.json +++ b/app/i18n/en-GB.default.json @@ -118,11 +118,10 @@ "srt": "Sort", "cBtn": "CANCEL", "rBtn": "REMOVE", - "rmCuiInfo": "You are about to remove the cuisine:", - "rmCatInfo": "You are about to remove the category:", - "rmYUInfo": "You are about to remove the yield unit:", - "rmUInfo": "You are about to remove the unit:", - "rmLIInfo": "Existing recipes will not be affected", + "rmCuiInfo": "You are about to remove %s from cuisine list", + "rmCatInfo": "You are about to remove %s from category list", + "rmYUInfo": "You are about to remove %s from yield unit list", + "rmUInfo": "You are about to remove %s from unit list", "aBtn": "ADD", "selRec": "Select recipe", "recListEmp": "Nothing here! Add some recipes and try again", @@ -141,8 +140,8 @@ "conBtn": "CONTINUE", "aFBu": "Add a recipe to perform a backup", "conf": "Confirm", - "delRecInfo": "You are about to permanently delete the recipe:", - "delRecsInfo": "You are about to permanently delete:", + "delRecInfo": "You are about to permanently delete the recipe", + "delRecsInfo": "You are about to permanently delete", "recs": "recipes", "sltd": "selected", "dBtn": "DELETE", @@ -164,7 +163,7 @@ "lunch": "Lunch", "dinner": "Dinner", "snacks": "Snacks", - "triedInfo": "You tried this recipe:", + "triedInfo": "You tried this recipe %s", "today": "today", "yesterday": "yesterday", "dAgo": "days ago",