Full code cleanup

This commit is contained in:
Pieter Vander Vennet 2022-01-26 21:40:38 +01:00
parent 3a4a2a2016
commit fa971ffbbf
300 changed files with 16352 additions and 19284 deletions

View file

@ -17,9 +17,9 @@ export default class InputElementWrapper<T> extends InputElement<T> {
mapping.set(key, inputElement)
// Bit of a hack: the SubstitutedTranslation expects a special rendering, but those are formatted '{key()}' instead of '{key}', so we substitute it first
const newTranslations ={}
const newTranslations = {}
for (const lang in translation.translations) {
newTranslations[lang] = translation.translations[lang].replace("{"+key+"}", "{"+key+"()}")
newTranslations[lang] = translation.translations[lang].replace("{" + key + "}", "{" + key + "()}")
}
this._renderElement = new SubstitutedTranslation(new Translation(newTranslations), tags, state, mapping)
}