implemented deletion of tasks

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-07-27 12:46:16 +02:00
parent e6516f3b8d
commit ac45517d7f
15 changed files with 105 additions and 31 deletions

View File

@@ -7,7 +7,7 @@ export async function loadTranslation(lang){
translations.values = await fetch(url).then(resp => resp.json());
}
export function t(key,...args){
export function t(key,args = {}){
if (key === undefined) return "";
if (key instanceof Response) key = 'status.'+key.status;
let set = translations.values;
@@ -19,6 +19,6 @@ export function t(key,...args){
}
set = set[token];
}
for (var i in args) set = set.replace(`{${i}}`,args[i]);
for (var key of Object.keys(args)) set = set.replace(`{${key}}`,args[key]);
return set;
}