feat(windkarte): Stellungnahme-Kriterien per Windvorranggebiet
Jedes Windvorranggebiet kann jetzt 1–n text_fragment-Einträge als Stellungnahme-Kriterien referenzieren. Das Panel lädt diese lazy beim Öffnen und zeigt sie als aufklappbare Accordion-Sektion. Außerdem: alle hardcodierten Strings im Karten-Block (Panel, Map, Block) durch t()-Aufrufe ersetzt; 7 neue Translation-Keys ergänzt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import { onMount, onDestroy } from "svelte";
|
||||
import type { WindArea } from "$lib/windkarte";
|
||||
import { useTranslate, T } from "$lib/translations";
|
||||
|
||||
let {
|
||||
areas,
|
||||
@@ -19,6 +20,8 @@
|
||||
hiddenRings?: string[];
|
||||
} = $props();
|
||||
|
||||
const t = useTranslate();
|
||||
|
||||
// Mirror prop into plain variable so Leaflet event handlers read current value.
|
||||
let _hidden: string[] = [];
|
||||
$effect(() => {
|
||||
@@ -262,11 +265,11 @@
|
||||
? `${nrLabel} – ${area.bezeichnung}`
|
||||
: nrLabel;
|
||||
const lines: string[] = [];
|
||||
if (area.flaeche_ha != null) lines.push(`Fläche: ${area.flaeche_ha.toFixed(1)} ha`);
|
||||
if (area.anlagen_geplant != null) lines.push(`Geplante Anlagen: ${area.anlagen_geplant}`);
|
||||
if (area.hoehe_max_m != null) lines.push(`Max. Nabenhöhe: ${area.hoehe_max_m} m`);
|
||||
if (area.flaeche_ha != null) lines.push(`${t(T.windkarte_label_flaeche)}: ${area.flaeche_ha.toFixed(1)} ha`);
|
||||
if (area.anlagen_geplant != null) lines.push(`${t(T.windkarte_label_anlagen_geplant)}: ${area.anlagen_geplant}`);
|
||||
if (area.hoehe_max_m != null) lines.push(`${t(T.windkarte_label_hoehe_max)}: ${area.hoehe_max_m} m`);
|
||||
if (area.gemeinden && area.gemeinden.length > 0) {
|
||||
lines.push(`Gemeinden: ${area.gemeinden.slice(0, 3).join(', ')}${area.gemeinden.length > 3 ? '…' : ''}`);
|
||||
lines.push(`${t(T.windkarte_label_gemeinden)}: ${area.gemeinden.slice(0, 3).join(', ')}${area.gemeinden.length > 3 ? '…' : ''}`);
|
||||
}
|
||||
const esc = (s: string) => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
const tooltipHtml =
|
||||
|
||||
Reference in New Issue
Block a user