forked from MapComplete/MapComplete
Fix #896: improve placeholder dynamism, add more tests for UI code
This commit is contained in:
parent
94475e4d4d
commit
972d702315
7 changed files with 148 additions and 66 deletions
|
@ -117,11 +117,12 @@ export default class TagRenderingConfig {
|
|||
|
||||
let placeholder: Translation = Translations.T(json.freeform.placeholder)
|
||||
if (placeholder === undefined) {
|
||||
const typeDescription = Translations.t.validation[type]?.description
|
||||
const typeDescription = <Translation> Translations.t.validation[type]?.description
|
||||
const key = json.freeform.key;
|
||||
if(typeDescription !== undefined){
|
||||
placeholder = Translations.T(json.freeform.key+" ({"+type+"})").Subs({[type]: typeDescription})
|
||||
placeholder = typeDescription.OnEveryLanguage(l => key+" ("+l+")")
|
||||
}else{
|
||||
placeholder = Translations.T(json.freeform.key+" ("+type+")")
|
||||
placeholder = Translations.T(key+" ("+type+")")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue