diff --git a/Customizations/Layers/BikeParkings.ts b/Customizations/Layers/BikeParkings.ts
index ccd737edb..141ba2946 100644
--- a/Customizations/Layers/BikeParkings.ts
+++ b/Customizations/Layers/BikeParkings.ts
@@ -5,12 +5,15 @@ import * as L from "leaflet";
import FixedText from "../Questions/FixedText";
import ParkingType from "../Questions/bike/ParkingType";
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
+import BikeStationOperator from "../Questions/bike/StationOperator";
+import Translations from "../../UI/i18n/Translations";
+import ParkingOperator from "../Questions/bike/ParkingOperator";
export default class BikeParkings extends LayerDefinition {
constructor() {
super();
- this.name = "bike_parking";
+ this.name = Translations.t.cylofix.parking.name.txt;
this.icon = "./assets/bike/parking.svg";
this.overpassFilter = new Tag("amenity", "bicycle_parking");
this.newElementTags = [
@@ -20,10 +23,10 @@ export default class BikeParkings extends LayerDefinition {
this.minzoom = 13;
this.style = this.generateStyleFunction();
- this.title = new FixedText("Fietsparking");
+ this.title = new FixedText(Translations.t.cylofix.parking.title.txt)
this.elementsToShow = [
new ImageCarouselWithUploadConstructor(),
- new OperatorTag(),
+ //new ParkingOperator(),
new ParkingType()
];
diff --git a/Customizations/Layers/BikeShops.ts b/Customizations/Layers/BikeShops.ts
new file mode 100644
index 000000000..d829eeb1e
--- /dev/null
+++ b/Customizations/Layers/BikeShops.ts
@@ -0,0 +1,50 @@
+import { LayerDefinition } from "../LayerDefinition";
+import Translations from "../../UI/i18n/Translations";
+import { Tag } from "../../Logic/TagsFilter";
+import FixedText from "../Questions/FixedText";
+import { ImageCarouselWithUploadConstructor } from "../../UI/Image/ImageCarouselWithUpload";
+import * as L from "leaflet";
+import ShopRetail from "../Questions/bike/ShopRetail";
+import ShopPump from "../Questions/bike/ShopPump";
+import ShopRental from "../Questions/bike/ShopRental";
+import ShopRepair from "../Questions/bike/ShopRepair";
+
+
+export default class BikeShops extends LayerDefinition {
+ constructor() {
+ super();
+ this.name = Translations.t.cylofix.shop.name.txt;
+ this.icon = "./assets/bike/shop.svg";
+ this.overpassFilter = new Tag("shop", "bicycle");
+ this.newElementTags = [
+ new Tag("shop", "bicycle"),
+ ];
+ this.maxAllowedOverlapPercentage = 10;
+
+ this.minzoom = 13;
+ this.style = this.generateStyleFunction();
+ this.title = new FixedText(Translations.t.cylofix.shop.title.txt)
+ this.elementsToShow = [
+ new ImageCarouselWithUploadConstructor(),
+ //new ParkingOperator(),
+ new ShopRetail(),
+ new ShopRental(),
+ new ShopRepair(),
+ new ShopPump(),
+ ];
+
+ }
+
+ private generateStyleFunction() {
+ const self = this;
+ return function (properties: any) {
+ return {
+ color: "#00bb00",
+ icon: L.icon({
+ iconUrl: self.icon,
+ iconSize: [50, 50]
+ })
+ };
+ };
+ }
+}
diff --git a/Customizations/Layers/BikeStations.ts b/Customizations/Layers/BikeStations.ts
index ca25facb5..65b43f03f 100644
--- a/Customizations/Layers/BikeStations.ts
+++ b/Customizations/Layers/BikeStations.ts
@@ -12,6 +12,7 @@ import PumpManometer from "../Questions/bike/PumpManometer";
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
import PumpOperational from "../Questions/bike/PumpOperational";
import PumpValves from "../Questions/bike/PumpValves";
+import Translations from "../../UI/i18n/Translations";
export default class BikeStations extends LayerDefinition {
@@ -22,7 +23,7 @@ export default class BikeStations extends LayerDefinition {
constructor() {
super();
- this.name = "bike station or pump";
+ this.name = Translations.t.cylofix.station.name.txt;
this.icon = "./assets/wrench.svg";
this.overpassFilter = new And([
@@ -37,7 +38,7 @@ export default class BikeStations extends LayerDefinition {
this.minzoom = 13;
this.style = this.generateStyleFunction();
- this.title = new FixedText("Bike station");
+ this.title = new FixedText(Translations.t.cylofix.station.title.txt)
this.elementsToShow = [
new ImageCarouselWithUploadConstructor(),
@@ -51,7 +52,7 @@ export default class BikeStations extends LayerDefinition {
new PumpValves().OnlyShowIf(this.pump),
new PumpOperational().OnlyShowIf(this.pump),
- new BikeStationOperator(),
+ // new BikeStationOperator(),
// new BikeStationBrand() DISABLED
];
}
diff --git a/Customizations/Layouts/Cyclofix.ts b/Customizations/Layouts/Cyclofix.ts
index 328acdaf8..9c9148b49 100644
--- a/Customizations/Layouts/Cyclofix.ts
+++ b/Customizations/Layouts/Cyclofix.ts
@@ -1,6 +1,7 @@
import {Layout} from "../Layout";
import BikeParkings from "../Layers/BikeParkings";
import BikeServices from "../Layers/BikeStations";
+import BikeShops from "../Layers/BikeShops";
import {GhostBike} from "../Layers/GhostBike";
import Translations from "../../UI/i18n/Translations";
@@ -10,7 +11,7 @@ export default class Cyclofix extends Layout {
super(
"pomp",
Translations.t.cylofix.title,
- [new GhostBike(), new BikeServices(), new BikeParkings()],
+ [/*new GhostBike(),*/ new BikeServices(), new BikeParkings(), new BikeShops],
16,
50.8465573,
4.3516970,
diff --git a/Customizations/Questions/bike/ParkingOperator.ts b/Customizations/Questions/bike/ParkingOperator.ts
new file mode 100644
index 000000000..f55444456
--- /dev/null
+++ b/Customizations/Questions/bike/ParkingOperator.ts
@@ -0,0 +1,27 @@
+import {TagRenderingOptions} from "../../TagRendering";
+import {Tag, And} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
+
+
+export default class ParkingOperator extends TagRenderingOptions {
+ constructor() {
+ const to = Translations.t.cylofix.parking.operator
+ super({
+ priority: 15,
+ question: to.question.Render(),
+ freeform: {
+ key: "operator",
+ template: to.template.txt,
+ renderTemplate: to.render.txt,
+ placeholder: Translations.t.cylofix.freeFormPlaceholder.txt
+ },
+ mappings: [
+ {k: new Tag("operator", "KU Leuven"), txt: "KU Leuven"},
+ {k: new Tag("operator", "Stad Halle"), txt: "Stad Halle"},
+ {k: new Tag("operator", "Saint Gilles - Sint Gillis"), txt: "Saint Gilles - Sint Gillis"},
+ {k: new Tag("operator", "Jette"), txt: "Jette"},
+ {k: new And([new Tag("operator", ""), new Tag("operator:type", "private")]), txt: to.private.Render()}
+ ]
+ });
+ }
+}
diff --git a/Customizations/Questions/bike/ParkingType.ts b/Customizations/Questions/bike/ParkingType.ts
index 4b5074ff1..f621b8da3 100644
--- a/Customizations/Questions/bike/ParkingType.ts
+++ b/Customizations/Questions/bike/ParkingType.ts
@@ -1,37 +1,37 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class ParkingType extends TagRenderingOptions {
- private static images = {
- stands: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Bike_racks_at_north-west_of_Westfield_-_geograph.org.uk_-_1041057.jpg/100px-Bike_racks_at_north-west_of_Westfield_-_geograph.org.uk_-_1041057.jpg",
- wall_loops: "https://wiki.openstreetmap.org/w/images/thumb/c/c2/Bike-parking-wheelbender.jpg/100px-Bike-parking-wheelbender.jpg",
- handlebar_holder: "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Bicycle_parking_handlebar_holder.jpg/100px-Bicycle_parking_handlebar_holder.jpg",
- shed: "https://wiki.openstreetmap.org/w/images/thumb/b/b2/Bike-shelter.jpg/100px-Bike-shelter.jpg",
- "two-tier": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Bicis_a_l%27estaci%C3%B3_de_Leiden.JPG/100px-Bicis_a_l%27estaci%C3%B3_de_Leiden.JPG"
- }
-
- private static toImgTxt(url: string) {
- return ``
- }
-
constructor() {
+ const images = {
+ stands: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Bike_racks_at_north-west_of_Westfield_-_geograph.org.uk_-_1041057.jpg/100px-Bike_racks_at_north-west_of_Westfield_-_geograph.org.uk_-_1041057.jpg",
+ loops: "https://wiki.openstreetmap.org/w/images/thumb/c/c2/Bike-parking-wheelbender.jpg/100px-Bike-parking-wheelbender.jpg",
+ handlebar: "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Bicycle_parking_handlebar_holder.jpg/100px-Bicycle_parking_handlebar_holder.jpg",
+ shed: "https://wiki.openstreetmap.org/w/images/thumb/b/b2/Bike-shelter.jpg/100px-Bike-shelter.jpg",
+ rack: "https://wiki.openstreetmap.org/w/images/thumb/4/41/Triton_Bike_Rack.png/100px-Triton_Bike_Rack.png",
+ double: "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Bicis_a_l%27estaci%C3%B3_de_Leiden.JPG/100px-Bicis_a_l%27estaci%C3%B3_de_Leiden.JPG"
+ }
+ const toImg = (url) => `
`
+ const to = Translations.t.cylofix.parking.type
super({
priority: 5,
- question: "Van welk type is deze fietsenparking?",
+ question: to.question.Render(),
freeform: {
key: "bicycle_parking",
extraTags: new Tag("fixme", "Freeform bicycle_parking= tag used: possibly a wrong value"),
- template: "Iets anders: $$$",
- renderTemplate: "Dit is een fietsenparking van het type: {bicycle_parking}",
- placeholder: "Specifieer"
+ template: to.template.txt,
+ renderTemplate: to.render.txt,
+ placeholder: Translations.t.cylofix.freeFormPlaceholder.txt,
},
mappings: [
- {k: new Tag("bicycle_parking", "stands"), txt: ParkingType.toImgTxt(ParkingType.images.stands)},
- {k: new Tag("bicycle_parking", "wall_loops"), txt: ParkingType.toImgTxt(ParkingType.images.wall_loops)},
- {k: new Tag("bicycle_parking", "handlebar_holder"), txt: ParkingType.toImgTxt(ParkingType.images.handlebar_holder)},
- {k: new Tag("bicycle_parking", "shed"), txt: ParkingType.toImgTxt(ParkingType.images.shed)},
- {k: new Tag("bicycle_parking", "two-tier"), txt: ParkingType.toImgTxt(ParkingType.images["two-tier"])}
+ {k: new Tag("bicycle_parking", "stands"), txt: `${to.stands.Render()}, bijvoorbeeld: ${toImg(images.stands)}`},
+ {k: new Tag("bicycle_parking", "wall_loops"), txt: `${to.loops.Render()}, bijvoorbeeld: ${toImg(images.loops)}`},
+ {k: new Tag("bicycle_parking", "handlebar_holder"), txt: `${to.handlebar.Render()}, bijvoorbeeld: ${toImg(images.handlebar)}`},
+ {k: new Tag("bicycle_parking", "shed"), txt: `${to.shed.Render()}, bijvoorbeeld: ${toImg(images.shed)}`},
+ {k: new Tag("bicycle_parking", "rack"), txt: `${to.rack.Render()}, bijvoorbeeld: ${toImg(images.rack)}`},
+ {k: new Tag("bicycle_parking", "two-tier"), txt: `${to.double.Render()}, bijvoorbeeld: ${toImg(images.double)}`}
]
});
}
diff --git a/Customizations/Questions/bike/PumpManometer.ts b/Customizations/Questions/bike/PumpManometer.ts
index bc97a032b..6d5e0a76b 100644
--- a/Customizations/Questions/bike/PumpManometer.ts
+++ b/Customizations/Questions/bike/PumpManometer.ts
@@ -1,15 +1,17 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class PumpManometer extends TagRenderingOptions {
constructor() {
+ const to = Translations.t.cylofix.station.manometer
super({
- question: "Does the pump have a pressure indicator or manometer?",
+ question: to.question.Render(),
mappings: [
- {k: new Tag("manometer", "yes"), txt: "Yes, there is a manometer"},
- {k: new Tag("manometer","broken"), txt: "Yes, but it is broken"},
- {k: new Tag("manometer", "yes"), txt: "No"}
+ {k: new Tag("manometer", "yes"), txt: to.yes.Render()},
+ {k: new Tag("manometer", "no"), txt: to.no.Render()},
+ {k: new Tag("manometer", "broken"), txt: to.broken.Render()}
]
});
}
diff --git a/Customizations/Questions/bike/PumpManual.ts b/Customizations/Questions/bike/PumpManual.ts
index 18b79e68e..4346b6775 100644
--- a/Customizations/Questions/bike/PumpManual.ts
+++ b/Customizations/Questions/bike/PumpManual.ts
@@ -1,15 +1,17 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class PumpManual extends TagRenderingOptions {
constructor() {
+ const to = Translations.t.cylofix.station.electric
super({
priority: 5,
- question: "Is this an electric bike pump?",
+ question: to.question.Render(),
mappings: [
- {k: new Tag("manual", "yes"), txt: "Manual pump"},
- {k: new Tag("manual", "no"), txt: "Electric pump"}
+ {k: new Tag("manual", "yes"), txt: to.manual.Render()},
+ {k: new Tag("manual", "no"), txt: to.electric.Render()}
]
});
}
diff --git a/Customizations/Questions/bike/PumpOperational.ts b/Customizations/Questions/bike/PumpOperational.ts
index d7abe0f16..8aa052b11 100644
--- a/Customizations/Questions/bike/PumpOperational.ts
+++ b/Customizations/Questions/bike/PumpOperational.ts
@@ -1,14 +1,16 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class PumpOperational extends TagRenderingOptions {
constructor() {
+ const to = Translations.t.cylofix.station.operational
super({
- question: "Is the bicycle pump still operational?",
+ question: to.question.Render(),
mappings: [
- {k: new Tag("service:bicycle:pump:operational_status","broken"), txt: "This pump is broken"},
- {k: new Tag("service:bicycle:pump:operational_status",""), txt: "This pump is operational"}
+ {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}
]
});
}
diff --git a/Customizations/Questions/bike/PumpValves.ts b/Customizations/Questions/bike/PumpValves.ts
index ae9ebb4bf..5789ae9c2 100644
--- a/Customizations/Questions/bike/PumpValves.ts
+++ b/Customizations/Questions/bike/PumpValves.ts
@@ -1,24 +1,27 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class PumpValves extends TagRenderingOptions{
constructor() {
+ const to = Translations.t.cylofix.station.valves
super({
- question: "What valves are supported?",
+ question: to.question.Render(),
mappings: [
{
k: new Tag("valves", " sclaverand;schrader;dunlop"),
- txt: "There is a default head, so Presta, Dunlop and Auto"
+ txt: to.default.Render()
},
- {k: new Tag("valves", "dunlop"), txt: "Only dunlop"},
- {k: new Tag("valves", "sclaverand"), txt: "Only Sclaverand (also known as Dunlop)"},
- {k: new Tag("valves", "auto"), txt: "Only auto"},
+ {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()},
],
freeform: {
+ extraTags: new Tag("fixme", "Freeform valves= tag used: possibly a wrong value"),
key: "valves",
- template: "Supported valves are $$$",
- renderTemplate: "Supported valves are {valves}"
+ template: to.template.txt,
+ renderTemplate: to.render.txt
}
});
}
diff --git a/Customizations/Questions/bike/ShopPump.ts b/Customizations/Questions/bike/ShopPump.ts
new file mode 100644
index 000000000..5c3882b33
--- /dev/null
+++ b/Customizations/Questions/bike/ShopPump.ts
@@ -0,0 +1,19 @@
+import {TagRenderingOptions} from "../../TagRendering";
+import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
+
+
+export default class ShopPump extends TagRenderingOptions {
+ constructor() {
+ const key = 'service:bicycle:pump'
+ const to = Translations.t.cylofix.shop.pump
+ super({
+ priority: 5,
+ question: to.question.Render(),
+ mappings: [
+ {k: new Tag(key, "yes"), txt: to.yes.Render()},
+ {k: new Tag(key, "no"), txt: to.no.Render()},
+ ]
+ });
+ }
+}
diff --git a/Customizations/Questions/bike/ShopRental.ts b/Customizations/Questions/bike/ShopRental.ts
new file mode 100644
index 000000000..899100fc7
--- /dev/null
+++ b/Customizations/Questions/bike/ShopRental.ts
@@ -0,0 +1,19 @@
+import {TagRenderingOptions} from "../../TagRendering";
+import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
+
+
+export default class ShopRental extends TagRenderingOptions {
+ constructor() {
+ const key = 'service:bicycle:rental'
+ const to = Translations.t.cylofix.shop.rental
+ super({
+ priority: 5,
+ question: to.question.Render(),
+ mappings: [
+ {k: new Tag(key, "yes"), txt: to.yes.Render()},
+ {k: new Tag(key, "no"), txt: to.no.Render()},
+ ]
+ });
+ }
+}
diff --git a/Customizations/Questions/bike/ShopRepair.ts b/Customizations/Questions/bike/ShopRepair.ts
new file mode 100644
index 000000000..7ad84d0ae
--- /dev/null
+++ b/Customizations/Questions/bike/ShopRepair.ts
@@ -0,0 +1,19 @@
+import {TagRenderingOptions} from "../../TagRendering";
+import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
+
+
+export default class ShopRepair extends TagRenderingOptions {
+ constructor() {
+ const key = 'service:bicycle:repair'
+ const to = Translations.t.cylofix.shop.repair
+ super({
+ priority: 5,
+ question: to.question.Render(),
+ mappings: [
+ {k: new Tag(key, "yes"), txt: to.yes.Render()},
+ {k: new Tag(key, "no"), txt: to.no.Render()},
+ ]
+ });
+ }
+}
diff --git a/Customizations/Questions/bike/ShopRetail.ts b/Customizations/Questions/bike/ShopRetail.ts
new file mode 100644
index 000000000..37eb35a3d
--- /dev/null
+++ b/Customizations/Questions/bike/ShopRetail.ts
@@ -0,0 +1,19 @@
+import {TagRenderingOptions} from "../../TagRendering";
+import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
+
+
+export default class ShopRetail extends TagRenderingOptions {
+ constructor() {
+ const key = 'service:bicycle:retail'
+ const to = Translations.t.cylofix.shop.retail
+ super({
+ priority: 5,
+ question: to.question.Render(),
+ mappings: [
+ {k: new Tag(key, "yes"), txt: to.yes.Render()},
+ {k: new Tag(key, "no"), txt: to.no.Render()},
+ ]
+ });
+ }
+}
diff --git a/Customizations/Questions/bike/StationBrand.ts b/Customizations/Questions/bike/StationBrand.ts
index 61dbc44db..b763bf650 100644
--- a/Customizations/Questions/bike/StationBrand.ts
+++ b/Customizations/Questions/bike/StationBrand.ts
@@ -4,6 +4,8 @@ import {Tag} from "../../../Logic/TagsFilter";
/**
* Currently not used in Cyclofix because it's a little vague
+ *
+ * TODO: Translations
*/
export default class BikeStationBrand extends TagRenderingOptions {
private static options = {
diff --git a/Customizations/Questions/bike/StationChain.ts b/Customizations/Questions/bike/StationChain.ts
index eb5c36ade..00893b7cb 100644
--- a/Customizations/Questions/bike/StationChain.ts
+++ b/Customizations/Questions/bike/StationChain.ts
@@ -1,15 +1,17 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class StationChain extends TagRenderingOptions {
constructor() {
+ const to = Translations.t.cylofix.station.chain
super({
priority: 5,
- question: "Does this bike station have a special tool to repair your bike chain?",
+ question: to.question.Render(),
mappings: [
- {k: new Tag("service:bicycle:chain_tool", "yes"), txt: "There is a chain tool."},
- {k: new Tag("service:bicycle:chain_tool", "no"), txt: "There is no chain tool."},
+ {k: new Tag("service:bicycle:chain_tool", "yes"), txt: to.yes.Render()},
+ {k: new Tag("service:bicycle:chain_tool", "no"), txt: to.no.Render()},
]
});
}
diff --git a/Customizations/Questions/bike/StationOperator.ts b/Customizations/Questions/bike/StationOperator.ts
index 001f920cf..30137235a 100644
--- a/Customizations/Questions/bike/StationOperator.ts
+++ b/Customizations/Questions/bike/StationOperator.ts
@@ -1,25 +1,27 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class BikeStationOperator extends TagRenderingOptions {
constructor() {
+ const to = Translations.t.cylofix.station.operator
super({
priority: 15,
- question: "Who operates this bike station (name of university, shop, city...)?",
- freeform: {
- key: "operator",
- template: "This bike station is operated by $$$",
- renderTemplate: "This bike station is operated by {operator}",
- placeholder: "organisatie"
- },
+ question: to.question.Render(),
mappings: [
{k: new Tag("operator", "KU Leuven"), txt: "KU Leuven"},
{k: new Tag("operator", "Stad Halle"), txt: "Stad Halle"},
{k: new Tag("operator", "Saint Gilles - Sint Gillis"), txt: "Saint Gilles - Sint Gillis"},
{k: new Tag("operator", "Jette"), txt: "Jette"},
- {k: new Tag("operator", "private"), txt: "Beheer door een privépersoon"}
- ]
+ {k: new Tag("operator", "private"), txt: to.private.Render()}
+ ],
+ freeform: {
+ key: "operator",
+ template: to.template.txt,
+ renderTemplate: to.render.txt,
+ placeholder: "organisatie"
+ }
});
}
}
diff --git a/Customizations/Questions/bike/StationPumpTools.ts b/Customizations/Questions/bike/StationPumpTools.ts
index be81c8b27..26866aae3 100644
--- a/Customizations/Questions/bike/StationPumpTools.ts
+++ b/Customizations/Questions/bike/StationPumpTools.ts
@@ -1,16 +1,18 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag, And} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class BikeStationPumpTools extends TagRenderingOptions {
constructor() {
+ const to = Translations.t.cylofix.station.services
super({
priority: 15,
- question: "Which services are available at this bike station?",
+ question: to.question.Render(),
mappings: [
- {k: new And([new Tag("service:bicycle:tools", "no"), new Tag("service:bicycle:pump", "yes")]), txt: "There is only a pump available."},
- {k: new And([new Tag("service:bicycle:tools", "yes"), new Tag("service:bicycle:pump", "no")]), txt: "There are only tools (screwdrivers, pliers...) available."},
- {k: new And([new Tag("service:bicycle:tools", "yes"), new Tag("service:bicycle:pump", "yes")]), txt: "There are both tools and a pump available."}
+ {k: new And([new Tag("service:bicycle:tools", "no"), new Tag("service:bicycle:pump", "yes")]), txt: to.pump.Render()},
+ {k: new And([new Tag("service:bicycle:tools", "yes"), new Tag("service:bicycle:pump", "no")]), txt: to.tools.Render()},
+ {k: new And([new Tag("service:bicycle:tools", "yes"), new Tag("service:bicycle:pump", "yes")]), txt: to.both.Render()}
]
});
}
diff --git a/Customizations/Questions/bike/StationStand.ts b/Customizations/Questions/bike/StationStand.ts
index 0b6fce196..be6ac4a1e 100644
--- a/Customizations/Questions/bike/StationStand.ts
+++ b/Customizations/Questions/bike/StationStand.ts
@@ -1,14 +1,16 @@
import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
+import Translations from "../../../UI/i18n/Translations";
export default class BikeStationStand extends TagRenderingOptions {
constructor() {
+ const to = Translations
super({
priority: 10,
question: "Does this bike station have a hook to suspend your bike with or a stand to elevate it?",
mappings: [
- {k: new Tag("service:bicycle:stand", "yes"), txt: "There is a hook or stand."},
+ {k: new Tag("service:bicycle:stand", "yes"), txt: "There is a hook or stand"},
{k: new Tag("service:bicycle:stand", "no"), txt: "There is no hook or stand"},
]
});
diff --git a/UI/CenterMessageBox.ts b/UI/CenterMessageBox.ts
index b08d0d29d..19c5d1a66 100644
--- a/UI/CenterMessageBox.ts
+++ b/UI/CenterMessageBox.ts
@@ -1,6 +1,7 @@
import {UIElement} from "./UIElement";
import {UIEventSource} from "./UIEventSource";
import {OsmConnection} from "../Logic/OsmConnection";
+import Translations from "./i18n/Translations";
export class CenterMessageBox extends UIElement {
@@ -41,11 +42,11 @@ export class CenterMessageBox extends UIElement {
}
if (this._zoomInMore.data) {
- return "Zoom in om de data te zien en te bewerken";
+ return Translations.t.centerMessage.zoomIn.txt;
} else if (this._queryRunning.data) {
- return "Data wordt geladen...";
+ return Translations.t.centerMessage.loadingData.txt;
}
- return "Klaar!";
+ return Translations.t.centerMessage.ready.txt;
}
diff --git a/UI/ImageUploadFlow.ts b/UI/ImageUploadFlow.ts
index 6542824c6..b04070a94 100644
--- a/UI/ImageUploadFlow.ts
+++ b/UI/ImageUploadFlow.ts
@@ -5,6 +5,7 @@ import {Imgur} from "../Logic/Imgur";
import {UserDetails} from "../Logic/OsmConnection";
import {DropDownUI} from "./Base/DropDownUI";
import {VariableUiElement} from "./Base/VariableUIElement";
+import Translations from "./i18n/Translations";
export class ImageUploadFlow extends UIElement {
private _licensePicker: UIElement;
@@ -31,12 +32,11 @@ export class ImageUploadFlow extends UIElement {
this._uploadOptions = uploadOptions;
this.ListenTo(this._isUploading);
- const licensePicker = new DropDownUI("Jouw foto wordt gepubliceerd ",
-
+ const licensePicker = new DropDownUI(Translations.t.image.willBePublished.txt,
[
- {value: "CC0", shown: "in het publiek domein"},
- {value: "CC-BY-SA 4.0", shown: "onder een CC-BY-SA-licentie"},
- {value: "CC-BY 4.0", shown: "onder een CC-BY-licentie"}
+ {value: "CC0", shown: Translations.t.image.cco.txt},
+ {value: "CC-BY-SA 4.0", shown: Translations.t.image.ccbs.txt},
+ {value: "CC-BY 4.0", shown: Translations.t.image.ccb.txt}
],
preferedLicense
);
@@ -65,10 +65,10 @@ export class ImageUploadFlow extends UIElement {
protected InnerRender(): string {
if (!this._userdetails.data.loggedIn) {
- return "