forked from MapComplete/MapComplete
Full code cleanup
This commit is contained in:
parent
3a4a2a2016
commit
fa971ffbbf
300 changed files with 16352 additions and 19284 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue