From 81a80ef95cc4121a594bbd229b892bfb22f3b3f5 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 20 Jul 2020 17:30:02 +0200 Subject: [PATCH] More translations --- Customizations/Layers/BikeParkings.ts | 2 +- Customizations/Layers/BikeShop.ts | 12 ++++- Customizations/Layers/BikeStations.ts | 6 ++- .../Questions/bike/StationOperator.ts | 2 +- Customizations/TagRendering.ts | 4 +- UI/Image/ImageCarousel.ts | 6 +-- UI/ImageUploadFlow.ts | 46 +++++++------------ UI/MessageBoxHandler.ts | 2 +- UI/SaveButton.ts | 2 +- UI/UserBadge.ts | 2 +- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Customizations/Layers/BikeParkings.ts b/Customizations/Layers/BikeParkings.ts index 2c8a731d0..e336ba84d 100644 --- a/Customizations/Layers/BikeParkings.ts +++ b/Customizations/Layers/BikeParkings.ts @@ -23,7 +23,7 @@ export default class BikeParkings extends LayerDefinition { this.title = new FixedText("Fietsparking"); this.elementsToShow = [ new ImageCarouselWithUploadConstructor(), - new OperatorTag(), + // new OperatorTag(), new ParkingType() ]; diff --git a/Customizations/Layers/BikeShop.ts b/Customizations/Layers/BikeShop.ts index 714930e7f..005613942 100644 --- a/Customizations/Layers/BikeShop.ts +++ b/Customizations/Layers/BikeShop.ts @@ -55,8 +55,16 @@ export class BikeShop extends LayerDefinition { new TagRenderingOptions({ question: "Does this shop repair bicycles?", mappings: [ - {k: this.sellsBikes, txt: "Bikes can be repaired here"}, - {k: new Tag("service:bicycle:retail", "no"), txt: "No bikes can be bought here"}, + {k: new Tag("service:bicycle:repair", "yes"), txt: "Bikes are repaired here, by the shop owner (for a fee)"}, + {k: new Tag("service:bicycle:repair", "no"), txt: "Bikes are not repaired here"}, + ] + }), + + 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"}, ] }), ] diff --git a/Customizations/Layers/BikeStations.ts b/Customizations/Layers/BikeStations.ts index 258aad98d..5af8cfd1e 100644 --- a/Customizations/Layers/BikeStations.ts +++ b/Customizations/Layers/BikeStations.ts @@ -73,7 +73,11 @@ export default class BikeStations extends LayerDefinition { } } } else { - iconName = "repair_station.svg" + if (!self.pump.matchesProperties(properties)) { + iconName = "repair_station.svg" + } else { + iconName = "repair_station.svg" + } } const iconUrl = `./assets/bike/${iconName}` return { diff --git a/Customizations/Questions/bike/StationOperator.ts b/Customizations/Questions/bike/StationOperator.ts index 001f920cf..56b00eb2f 100644 --- a/Customizations/Questions/bike/StationOperator.ts +++ b/Customizations/Questions/bike/StationOperator.ts @@ -18,7 +18,7 @@ export default class BikeStationOperator extends TagRenderingOptions { {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: "Operated by a private individual"} ] }); } diff --git a/Customizations/TagRendering.ts b/Customizations/TagRendering.ts index ea8ca3290..5003ab116 100644 --- a/Customizations/TagRendering.ts +++ b/Customizations/TagRendering.ts @@ -325,9 +325,9 @@ class TagRendering extends UIElement implements TagDependantUIElement { const cancelContents = this._editMode.map((isEditing) => { if (isEditing) { - return "Annuleren"; + return "Cancel"; } else { - return "Overslaan (Ik weet het niet zeker...)"; + return "Skip this question"; } }); // And at last, set up the skip button diff --git a/UI/Image/ImageCarousel.ts b/UI/Image/ImageCarousel.ts index 9d4e1fd00..b3f40d8c5 100644 --- a/UI/Image/ImageCarousel.ts +++ b/UI/Image/ImageCarousel.ts @@ -23,10 +23,10 @@ export class ImageCarouselConstructor implements TagDependantUIElementConstructo return 0; } - construct(tags: UIEventSource, changes: Changes): TagDependantUIElement { - return new ImageCarousel(tags, changes); + construct(dependencies: { tags: UIEventSource, changes: Changes }): TagDependantUIElement { + return new ImageCarousel(dependencies.tags, dependencies.changes); } - + } export class ImageCarousel extends TagDependantUIElement { diff --git a/UI/ImageUploadFlow.ts b/UI/ImageUploadFlow.ts index 6542824c6..6c3d56967 100644 --- a/UI/ImageUploadFlow.ts +++ b/UI/ImageUploadFlow.ts @@ -9,7 +9,6 @@ import {VariableUiElement} from "./Base/VariableUIElement"; export class ImageUploadFlow extends UIElement { private _licensePicker: UIElement; private _selectedLicence: UIEventSource; - private _licenseExplanation: UIElement; private _isUploading: UIEventSource = new UIEventSource(0) private _uploadOptions: (license: string) => { title: string; description: string; handleURL: (url: string) => void; allDone: (() => void) }; private _userdetails: UIEventSource; @@ -31,12 +30,12 @@ export class ImageUploadFlow extends UIElement { this._uploadOptions = uploadOptions; this.ListenTo(this._isUploading); - const licensePicker = new DropDownUI("Jouw foto wordt gepubliceerd ", + const licensePicker = new DropDownUI("The picture is published ", [ - {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: "in the public domain"}, + {value: "CC-BY-SA 4.0", shown: "with a CC-BY-SA license"}, + {value: "CC-BY 4.0", shown: "with a CC-BY license"} ], preferedLicense ); @@ -44,48 +43,37 @@ export class ImageUploadFlow extends UIElement { this._selectedLicence = licensePicker.selectedElement; - const licenseExplanations = { - "CC-BY-SA 4.0": - "Creative Commonse met naamsvermelding en gelijk delen
" + - "Je foto mag door iedereen gratis gebruikt worden, als ze je naam vermelden én ze afgeleide werken met deze licentie en attributie delen.", - "CC-BY 4.0": - "Creative Commonse met naamsvermelding
" + - "Je foto mag door iedereen gratis gebruikt worden, als ze je naam vermelden", - "CC0": - "Geen copyright
Je foto mag door iedereen voor alles gebruikt worden" - } - this._licenseExplanation = new VariableUiElement( - this._selectedLicence.map((license) => { - return licenseExplanations[license] - }) - ); } protected InnerRender(): string { if (!this._userdetails.data.loggedIn) { - return "
Gelieve je aan te melden om een foto toe te voegen of vragen te beantwoorden
"; + return "
Please log in to add a picture
"; } + + let uploadingMessage = ""; if (this._isUploading.data == 1) { - return "Bezig met een foto te uploaden..." + uploadingMessage = "Uploading a picture..." } if (this._isUploading.data > 0) { - return "Bezig met uploaden, nog " + this._isUploading.data + " foto's te gaan..." + uploadingMessage = "Uploading multiple pictures, " + this._isUploading.data + " left..." } return "" + "
" + - + "" + "("

Naar de kaart

"), + new VariableUiElement(new UIEventSource("

Return to the map

"), () => { document.getElementById("to-the-map").onclick = function () { uielement.setData(undefined); diff --git a/UI/SaveButton.ts b/UI/SaveButton.ts index 3bba390a7..f78fbd4a5 100644 --- a/UI/SaveButton.ts +++ b/UI/SaveButton.ts @@ -19,7 +19,7 @@ export class SaveButton extends UIElement { ) { return "Opslaan" } - return "Opslaan"; + return "Save"; } } \ No newline at end of file diff --git a/UI/UserBadge.ts b/UI/UserBadge.ts index a3912e0d4..c810acf31 100644 --- a/UI/UserBadge.ts +++ b/UI/UserBadge.ts @@ -60,7 +60,7 @@ export class UserBadge extends UIElement { protected InnerRender(): string { const user = this._userDetails.data; if (!user.loggedIn) { - return "
Klik hier om aan te melden bij OSM
"; + return "
Login with OpenStreetMap
"; }