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() {
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;
});

View file

@ -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":

View file

@ -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",