diff --git a/src/UI/Popup/AutoApplyButtonVis.ts b/src/UI/Popup/AutoApplyButtonVis.ts index 9bfa3c3659..e00f6ef417 100644 --- a/src/UI/Popup/AutoApplyButtonVis.ts +++ b/src/UI/Popup/AutoApplyButtonVis.ts @@ -2,6 +2,7 @@ import { Store, Stores, UIEventSource } from "../../Logic/UIEventSource" import ThemeConfig from "../../Models/ThemeConfig/ThemeConfig" import { Changes } from "../../Logic/Osm/Changes" import { + SpecialVisualisationArg, SpecialVisualization, SpecialVisualizationState, SpecialVisualizationSvelte, @@ -31,12 +32,7 @@ export default class AutoApplyButtonVis extends SpecialVisualizationSvelte { public readonly funcName: string = "auto_apply" public readonly needsUrls = [] public readonly group = "data_import" - public readonly args: { - name: string - defaultValue?: string - doc: string - required?: boolean - }[] = [ + public readonly args: SpecialVisualisationArg[] = [ { name: "target_layer", doc: "The layer that the target features will reside in", @@ -54,6 +50,7 @@ export default class AutoApplyButtonVis extends SpecialVisualizationSvelte { }, { name: "text", + type:"translation", doc: "The text to show on the button", required: true, }, diff --git a/src/UI/Popup/DataVisualisations.ts b/src/UI/Popup/DataVisualisations.ts index 5a721e162f..0a24125354 100644 --- a/src/UI/Popup/DataVisualisations.ts +++ b/src/UI/Popup/DataVisualisations.ts @@ -302,6 +302,7 @@ class PointsInTimeVis extends SpecialVisualization { args = [ { name: "key", + type:"key", required: true, doc: "The key out of which the points_in_time will be parsed", }, diff --git a/src/UI/Popup/HistogramViz.ts b/src/UI/Popup/HistogramViz.ts index 679255d652..a2f3732f28 100644 --- a/src/UI/Popup/HistogramViz.ts +++ b/src/UI/Popup/HistogramViz.ts @@ -14,6 +14,7 @@ export class HistogramViz extends SpecialVisualization { args = [ { name: "key", + type:"key", doc: "The key to be read and to generate a histogram from", required: true, }, diff --git a/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts b/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts index f72497649a..9600960f60 100644 --- a/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts +++ b/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts @@ -1,4 +1,4 @@ -import { SpecialVisualization, SpecialVisualizationState } from "../../SpecialVisualization" +import { SpecialVisualisationArg, SpecialVisualization, SpecialVisualizationState } from "../../SpecialVisualization" import { UIEventSource } from "../../../Logic/UIEventSource" import { Feature, Geometry, LineString, Polygon } from "geojson" import BaseUIElement from "../../BaseUIElement" @@ -28,15 +28,11 @@ export default class ConflateImportButtonViz extends SpecialVisualization implem group = "data_import" public readonly funcName: string = "conflate_button" - public readonly args: { - name: string - defaultValue?: string - doc: string - required?: boolean - }[] = [ + public readonly args: SpecialVisualisationArg[] = [ ...ImportFlowUtils.generalArguments, { name: "way_to_conflate", + type:"key", doc: "The key, of which the corresponding value is the id of the OSM-way that must be conflated; typically a calculatedTag", }, ] diff --git a/src/UI/Popup/LanguageElement/LanguageElement.ts b/src/UI/Popup/LanguageElement/LanguageElement.ts index df0deecab5..eb4c3786af 100644 --- a/src/UI/Popup/LanguageElement/LanguageElement.ts +++ b/src/UI/Popup/LanguageElement/LanguageElement.ts @@ -10,37 +10,44 @@ export class LanguageElement extends SpecialVisualization { funcName: string = "language_chooser" needsUrls = [] - docs: string | BaseUIElement = + docs: string = "The language element allows to show and pick all known (modern) languages. The key can be set" - args: { name: string; defaultValue?: string; doc: string; required?: boolean }[] = [ + args: { name: string; defaultValue?: string; doc: string; required?: boolean; type?: string }[] = [ { name: "key", required: true, + type:"key", doc: "What key to use, e.g. `language`, `tactile_writing:braille:language`, ... If a language is supported, the language code will be appended to this key, resulting in `:nl=yes` if _nl_ is picked ", }, { name: "question", required: true, + type: "translation", doc: "What to ask if no questions are known", }, { name: "render_list_item", + type: "translation", + doc: "How a single language will be shown in the list of languages. Use `{language}` to indicate the language (which it must contain).", defaultValue: "{language()}", }, { name: "render_single_language", + type: "translation", doc: "What will be shown if the feature only supports a single language", required: true, }, { + type: "translation", name: "render_all", - doc: "The full rendering. Use `{list}` to show where the list of languages must come. Optional if mode=single", + doc: "The full rendering. U0se `{list}` to show where the list of languages must come. Optional if mode=single", defaultValue: "{list()}", }, { name: "no_known_languages", + type: "translation", doc: "The text that is shown if no languages are known for this key. If this text is omitted, the languages will be prompted instead", }, ] diff --git a/src/UI/Popup/MultiApplyViz.ts b/src/UI/Popup/MultiApplyViz.ts index 4a6254f58e..c9b0208229 100644 --- a/src/UI/Popup/MultiApplyViz.ts +++ b/src/UI/Popup/MultiApplyViz.ts @@ -19,7 +19,9 @@ export class MultiApplyViz extends SpecialVisualizationSvelte { doc: "One key (or multiple keys, seperated by ';') of the attribute that should be copied onto the other features.", required: true, }, - { name: "text", doc: "The text to show on the button" }, + { name: "text", + type: "translation", + doc: "The text to show on the button" }, { name: "autoapply", doc: "A boolean indicating wether this tagging should be applied automatically if the relevant tags on this object are changed. A visual element indicating the multi_apply is still shown", diff --git a/src/UI/Popup/PlantNetDetectionViz.ts b/src/UI/Popup/PlantNetDetectionViz.ts index fdfe5dc55f..09dc5b9f4e 100644 --- a/src/UI/Popup/PlantNetDetectionViz.ts +++ b/src/UI/Popup/PlantNetDetectionViz.ts @@ -31,6 +31,7 @@ export class PlantNetDetectionViz extends SpecialVisualizationSvelte { args = [ { name: "image_key", + type:"key", defaultValue: AllImageProviders.defaultKeys.join(","), doc: "The keys given to the images, e.g. if image is given, the first picture URL will be added as image, the second as image:0, the third as image:1, etc... Multiple values are allowed if ';'-separated ", }, diff --git a/src/UI/Popup/ShareLinkViz.ts b/src/UI/Popup/ShareLinkViz.ts index cc0c86ccc3..e97ce55ddb 100644 --- a/src/UI/Popup/ShareLinkViz.ts +++ b/src/UI/Popup/ShareLinkViz.ts @@ -17,6 +17,7 @@ export class ShareLinkViz extends SpecialVisualizationSvelte { }, { name: "text", + type:"translation", doc: "The text to show on the button. If none is given, will act as a titleIcon", }, ] diff --git a/src/UI/SpecialVisualisations/DataImportSpecialVisualisations.ts b/src/UI/SpecialVisualisations/DataImportSpecialVisualisations.ts index 13e7fbbddd..cfb771c211 100644 --- a/src/UI/SpecialVisualisations/DataImportSpecialVisualisations.ts +++ b/src/UI/SpecialVisualisations/DataImportSpecialVisualisations.ts @@ -47,6 +47,7 @@ class MaprouletteSetStatusVis extends SpecialVisualizationSvelte { args = [ { name: "message", + type: "translation", doc: "A message to show to the user", }, { @@ -56,6 +57,7 @@ class MaprouletteSetStatusVis extends SpecialVisualizationSvelte { }, { name: "message_confirm", + type: "translation", doc: "What to show when the task is closed, either by the user or was already closed.", }, { @@ -65,11 +67,13 @@ class MaprouletteSetStatusVis extends SpecialVisualizationSvelte { }, { name: "maproulette_id", + type:"key", doc: "The property name containing the maproulette id", defaultValue: "mr_taskId", }, { name: "ask_feedback", + type: "translation", doc: "If not an empty string, this will be used as question to ask some additional feedback. A text field will be added", defaultValue: "", }, @@ -106,6 +110,7 @@ class LinkedDataFromWebsite extends SpecialVisualization { { name: "key", defaultValue: "website", + type:"key", doc: "Attempt to load ld+json from the specified URL. This can be in an embedded