updated strings with placeholder

This commit is contained in:
vishnuraghavb 2021-04-15 22:54:14 +05:30
parent fe6296ae69
commit 59771fe574
3 changed files with 18 additions and 20 deletions

View file

@ -465,9 +465,7 @@ export default {
); );
}, },
showLastTried() { showLastTried() {
this.toast = `${localize("triedInfo")} ${this.niceDate( this.toast = localize("triedInfo", this.niceDate(this.recipe.lastTried));
this.recipe.lastTried
)}`;
utils.timer(5, (val) => { utils.timer(5, (val) => {
if (!val) this.toast = val; if (!val) this.toast = val;
}); });

View file

@ -103,16 +103,17 @@ export default {
}, },
removeItem(item: string): void { removeItem(item: string): void {
let vm = this; let vm = this;
let localizedItem = `"${localize(item)}"`;
function removeListItem(listName: string, desc: string): void { function removeListItem(listName: string, desc: string): void {
vm.deletionConfirmation( vm.deletionConfirmation(`${localize(desc, localizedItem)}`).then(
`${localize(desc)} "${localize(item)}"\n\n${localize("rmLIInfo")}` (action: boolean) => {
).then((action: boolean) => { if (action != null && action)
if (action != null && action) vm.removeListItemAction({
vm.removeListItemAction({ item,
item, listName,
listName, });
}); }
}); );
} }
switch (this.title) { switch (this.title) {
case "cui": case "cui":

View file

@ -118,11 +118,10 @@
"srt": "Sort", "srt": "Sort",
"cBtn": "CANCEL", "cBtn": "CANCEL",
"rBtn": "REMOVE", "rBtn": "REMOVE",
"rmCuiInfo": "You are about to remove the cuisine:", "rmCuiInfo": "You are about to remove %s from cuisine list",
"rmCatInfo": "You are about to remove the category:", "rmCatInfo": "You are about to remove %s from category list",
"rmYUInfo": "You are about to remove the yield unit:", "rmYUInfo": "You are about to remove %s from yield unit list",
"rmUInfo": "You are about to remove the unit:", "rmUInfo": "You are about to remove %s from unit list",
"rmLIInfo": "Existing recipes will not be affected",
"aBtn": "ADD", "aBtn": "ADD",
"selRec": "Select recipe", "selRec": "Select recipe",
"recListEmp": "Nothing here! Add some recipes and try again", "recListEmp": "Nothing here! Add some recipes and try again",
@ -141,8 +140,8 @@
"conBtn": "CONTINUE", "conBtn": "CONTINUE",
"aFBu": "Add a recipe to perform a backup", "aFBu": "Add a recipe to perform a backup",
"conf": "Confirm", "conf": "Confirm",
"delRecInfo": "You are about to permanently delete the recipe:", "delRecInfo": "You are about to permanently delete the recipe",
"delRecsInfo": "You are about to permanently delete:", "delRecsInfo": "You are about to permanently delete",
"recs": "recipes", "recs": "recipes",
"sltd": "selected", "sltd": "selected",
"dBtn": "DELETE", "dBtn": "DELETE",
@ -164,7 +163,7 @@
"lunch": "Lunch", "lunch": "Lunch",
"dinner": "Dinner", "dinner": "Dinner",
"snacks": "Snacks", "snacks": "Snacks",
"triedInfo": "You tried this recipe:", "triedInfo": "You tried this recipe %s",
"today": "today", "today": "today",
"yesterday": "yesterday", "yesterday": "yesterday",
"dAgo": "days ago", "dAgo": "days ago",