forked from MapComplete/MapComplete
More translation fixes, allows re-enabling questions (fix #51)
This commit is contained in:
parent
400d268651
commit
0bb5abec3c
10 changed files with 83 additions and 37 deletions
|
@ -62,24 +62,19 @@ export default class BikeStations extends LayerDefinition {
|
|||
const hasPump = self.pump.matchesProperties(properties)
|
||||
const isOperational = self.pumpOperationalOk.matchesProperties(properties)
|
||||
const hasTools = self.tools.matchesProperties(properties)
|
||||
let iconName = ""
|
||||
if (hasPump) {
|
||||
if (hasTools) {
|
||||
iconName = "repair_station_pump.svg"
|
||||
} else {
|
||||
if (isOperational) {
|
||||
iconName = "pump.svg"
|
||||
} else {
|
||||
iconName = "broken_pump.svg"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!self.pump.matchesProperties(properties)) {
|
||||
let iconName = "repair_station.svg";
|
||||
if (hasTools && hasPump && isOperational) {
|
||||
iconName = "repair_station_pump.svg"
|
||||
}else if(hasTools){
|
||||
iconName = "repair_station.svg"
|
||||
}else if(hasPump){
|
||||
if (isOperational) {
|
||||
iconName = "pump.svg"
|
||||
} else {
|
||||
iconName = "repair_station.svg"
|
||||
iconName = "broken_pump.svg"
|
||||
}
|
||||
}
|
||||
|
||||
const iconUrl = `./assets/bike/${iconName}`
|
||||
return {
|
||||
color: "#00bb00",
|
||||
|
|
|
@ -7,10 +7,10 @@ export default class PumpOperational extends TagRenderingOptions {
|
|||
constructor() {
|
||||
const to = Translations.t.cyclofix.station.operational
|
||||
super({
|
||||
question: to.question.Render(),
|
||||
question: to.question,
|
||||
mappings: [
|
||||
{k: new Tag("service:bicycle:pump:operational_status","broken"), txt: to.broken.txt},
|
||||
{k: new Tag("service:bicycle:pump:operational_status",""), txt: to.operational.txt}
|
||||
{k: new Tag("service:bicycle:pump:operational_status","broken"), txt: to.broken},
|
||||
{k: new Tag("service:bicycle:pump:operational_status",""), txt: to.operational}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
|
|
@ -7,21 +7,21 @@ export default class PumpValves extends TagRenderingOptions{
|
|||
constructor() {
|
||||
const to = Translations.t.cyclofix.station.valves
|
||||
super({
|
||||
question: to.question.Render(),
|
||||
question: to.question,
|
||||
mappings: [
|
||||
{
|
||||
k: new Tag("valves", " sclaverand;schrader;dunlop"),
|
||||
txt: to.default.Render()
|
||||
txt: to.default
|
||||
},
|
||||
{k: new Tag("valves", "dunlop"), txt: to.dunlop.Render()},
|
||||
{k: new Tag("valves", "sclaverand"), txt: to.sclaverand.Render()},
|
||||
{k: new Tag("valves", "auto"), txt: to.auto.Render()},
|
||||
{k: new Tag("valves", "dunlop"), txt: to.dunlop},
|
||||
{k: new Tag("valves", "sclaverand"), txt: to.sclaverand},
|
||||
{k: new Tag("valves", "auto"), txt: to.auto},
|
||||
],
|
||||
freeform: {
|
||||
extraTags: new Tag("fixme", "Freeform valves= tag used: possibly a wrong value"),
|
||||
key: "valves",
|
||||
template: to.template.txt,
|
||||
renderTemplate: to.render.txt
|
||||
template: to.template,
|
||||
renderTemplate: to.render
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ export default class ShopPump extends TagRenderingOptions {
|
|||
const to = Translations.t.cyclofix.shop.diy
|
||||
super({
|
||||
priority: 5,
|
||||
question: to.question.Render(),
|
||||
question: to.question,
|
||||
mappings: [
|
||||
{k: new Tag(key, "yes"), txt: to.yes.Render()},
|
||||
{k: new Tag(key, "no"), txt: to.no.Render()},
|
||||
{k: new Tag(key, "yes"), txt: to.yes},
|
||||
{k: new Tag(key, "no"), txt: to.no},
|
||||
]
|
||||
});
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ export default class ShopPump extends TagRenderingOptions {
|
|||
const to = Translations.t.cyclofix.shop.pump
|
||||
super({
|
||||
priority: 5,
|
||||
question: to.question.Render(),
|
||||
question: to.question,
|
||||
mappings: [
|
||||
{k: new Tag(key, "yes"), txt: to.yes.Render()},
|
||||
{k: new Tag(key, "no"), txt: to.no.Render()},
|
||||
{k: new Tag(key, "yes"), txt: to.yes},
|
||||
{k: new Tag(key, "no"), txt: to.no},
|
||||
]
|
||||
});
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ class TagRendering extends UIElement implements TagDependantUIElement {
|
|||
} else {
|
||||
return "<span class='skip-button'>"+Translations.t.general.skip.R()+"</span>";
|
||||
}
|
||||
});
|
||||
}, [Locale.language]);
|
||||
// And at last, set up the skip button
|
||||
this._skipButton = new VariableUiElement(cancelContents).onClick(cancel) ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue