add checkbox

This commit is contained in:
MathieuG-P
2022-09-24 22:33:46 +02:00
parent fbb2eca661
commit 90de63c35f
13 changed files with 105 additions and 59 deletions
+1 -2
View File
@@ -53,11 +53,10 @@ export class I18nService {
public translate(translationKey: string, args?: Record<string, string>): string{
let translated = this.cache.get(translationKey);
if(!translated){
console.log(translationKey);
translated = getProperty(this.dictionary, translationKey);
translated ? this.cache.set(translated, translationKey) : translated = translationKey;
}
args && Object.keys(args).forEach(key => translated = translated.replaceAll(`{${key}}`, args[key]));
args && Object.keys(args).forEach(key => {translated = translated.replaceAll(`{${key}}`, args[key])});
return translated;
}