Full translations
This commit is contained in:
parent
33a1e47af2
commit
400d268651
18 changed files with 114 additions and 194 deletions
|
@ -13,7 +13,7 @@ import ParkingOperator from "../Questions/bike/ParkingOperator";
|
|||
export default class BikeParkings extends LayerDefinition {
|
||||
constructor() {
|
||||
super();
|
||||
this.name = Translations.t.cyclofix.parking.name.txt;
|
||||
this.name = Translations.t.cyclofix.parking.name;
|
||||
this.icon = "./assets/bike/parking.svg";
|
||||
this.overpassFilter = new Tag("amenity", "bicycle_parking");
|
||||
this.newElementTags = [
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
import {TagRenderingOptions} from "../TagRendering";
|
||||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import {And, Tag} from "../../Logic/TagsFilter";
|
||||
import L from "leaflet";
|
||||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import {NameQuestion} from "../Questions/NameQuestion";
|
||||
|
||||
export class BikeShop extends LayerDefinition {
|
||||
|
||||
|
||||
private readonly sellsBikes = new Tag("service:bicycle:retail", "yes");
|
||||
private readonly repairsBikes = new Tag("service:bicycle:repair", "yes");
|
||||
|
||||
constructor() {
|
||||
super(
|
||||
{
|
||||
name: "bike shop or repair",
|
||||
icon: "assets/bike/repair_shop.svg",
|
||||
minzoom: 14,
|
||||
overpassFilter: new Tag("shop", "bicycle"),
|
||||
newElementTags: [new Tag("shop", "bicycle")]
|
||||
}
|
||||
);
|
||||
|
||||
this.title = new TagRenderingOptions({
|
||||
mappings: [
|
||||
{k: new And([new Tag("name", "*"), this.sellsBikes]), txt: "Bicycle shop {name}"},
|
||||
{
|
||||
k: new And([new Tag("name", "*"), new Tag("service:bicycle:retail", "no")]),
|
||||
txt: "Bicycle repair {name}",
|
||||
},
|
||||
{
|
||||
k: new And([new Tag("name", "*"), new Tag("service:bicycle:retail", "")]),
|
||||
txt: "Bicycle repair {name}"
|
||||
},
|
||||
|
||||
{k: this.sellsBikes, txt: "Bicycle shop"},
|
||||
{k: new Tag("service:bicycle:retail", "no"), txt: "Bicycle repair"},
|
||||
{k: new Tag("service:bicycle:retail", ""), txt: "Bicycle repair/shop"},
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
new TagRenderingOptions({
|
||||
question: "What is the name of this bicycle shop?",
|
||||
freeform: {
|
||||
key: "name",
|
||||
renderTemplate: "The name of this bicycle shop is {name}",
|
||||
template: "The name of this bicycle shop is $$$"
|
||||
}
|
||||
}),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Can one buy a bike here?",
|
||||
mappings: [
|
||||
{k: this.sellsBikes, txt: "Bikes are sold here"},
|
||||
{k: new Tag("service:bicycle:retail", "no"), txt: "No bikes are sold here"},
|
||||
]
|
||||
}),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Can one buy a new bike here?",
|
||||
mappings: [
|
||||
{k: new Tag("service:bicycle:second_hand", "yes"), txt: "Second-hand bikes are sold here"},
|
||||
{k: new Tag("service:bicycle:second_hand", "only"), txt: "All bicycles sold here are second-hand"},
|
||||
{k: new Tag("service:bicycle:second_hand", "no"), txt: "Only brand new bikes are sold here"},
|
||||
]
|
||||
}).OnlyShowIf(this.sellsBikes),
|
||||
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Does this shop repair bicycles?",
|
||||
mappings: [
|
||||
{k: this.repairsBikes, txt: "Bikes are repaired here, by the shop owner (for a fee)"},
|
||||
{k: new Tag("service:bicycle:repair", "only_sold"), txt: "Only bikes that were bought here, are repaired"},
|
||||
{k: new Tag("service:bicycle:repair", "brand"), txt: "Only bikes of a fixed brand are repaired here"},
|
||||
{k: new Tag("service:bicycle:repair", "no"), txt: "Bikes are not repaired here"},
|
||||
]
|
||||
}),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Can one hire a new bike here?",
|
||||
mappings: [
|
||||
{k: new Tag("service:bicycle:rental", "yes"), txt: "Bikes can be rented here"},
|
||||
{k: new Tag("service:bicycle:rental", "no"), txt: "Bikes cannot be rented here"},
|
||||
]
|
||||
}).OnlyShowIf(this.sellsBikes),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Are there tools here so that one can repair their own bike?",
|
||||
mappings: [
|
||||
{k: new Tag("service:bicycle:diy", "yes"), txt: "Tools for DIY are available here"},
|
||||
{k: new Tag("service:bicycle:diy", "no"), txt: "No tools for DIY are available here"},
|
||||
]
|
||||
}),
|
||||
]
|
||||
|
||||
|
||||
this.style = (tags) => {
|
||||
let icon = "assets/bike/repair_shop.svg";
|
||||
|
||||
if (this.sellsBikes.matchesProperties(tags)) {
|
||||
icon = "assets/bike/shop.svg";
|
||||
}
|
||||
|
||||
return {
|
||||
color: "#ff0000",
|
||||
icon: L.icon({
|
||||
iconUrl: icon,
|
||||
iconSize: [50, 50],
|
||||
iconAnchor: [25, 50]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
import { LayerDefinition } from "../LayerDefinition";
|
||||
import Translations from "../../UI/i18n/Translations";
|
||||
import { Tag } from "../../Logic/TagsFilter";
|
||||
import {And, Tag} from "../../Logic/TagsFilter";
|
||||
import FixedText from "../Questions/FixedText";
|
||||
import { ImageCarouselWithUploadConstructor } from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import * as L from "leaflet";
|
||||
|
@ -20,7 +20,7 @@ export default class BikeShops extends LayerDefinition {
|
|||
|
||||
constructor() {
|
||||
super();
|
||||
this.name = Translations.t.cyclofix.shop.name.txt
|
||||
this.name = Translations.t.cyclofix.shop.name
|
||||
this.icon = "./assets/bike/repair_shop.svg"
|
||||
this.overpassFilter = new Tag("shop", "bicycle");
|
||||
this.newElementTags = [
|
||||
|
@ -32,21 +32,29 @@ export default class BikeShops extends LayerDefinition {
|
|||
this.style = this.generateStyleFunction();
|
||||
this.title = new TagRenderingOptions({
|
||||
mappings: [
|
||||
{k: this.sellsBikes, txt: "Bicycle shop"},
|
||||
{k: new And([new Tag("name", "*"), this.sellsBikes]), txt: Translations.t.cyclofix.shop.titleShopNamed},
|
||||
{
|
||||
k: new And([new Tag("name", "*"), new Tag("service:bicycle:retail", "")]),
|
||||
txt: Translations.t.cyclofix.shop.titleShop
|
||||
},
|
||||
{
|
||||
k: new And([new Tag("name", "*"), new Tag("service:bicycle:retail", "no")]),
|
||||
txt: Translations.t.cyclofix.shop.titleRepairNamed
|
||||
},
|
||||
{k: this.sellsBikes, txt: Translations.t.cyclofix.shop.titleShop},
|
||||
{k: new Tag("service:bicycle:retail", " "), txt: Translations.t.cyclofix.shop.title},
|
||||
{k: new Tag("service:bicycle:retail", "no"), txt: Translations.t.cyclofix.shop.titleRepair},
|
||||
{k: new Tag("service:bicycle:retail", ""), txt: Translations.t.cyclofix.shop.title},
|
||||
]
|
||||
})
|
||||
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
//new ParkingOperator(),
|
||||
new ShopName(),
|
||||
new ShopRetail(),
|
||||
new ShopRental(),
|
||||
new ShopRepair(),
|
||||
new ShopPump(),
|
||||
new ShopDiy(),
|
||||
new ShopName(),
|
||||
new ShopSecondHand()
|
||||
]
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export default class BikeStations extends LayerDefinition {
|
|||
|
||||
constructor() {
|
||||
super();
|
||||
this.name = Translations.t.cyclofix.station.name.txt;
|
||||
this.name = Translations.t.cyclofix.station.name;
|
||||
this.icon = "./assets/wrench.svg";
|
||||
|
||||
this.overpassFilter = new And([
|
||||
|
@ -37,7 +37,7 @@ export default class BikeStations extends LayerDefinition {
|
|||
|
||||
this.minzoom = 13;
|
||||
this.style = this.generateStyleFunction();
|
||||
this.title = new FixedText(Translations.t.cyclofix.station.title.txt)
|
||||
this.title = new FixedText(Translations.t.cyclofix.station.title)
|
||||
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue