kopia lustrzana https://github.com/FacilMap/facilmap
Add more translations
rodzic
c6a89d111d
commit
7f103d4a95
|
@ -250,6 +250,7 @@
|
|||
"show-elevation-plot": "Höhenprofil anzeigen",
|
||||
"distance": "Länge",
|
||||
"ascent-descent": "Aufstieg/-abstieg",
|
||||
"zoom-to-object-label": "Zur Linie zoomen",
|
||||
"edit-data": "Bearbeiten",
|
||||
"edit-waypoints": "Bewegen",
|
||||
"delete": "Löschen"
|
||||
|
@ -260,6 +261,7 @@
|
|||
"delete-marker-ok": "Löschen",
|
||||
"delete-marker-error": "Fehler beim Löschen des Markers",
|
||||
"coordinates": "Koordinaten",
|
||||
"zoom-to-object-label": "Zum Marker zoomen",
|
||||
"edit-data": "Bearbeiten",
|
||||
"move": "Bewegen",
|
||||
"delete": "Löschen"
|
||||
|
@ -275,6 +277,7 @@
|
|||
"zoom": "Zoomen",
|
||||
"show-details": "Details anzeigen",
|
||||
"details": "Details",
|
||||
"zoom-to-object-label": "Zur Auswahl zoomen",
|
||||
"delete": "Löschen"
|
||||
},
|
||||
"modal-dialog": {
|
||||
|
@ -293,6 +296,57 @@
|
|||
"overpass-form-tab": {
|
||||
"pois": "POIs"
|
||||
},
|
||||
"overpass-info-tab": {
|
||||
"tab-label_one": "{{count}} POI",
|
||||
"tab-label_other": "{{count}} POIs"
|
||||
},
|
||||
"overpass-info": {
|
||||
"coordinates": "Koordinaten",
|
||||
"zoom-to-object-label": "Zum POI zoomen"
|
||||
},
|
||||
"overpass-multiple-info": {
|
||||
"zoom-to-object": "Zum POI zoomen",
|
||||
"zoom": "Zoomen",
|
||||
"show-details": "Details anzeigen",
|
||||
"details": "Details",
|
||||
"zoom-to-object-label": "Zur Auswahl zoomen"
|
||||
},
|
||||
"pad-id-edit": {
|
||||
"unique-id-error": "Die selbe ID kann nicht für unterschiedliche Zugangsrechte verwendet werden."
|
||||
},
|
||||
"pad-settings-dialog": {
|
||||
"create-map-error": "Fehler beim Erstellen der Karte",
|
||||
"save-map-error": "Fehler beim Speichern der Karte",
|
||||
"delete-map-title": "Karte löschen",
|
||||
"delete-map-message": "Wollen Sie die Karte „{{name}}“ wirklich löschen? Gelöschte Karten können nicht wiederhergestellt werden!",
|
||||
"delete-map-ok": "Löschen",
|
||||
"delete-map-error": "Fehler beim Löschen der Karte",
|
||||
"title-create": "Neue Karte erstellen",
|
||||
"title-edit": "Karteneigenschaften",
|
||||
"create-button": "Erstellen",
|
||||
"admin-link-label": "Admin-Link",
|
||||
"admin-link-description": "Wenn die Karte über diesen Link geöffnet wird, können alle Aspekte der Karte bearbeitet werden, inklusive der Einstellungen, Objekttypen und Ansichten.",
|
||||
"write-link-label": "Schreib-Link",
|
||||
"write-link-description": "Wenn die Karte über diesen Link geöffnet wird, können Marker und Linien erstellt, bearbeitet und gelöscht werden, die Karteneinstellungen, Objekttypen und Ansichten können jedoch nicht verändert werden.",
|
||||
"read-link-label": "Lese-Link",
|
||||
"read-link-description": "Wenn die Karte über diesen Link geöffnet wird, können Marker, Linien und Ansichten gesehen aber nichts verändert werden.",
|
||||
"map-name": "Name der Karte",
|
||||
"search-engines": "Suchmaschinen",
|
||||
"search-engines-label": "Suchmaschinenzugriff erlauben",
|
||||
"search-engines-description": "Wenn dies aktiviert ist, dürfen Suchmaschinen wie Google den Lese-Link der Karte in ihren Suchergebnissen auffindbar machen.",
|
||||
"map-description": "Beschreibung der Karte",
|
||||
"map-description-description": "Diese Beschreibung wird in Suchmaschinen für diese Karte angezeigt.",
|
||||
"cluster-markers": "Marker bündeln",
|
||||
"cluster-markers-label": "Marker bündeln",
|
||||
"cluster-markers-description": "Wenn dies aktiviert ist, werden Marker, die nah beieinander sind, in niedrigen Zoomstufen durch einen Gruppenplatzhalter ersetzt. Das verbessert die Performance auf Karten mit vielen Markern.",
|
||||
"legend-text": "Text in der Legende",
|
||||
"legend-text-description": "Dieser Text wird über und unter der Legende angezeigt. Der Text kann mit {{markdown}} formatiert werden.",
|
||||
"legend-text-description-interpolation-markdown": "Markdown",
|
||||
"delete-map": "Karte löschen",
|
||||
"delete-map-button": "Karte löschen",
|
||||
"delete-description": "Um die Karte zu löschen, tippen Sie {{code}} in das Feld und klicken Sie „Karte löschen“.",
|
||||
"delete-code": "LÖSCHEN"
|
||||
},
|
||||
"user-preferences-dialog": {
|
||||
"title": "Benutzereinstellungen",
|
||||
"introduction": "Diese Einstellungen werden als Cookies auf Ihrem Computer gespeichert und werden unabhängig von der geöffneten Karte angewendet.",
|
||||
|
@ -345,5 +399,9 @@
|
|||
"label": "Ansichten",
|
||||
"save-current-view": "Ansicht speichern",
|
||||
"manage-views": "Ansichten verwalten"
|
||||
},
|
||||
"zoom-to-object-button": {
|
||||
"zoom-to-object": "{{object}} zoomen",
|
||||
"fallback-interpolation": "Objekt"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -250,6 +250,7 @@
|
|||
"show-elevation-plot": "Show elevation plot",
|
||||
"distance": "Distance",
|
||||
"ascent-descent": "Climb/drop",
|
||||
"zoom-to-object-label": "Zoom to line",
|
||||
"edit-data": "Edit data",
|
||||
"edit-waypoints": "Edit waypoints",
|
||||
"delete": "Delete"
|
||||
|
@ -260,6 +261,7 @@
|
|||
"delete-marker-ok": "Delete",
|
||||
"delete-marker-error": "Error deleting marker",
|
||||
"coordinates": "Coordinates",
|
||||
"zoom-to-object-label": "Zoom to marker",
|
||||
"edit-data": "Edit data",
|
||||
"move": "Move",
|
||||
"delete": "Delete"
|
||||
|
@ -275,6 +277,7 @@
|
|||
"zoom": "Zoom",
|
||||
"show-details": "Show details",
|
||||
"details": "Details",
|
||||
"zoom-to-object-label": "Zoom to selection",
|
||||
"delete": "Delete"
|
||||
},
|
||||
"modal-dialog": {
|
||||
|
@ -293,6 +296,57 @@
|
|||
"overpass-form-tab": {
|
||||
"pois": "POIs"
|
||||
},
|
||||
"overpass-info-tab": {
|
||||
"tab-label_one": "{{count}} POI",
|
||||
"tab-label_other": "{{count}} POIs"
|
||||
},
|
||||
"overpass-info": {
|
||||
"coordinates": "Coordinates",
|
||||
"zoom-to-object-label": "Zoom to POI"
|
||||
},
|
||||
"overpass-multiple-info": {
|
||||
"zoom-to-object": "Zoom to object",
|
||||
"zoom": "Zoom",
|
||||
"show-details": "Show details",
|
||||
"details": "Details",
|
||||
"zoom-to-object-label": "Zoom to selection"
|
||||
},
|
||||
"pad-id-edit": {
|
||||
"unique-id-error": "The same link cannot be used for different access levels."
|
||||
},
|
||||
"pad-settings-dialog": {
|
||||
"create-map-error": "Error creating map",
|
||||
"save-map-error": "Error saving map settings",
|
||||
"delete-map-title": "Delete map",
|
||||
"delete-map-message": "Are you sure you want to delete the map “{{name}}”? Deleted maps cannot be restored!",
|
||||
"delete-map-ok": "Delete map",
|
||||
"delete-map-error": "Error deleting map",
|
||||
"title-create": "Create collaborative map",
|
||||
"title-edit": "Map settings",
|
||||
"create-button": "Create",
|
||||
"admin-link-label": "Admin link",
|
||||
"admin-link-description": "When opening the map through this link, all parts of the map can be edited, including the map settings, object types and views.",
|
||||
"write-link-label": "Editable link",
|
||||
"write-link-description": "When opening the map through this link, markers and lines can be added, changed and deleted, but the map settings, object types and views cannot be modified.",
|
||||
"read-link-label": "Read-only link",
|
||||
"read-link-description": "When opening the map through this link, markers, lines and views can be seen, but nothing can be changed.",
|
||||
"map-name": "Map name",
|
||||
"search-engines": "Search engines",
|
||||
"search-engines-label": "Accessible for search engines",
|
||||
"search-engines-description": "If this is enabled, search engines like Google will be allowed to add the read-only version of this map.",
|
||||
"map-description": "Short description",
|
||||
"map-description-description": "This description will be shown under the result in search engines.",
|
||||
"cluster-markers": "Cluster markers",
|
||||
"cluster-markers-label": "Cluster markers",
|
||||
"cluster-markers-description": "If enabled, when there are many markers in one area, they will be replaced by a placeholder at low zoom levels. This improves performance on maps with many markers.",
|
||||
"legend-text": "Legend text",
|
||||
"legend-text-description": "Text that will be shown above and below the legend. Can be formatted with {{markdown}}.",
|
||||
"legend-text-description-interpolation-markdown": "Markdown",
|
||||
"delete-map": "Delete map",
|
||||
"delete-map-button": "Delete map",
|
||||
"delete-description": "To delete this map, type {{code}} into the field and click the “Delete map” button.",
|
||||
"delete-code": "DELETE"
|
||||
},
|
||||
"user-preferences-dialog": {
|
||||
"title": "User preferences",
|
||||
"introduction": "These settings are stored on your computer as a cookie and are applied independently of the opened map.",
|
||||
|
@ -345,5 +399,8 @@
|
|||
"label": "Views",
|
||||
"save-current-view": "Save current view",
|
||||
"manage-views": "Manage views"
|
||||
},
|
||||
"zoom-to-object-button": {
|
||||
"fallback-label": "Zoom to object"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
<div v-if="!isMoving" class="btn-toolbar">
|
||||
<ZoomToObjectButton
|
||||
v-if="zoomDestination"
|
||||
label="line"
|
||||
:label="i18n.t('line-info.zoom-to-object-label')"
|
||||
size="sm"
|
||||
:destination="zoomDestination"
|
||||
></ZoomToObjectButton>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<div class="btn-toolbar">
|
||||
<ZoomToObjectButton
|
||||
v-if="zoomDestination"
|
||||
label="marker"
|
||||
:label="i18n.t('marker-info.zoom-to-object-label')"
|
||||
size="sm"
|
||||
:destination="zoomDestination"
|
||||
></ZoomToObjectButton>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<div class="btn-toolbar mt-2">
|
||||
<ZoomToObjectButton
|
||||
v-if="zoomDestination"
|
||||
label="selection"
|
||||
:label="i18n.t('multiple-info.zoom-to-object-label')"
|
||||
size="sm"
|
||||
:destination="zoomDestination"
|
||||
></ZoomToObjectButton>
|
||||
|
|
|
@ -5,10 +5,13 @@
|
|||
import { useEventListener } from "../../utils/utils";
|
||||
import { computed } from "vue";
|
||||
import { injectContextRequired, requireMapContext, requireSearchBoxContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
|
||||
import { formatPOIName } from "facilmap-utils";
|
||||
import { useI18n } from "../../utils/i18n";
|
||||
|
||||
const context = injectContextRequired();
|
||||
const mapContext = requireMapContext(context);
|
||||
const searchBoxContext = requireSearchBoxContext(context);
|
||||
const i18n = useI18n();
|
||||
|
||||
useEventListener(mapContext, "open-selection", handleOpenSelection);
|
||||
|
||||
|
@ -37,7 +40,7 @@
|
|||
<template v-if="elements.length > 0">
|
||||
<SearchBoxTab
|
||||
:id="`fm${context.id}-overpass-info-tab`"
|
||||
:title="elements.length == 1 ? (elements[0].tags.name || 'Unnamed POI') : `${elements.length} POIs`"
|
||||
:title="elements.length == 1 ? (formatPOIName(elements[0].tags.name)) : i18n.t('overpass-info-tab.tab-label', { count: elements.length })"
|
||||
isCloseable
|
||||
@close="close()"
|
||||
>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { renderOsmTag } from "facilmap-utils";
|
||||
import { formatCoordinates, formatPOIName, renderOsmTag } from "facilmap-utils";
|
||||
import Icon from "../ui/icon.vue";
|
||||
import { getZoomDestinationForMarker } from "../../utils/zoom";
|
||||
import type { OverpassElement } from "facilmap-leaflet";
|
||||
|
@ -11,6 +11,9 @@
|
|||
import type { RouteDestination } from "../facil-map-context-provider/route-form-tab-context";
|
||||
import { overpassElementsToMarkersWithTags } from "../../utils/add";
|
||||
import AddToMapDropdown from "../ui/add-to-map-dropdown.vue";
|
||||
import { useI18n } from "../../utils/i18n";
|
||||
|
||||
const i18n = useI18n();
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
element: OverpassElement;
|
||||
|
@ -30,7 +33,7 @@
|
|||
|
||||
const routeDestination = computed<RouteDestination>(() => {
|
||||
return {
|
||||
query: `${props.element.lat},${props.element.lon}`
|
||||
query: formatCoordinates(props.element)
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -41,10 +44,10 @@
|
|||
<div class="fm-overpass-info">
|
||||
<h2>
|
||||
<a v-if="showBackButton" href="javascript:" @click="emit('back')"><Icon icon="arrow-left"></Icon></a>
|
||||
{{element.tags.name || 'Unnamed POI'}}
|
||||
{{formatPOIName(element.tags.name)}}
|
||||
</h2>
|
||||
<dl class="fm-search-box-collapse-point fm-search-box-dl">
|
||||
<dt>Coordinates</dt>
|
||||
<dt>{{i18n.t("overpass-info.coordinates")}}</dt>
|
||||
<dd><Coordinates :point="element"></Coordinates></dd>
|
||||
|
||||
<template v-for="(value, key) in element.tags" :key="key">
|
||||
|
@ -55,7 +58,7 @@
|
|||
|
||||
<div class="btn-toolbar">
|
||||
<ZoomToObjectButton
|
||||
label="POI"
|
||||
:label="i18n.t('overpass-info.zoom-to-object-label')"
|
||||
size="sm"
|
||||
:destination="zoomDestination"
|
||||
></ZoomToObjectButton>
|
||||
|
|
|
@ -10,10 +10,13 @@
|
|||
import { injectContextRequired, requireClientContext, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
|
||||
import { overpassElementsToMarkersWithTags } from "../../utils/add";
|
||||
import AddToMapDropdown from "../ui/add-to-map-dropdown.vue";
|
||||
import { formatPOIName } from "facilmap-utils";
|
||||
import { useI18n } from "../../utils/i18n";
|
||||
|
||||
const context = injectContextRequired();
|
||||
const client = requireClientContext(context);
|
||||
const mapContext = requireMapContext(context);
|
||||
const i18n = useI18n();
|
||||
|
||||
const props = defineProps<{
|
||||
elements: OverpassElement[];
|
||||
|
@ -55,17 +58,17 @@
|
|||
<ul class="list-group">
|
||||
<li v-for="element in elements" :key="element.id" class="list-group-item active">
|
||||
<span>
|
||||
<a href="javascript:" @click="emit('click-element', element, $event)">{{element.tags.name || 'Unnamed POI'}}</a>
|
||||
<a href="javascript:" @click="emit('click-element', element, $event)">{{formatPOIName(element.tags.name)}}</a>
|
||||
</span>
|
||||
<a href="javascript:" @click="zoomToElement(element)" v-tooltip.left="'Zoom to object'"><Icon icon="zoom-in" alt="Zoom"></Icon></a>
|
||||
<a href="javascript:" @click="openElement(element)" v-tooltip.right="'Show details'"><Icon icon="arrow-right" alt="Details"></Icon></a>
|
||||
<a href="javascript:" @click="zoomToElement(element)" v-tooltip.left="i18n.t('overpass-multiple-info.zoom-to-object')"><Icon icon="zoom-in" :alt="i18n.t('overpass-multiple-info.zoom')"></Icon></a>
|
||||
<a href="javascript:" @click="openElement(element)" v-tooltip.right="i18n.t('overpass-multiple-info.show-details')"><Icon icon="arrow-right" :alt="i18n.t('overpass-multiple-info.details')"></Icon></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div v-if="client.padData && !client.readonly" class="btn-toolbar">
|
||||
<div v-if="client.padData && !client.readonly" class="btn-toolbar mt-2">
|
||||
<ZoomToObjectButton
|
||||
v-if="zoomDestination"
|
||||
label="selection"
|
||||
:label="i18n.t('overpass-multiple-info.zoom-to-object-label')"
|
||||
size="sm"
|
||||
:destination="zoomDestination"
|
||||
></ZoomToObjectButton>
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
import { getUniqueId, getZodValidator, validateRequired } from "../../utils/utils";
|
||||
import { injectContextRequired } from "../facil-map-context-provider/facil-map-context-provider.vue";
|
||||
import CopyToClipboardInput from "../ui/copy-to-clipboard-input.vue";
|
||||
import { useI18n } from "../../utils/i18n";
|
||||
|
||||
const idProps = ["id", "writeId", "adminId"] as const;
|
||||
type IdProp = typeof idProps[number];
|
||||
|
||||
const context = injectContextRequired();
|
||||
const i18n = useI18n();
|
||||
|
||||
const props = defineProps<{
|
||||
padData: PadData<CRU.CREATE>;
|
||||
|
@ -33,7 +35,7 @@
|
|||
|
||||
function validateDistinctPadId(id: string) {
|
||||
if (idProps.some((p) => p !== props.idProp && props.padData[p] === id)) {
|
||||
return "The same link cannot be used for different access levels.";
|
||||
return i18n.t("pad-id-edit.unique-id-error");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -10,11 +10,13 @@
|
|||
import PadIdEdit from "./pad-id-edit.vue";
|
||||
import { injectContextRequired, requireClientContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
|
||||
import ValidatedField from "../ui/validated-form/validated-field.vue";
|
||||
import { T, useI18n } from "../../utils/i18n";
|
||||
|
||||
const context = injectContextRequired();
|
||||
const client = requireClientContext(context);
|
||||
|
||||
const toasts = useToasts();
|
||||
const i18n = useI18n();
|
||||
|
||||
const props = defineProps<{
|
||||
proposedAdminId?: string;
|
||||
|
@ -30,6 +32,7 @@
|
|||
const id = getUniqueId("fm-pad-settings");
|
||||
const isDeleting = ref(false);
|
||||
const deleteConfirmation = ref("");
|
||||
const expectedDeleteConfirmation = computed(() => i18n.t('pad-settings-dialog.delete-code'));
|
||||
|
||||
const initialPadData: PadData<CRU.CREATE> | undefined = props.isCreate ? {
|
||||
name: "",
|
||||
|
@ -67,7 +70,7 @@
|
|||
await client.value.editPad(padData.value);
|
||||
modalRef.value?.modal.hide();
|
||||
} catch (err) {
|
||||
toasts.showErrorToast(`fm${context.id}-pad-settings-error`, props.isCreate ? "Error creating map" : "Error saving map settings", err);
|
||||
toasts.showErrorToast(`fm${context.id}-pad-settings-error`, props.isCreate ? i18n.t("pad-settings-dialog.create-map-error") : i18n.t("pad-settings-dialog.save-map-error"), err);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -75,10 +78,10 @@
|
|||
toasts.hideToast(`fm${context.id}-pad-settings-error`);
|
||||
|
||||
if (!await showConfirm({
|
||||
title: "Delete map",
|
||||
message: `Are you sure you want to delete the map “${padData.value.name}”? Deleted maps cannot be restored!`,
|
||||
title: i18n.t("pad-settings-dialog.delete-map-title"),
|
||||
message: i18n.t("pad-settings-dialog.delete-map-message", { name: padData.value.name }),
|
||||
variant: "danger",
|
||||
okLabel: "Delete map"
|
||||
okLabel: i18n.t("pad-settings-dialog.delete-map-ok")
|
||||
})) {
|
||||
return;
|
||||
}
|
||||
|
@ -89,7 +92,7 @@
|
|||
await client.value.deletePad();
|
||||
modalRef.value?.modal.hide();
|
||||
} catch (err) {
|
||||
toasts.showErrorToast(`fm${context.id}-pad-settings-error`, "Error deleting map", err);
|
||||
toasts.showErrorToast(`fm${context.id}-pad-settings-error`, i18n.t("pad-settings-dialog.delete-map-error"), err);
|
||||
} finally {
|
||||
isDeleting.value = false;
|
||||
}
|
||||
|
@ -98,13 +101,13 @@
|
|||
|
||||
<template>
|
||||
<ModalDialog
|
||||
:title="props.isCreate ? 'Create collaborative map' : 'Map settings'"
|
||||
:title="props.isCreate ? i18n.t('pad-settings-dialog.title-create') : i18n.t('pad-settings-dialog.title-edit')"
|
||||
class="fm-pad-settings"
|
||||
:noCancel="props.noCancel"
|
||||
:isBusy="isDeleting"
|
||||
:isCreate="props.isCreate"
|
||||
:isModified="isModified"
|
||||
:okLabel="props.isCreate ? 'Create' : undefined"
|
||||
:okLabel="props.isCreate ? i18n.t('pad-settings-dialog.create-button') : undefined"
|
||||
ref="modalRef"
|
||||
@submit="$event.waitUntil(save())"
|
||||
@hide="emit('hide')"
|
||||
|
@ -115,24 +118,24 @@
|
|||
:padData="padData"
|
||||
idProp="adminId"
|
||||
v-model="padData.adminId"
|
||||
label="Admin link"
|
||||
description="When opening the map through this link, all parts of the map can be edited, including the map settings, object types and views."
|
||||
:label="i18n.t('pad-settings-dialog.admin-link-label')"
|
||||
:description="i18n.t('pad-settings-dialog.admin-link-description')"
|
||||
></PadIdEdit>
|
||||
|
||||
<PadIdEdit
|
||||
:padData="padData"
|
||||
idProp="writeId"
|
||||
v-model="padData.writeId"
|
||||
label="Editable link"
|
||||
description="When opening the map through this link, markers and lines can be added, changed and deleted, but the map settings, object types and views cannot be modified."
|
||||
:label="i18n.t('pad-settings-dialog.write-link-label')"
|
||||
:description="i18n.t('pad-settings-dialog.write-link-description')"
|
||||
></PadIdEdit>
|
||||
|
||||
<PadIdEdit
|
||||
:padData="padData"
|
||||
idProp="id"
|
||||
v-model="padData.id"
|
||||
label="Read-only link"
|
||||
description="When opening the map through this link, markers, lines and views can be seen, but nothing can be changed."
|
||||
:label="i18n.t('pad-settings-dialog.read-link-label')"
|
||||
:description="i18n.t('pad-settings-dialog.read-link-description')"
|
||||
></PadIdEdit>
|
||||
|
||||
<ValidatedField
|
||||
|
@ -141,7 +144,7 @@
|
|||
:validators="[getZodValidator(padDataValidator.update.shape.name)]"
|
||||
>
|
||||
<template #default="slotProps">
|
||||
<label :for="`${id}-pad-name-input`" class="col-sm-3 col-form-label">Map name</label>
|
||||
<label :for="`${id}-pad-name-input`" class="col-sm-3 col-form-label">{{i18n.t("pad-settings-dialog.map-name")}}</label>
|
||||
<div class="col-sm-9 position-relative">
|
||||
<input
|
||||
:id="`${id}-pad-name-input`"
|
||||
|
@ -158,7 +161,7 @@
|
|||
</ValidatedField>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label :for="`${id}-search-engines-input`" class="col-sm-3 col-form-label">Search engines</label>
|
||||
<label :for="`${id}-search-engines-input`" class="col-sm-3 col-form-label">{{i18n.t("pad-settings-dialog.search-engines")}}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="form-check fm-form-check-with-label">
|
||||
<input
|
||||
|
@ -168,17 +171,17 @@
|
|||
v-model="padData.searchEngines"
|
||||
/>
|
||||
<label :for="`${id}-search-engines-input`" class="form-check-label">
|
||||
Accessible for search engines
|
||||
{{i18n.t("pad-settings-dialog.search-engines-label")}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
If this is enabled, search engines like Google will be allowed to add the read-only version of this map.
|
||||
{{i18n.t("pad-settings-dialog.search-engines-description")}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label :for="`${id}-description-input`" class="col-sm-3 col-form-label">Short description</label>
|
||||
<label :for="`${id}-description-input`" class="col-sm-3 col-form-label">{{i18n.t("pad-settings-dialog.map-description")}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
:id="`${id}-description-input`"
|
||||
|
@ -187,13 +190,13 @@
|
|||
v-model="padData.description"
|
||||
/>
|
||||
<div class="form-text">
|
||||
This description will be shown under the result in search engines.
|
||||
{{i18n.t("pad-settings-dialog.map-description-description")}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label :for="`${id}-cluster-markers-input`" class="col-sm-3 col-form-label">Search engines</label>
|
||||
<label :for="`${id}-cluster-markers-input`" class="col-sm-3 col-form-label">{{i18n.t("pad-settings-dialog.cluster-markers")}}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="form-check fm-form-check-with-label">
|
||||
<input
|
||||
|
@ -203,17 +206,17 @@
|
|||
v-model="padData.clusterMarkers"
|
||||
/>
|
||||
<label :for="`${id}-cluster-markers-input`" class="form-check-label">
|
||||
Cluster markers
|
||||
{{i18n.t("pad-settings-dialog.cluster-markers-label")}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
If enabled, when there are many markers in one area, they will be replaced by a placeholder at low zoom levels. This improves performance on maps with many markers.
|
||||
{{i18n.t("pad-settings-dialog.cluster-markers-description")}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label :for="`${id}-legend1-input`" class="col-sm-3 col-form-label">Legend text</label>
|
||||
<label :for="`${id}-legend1-input`" class="col-sm-3 col-form-label">{{i18n.t("pad-settings-dialog.legend-text")}}</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea
|
||||
:id="`${id}-legend1-input`"
|
||||
|
@ -228,7 +231,11 @@
|
|||
v-model="padData.legend2"
|
||||
></textarea>
|
||||
<div class="form-text">
|
||||
Text that will be shown above and below the legend. Can be formatted with <a href="http://commonmark.org/help/" target="_blank">Markdown</a>.
|
||||
<T k="pad-settings-dialog.legend-text-description">
|
||||
<template #markdown>
|
||||
<a href="http://commonmark.org/help/" target="_blank">{{i18n.t("pad-settings-dialog.legend-text-description-interpolation-markdown")}}</a>
|
||||
</template>
|
||||
</T>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -238,7 +245,7 @@
|
|||
<hr/>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label :for="`${id}-delete-input`" class="col-sm-3 col-form-label">Delete map</label>
|
||||
<label :for="`${id}-delete-input`" class="col-sm-3 col-form-label">{{i18n.t("pad-settings-dialog.delete-map")}}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<input
|
||||
|
@ -252,20 +259,24 @@
|
|||
:form="`${id}-delete-form`"
|
||||
class="btn btn-danger"
|
||||
type="submit"
|
||||
:disabled="isDeleting || modalRef?.formData?.isSubmitting || deleteConfirmation != 'DELETE'"
|
||||
:disabled="isDeleting || modalRef?.formData?.isSubmitting || deleteConfirmation != expectedDeleteConfirmation"
|
||||
>
|
||||
<div v-if="isDeleting" class="spinner-border spinner-border-sm"></div>
|
||||
Delete map
|
||||
{{i18n.t("pad-settings-dialog.delete-map-button")}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
To delete this map, type <code>DELETE</code> into the field and click the “Delete map” button.
|
||||
<T k="pad-settings-dialog.delete-description">
|
||||
<template #code>
|
||||
<code>{{expectedDeleteConfirmation}}</code>
|
||||
</template>
|
||||
</T>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</ModalDialog>
|
||||
|
||||
<form :id="`${id}-delete-form`" @submit.prevent="deleteConfirmation == 'DELETE' && deletePad()">
|
||||
<form :id="`${id}-delete-form`" @submit.prevent="deleteConfirmation == expectedDeleteConfirmation && deletePad()">
|
||||
</form>
|
||||
</template>
|
|
@ -5,9 +5,11 @@
|
|||
import { injectContextRequired, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
|
||||
import Icon from "./icon.vue";
|
||||
import vTooltip from "../../utils/tooltip";
|
||||
import { useI18n } from "../../utils/i18n";
|
||||
|
||||
const context = injectContextRequired();
|
||||
const mapContext = requireMapContext(context);
|
||||
const i18n = useI18n();
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
destination: ZoomDestination;
|
||||
|
@ -17,7 +19,7 @@
|
|||
label: "object"
|
||||
});
|
||||
|
||||
const tooltip = computed(() => `Zoom to ${props.label}`);
|
||||
const tooltip = computed(() => props.label ?? i18n.t("zoom-to-object-button.fallback-label"));
|
||||
|
||||
function zoom(): void {
|
||||
flyTo(mapContext.value.components.map, props.destination);
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
"fastfood": "Fast Food",
|
||||
"foodcourt": "Food-Court",
|
||||
"icecream": "Eis",
|
||||
"pub": "Pub",
|
||||
"pub": "Kneipe",
|
||||
"restaurant": "Restaurant",
|
||||
"category-various": "Sonstige",
|
||||
"busstop": "Bushaltestelle",
|
||||
|
|
|
@ -57,6 +57,10 @@ export function formatFieldName(name: string): string {
|
|||
}
|
||||
}
|
||||
|
||||
export function formatPOIName(name: string): string {
|
||||
return name || getI18n().t("format.unnamed-poi");
|
||||
}
|
||||
|
||||
export function markdownBlock(string: string, html: boolean): string {
|
||||
const $ = load("<div/>");
|
||||
const el = $.root();
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"marker-type-name": "Marker",
|
||||
"line-type-name": "Linie",
|
||||
"description-field-name": "Beschreibung",
|
||||
"unnamed-poi": "Unbenannter POI",
|
||||
"time": "{{hours}}:{{minutes}} h",
|
||||
"route-time": "{{time}} {{mode}}",
|
||||
"distance-km": "{{distance}} km",
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"marker-type-name": "Marker",
|
||||
"line-type-name": "Line",
|
||||
"description-field-name": "Description",
|
||||
"unnamed-poi": "Unnamed POI",
|
||||
"time": "{{hours}}:{{minutes}} h",
|
||||
"route-time": "{{time}} {{mode}}",
|
||||
"distance-km": "{{distance}} km",
|
||||
|
|
Ładowanie…
Reference in New Issue