Fix translation links in import notes

This commit is contained in:
Pieter Vander Vennet 2022-05-01 22:58:59 +02:00
parent ff0c2451da
commit 92c6e70c8f
2 changed files with 25 additions and 7 deletions

View file

@ -279,6 +279,11 @@ export class TypedTranslation<T> extends Translation {
* subbed.textFor("nl") // => "Volledige zin met onderdeel"
*/
Subs(text: T, context?: string): Translation {
return this.OnEveryLanguage((template, lang) => Utils.SubstituteKeys(template, text, lang), context)
return this.OnEveryLanguage((template, lang) => {
if(lang === "_context"){
return template
}
return Utils.SubstituteKeys(template, text, lang);
}, context)
}
}