implemented deletion of tasks
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user