forked from MapComplete/MapComplete
Fix sharebutton
This commit is contained in:
parent
afbe765ce9
commit
42d13f564c
7 changed files with 51 additions and 59 deletions
|
@ -13,14 +13,14 @@ export class SubstitutedTranslation extends VariableUiElement {
|
|||
|
||||
public constructor(
|
||||
translation: Translation,
|
||||
tags: UIEventSource<any>) {
|
||||
tagsSource: UIEventSource<any>) {
|
||||
super(
|
||||
tags.map(tags => {
|
||||
tagsSource.map(tags => {
|
||||
const txt = Utils.SubstituteKeys(translation.txt, tags)
|
||||
if (txt === undefined) {
|
||||
return "no tags subs tr"
|
||||
return undefined
|
||||
}
|
||||
return new Combine(SubstitutedTranslation.EvaluateSpecialComponents(txt, tags))
|
||||
return new Combine(SubstitutedTranslation.EvaluateSpecialComponents(txt, tagsSource))
|
||||
}, [Locale.language])
|
||||
)
|
||||
|
||||
|
@ -59,6 +59,7 @@ export class SubstitutedTranslation extends VariableUiElement {
|
|||
try{
|
||||
element = knownSpecial.constr(State.state, tags, args);
|
||||
}catch(e){
|
||||
console.error("SPECIALRENDERING FAILED for", tags.data.id, e)
|
||||
element = new FixedUiElement(`Could not generate special renering for ${knownSpecial}(${args.join(", ")}) ${e}`).SetClass("alert")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue