added translations

This commit is contained in:
Joren de Graaf
2026-10-01 22:43:45 +02:00
parent 2e36f26089
commit 3b864f001d
78 changed files with 1787 additions and 291 deletions
@@ -0,0 +1 @@
const t=window.BOOMCAST_I18N||{};document.querySelectorAll(".audio-preview").forEach(function(o){var n=o.querySelector(".audio-play"),e=o.querySelector("audio"),a=o.querySelector(".audio-play__label"),i=o.querySelector(".audio-status");n.addEventListener("click",function(){e.src||(e.src=n.dataset.audioUrl,n.classList.add("is-loading"),i.textContent=t.loadingRecording||"Loading recording…"),e.paused?e.play().catch(function(){n.classList.remove("is-loading"),i.textContent=t.couldNotPlay||"Could not play this recording."}):e.pause()}),e.addEventListener("playing",function(){n.classList.remove("is-loading"),a.textContent=t.pauseRecording||"Pause recording",i.textContent=t.playingNow||"Playing now"}),e.addEventListener("pause",function(){e.ended||(a.textContent=t.resumeRecording||"Resume recording",i.textContent=t.paused||"Paused")}),e.addEventListener("ended",function(){a.textContent=t.replayRecording||"Replay recording",i.textContent=t.finished||"Finished"}),e.addEventListener("waiting",function(){n.classList.add("is-loading"),i.textContent=t.buffering||"Buffering…"}),e.addEventListener("canplay",function(){n.classList.remove("is-loading")}),e.addEventListener("error",function(){n.classList.remove("is-loading"),i.textContent=t.couldNotLoad||"Could not load this recording."})});
@@ -0,0 +1 @@
/* empty css */import"./fireworks-home.js-CmXgGYKn.js";import"./map.js-3a1Gpit5.js";import"../../../theme-C3M4iSOd.js";import"../../../manual-report-CpWI_VWJ.js";
@@ -0,0 +1 @@
/* empty css */import"../../../theme-C3M4iSOd.js";
@@ -0,0 +1 @@
/* empty css */import"../../../theme-C3M4iSOd.js";const s=window.BOOMCAST_I18N||{},r=document.querySelector(".upload-form"),n=document.querySelector("#drop-zone"),o=document.querySelector("#audio-file"),i=document.querySelector("#file-name"),a=document.querySelector("#upload-status"),d=e=>{i.textContent=e?e.name:s.noFile||"No file selected"};o.addEventListener("change",()=>d(o.files[0]));["dragenter","dragover"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.add("dragging")}));["dragleave","drop"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.remove("dragging")}));n.addEventListener("drop",e=>{const[t]=e.dataTransfer.files;t&&(o.files=e.dataTransfer.files,d(t))});r.addEventListener("htmx:beforeRequest",()=>{a.textContent=s.analysing||"Analysing your recording…",r.setAttribute("aria-busy","true")});r.addEventListener("htmx:afterRequest",()=>{a.textContent="",r.removeAttribute("aria-busy")});r.addEventListener("htmx:responseError",()=>{a.textContent=s.analysisFailed||"Analysis could not be completed."});document.body.addEventListener("htmx:beforeSwap",e=>{e.detail.xhr.status>=400&&(e.detail.shouldSwap=!0,e.detail.isError=!1)});window.addEventListener("pageshow",e=>{e.persisted&&(o.value="",d(),a.textContent="",document.querySelector("#classification-results").replaceChildren())});
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";import"../../../manual-report-CpWI_VWJ.js";
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";const r=document.querySelector(".upload-form"),n=document.querySelector("#drop-zone"),o=document.querySelector("#audio-file"),d=document.querySelector("#file-name"),a=document.querySelector("#upload-status"),s=e=>{d.textContent=e?e.name:"No file selected"};o.addEventListener("change",()=>s(o.files[0]));["dragenter","dragover"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.add("dragging")}));["dragleave","drop"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.remove("dragging")}));n.addEventListener("drop",e=>{const[t]=e.dataTransfer.files;t&&(o.files=e.dataTransfer.files,s(t))});r.addEventListener("htmx:beforeRequest",()=>{a.textContent="Analysing your recording…",r.setAttribute("aria-busy","true")});r.addEventListener("htmx:afterRequest",()=>{a.textContent="",r.removeAttribute("aria-busy")});r.addEventListener("htmx:responseError",()=>{a.textContent="Analysis could not be completed."});
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";
@@ -0,0 +1 @@
/* empty css */import"../../../theme-C3M4iSOd.js";const e=window.BOOMCAST_I18N||{},u=document.getElementById("event-map"),f=u.dataset.h3Resolution,t=L.map(u,{zoomControl:!1,scrollWheelZoom:!1}).setView([52.1326,5.2913],7);L.control.zoom({position:"bottomleft"}).addTo(t);const m=L.control({position:"topright"});m.onAdd=()=>{const o=L.DomUtil.create("div","map-compass");return o.setAttribute("role","img"),o.setAttribute("aria-label",e.mapCompass||"Map compass: north is up"),o.innerHTML='<span class="compass-n">N</span><span class="compass-e">E</span><span class="compass-s">S</span><span class="compass-w">W</span><span class="compass-needle">↑</span>',L.DomEvent.disableClickPropagation(o),o};m.addTo(t);L.tileLayer("https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",{maxZoom:18,attribution:"&copy; OpenStreetMap contributors"}).addTo(t);const y=JSON.parse(document.getElementById("h3-cells-data").textContent),M=JSON.parse(document.getElementById("map-events-data").textContent),d=L.latLngBounds([]);y.forEach(o=>{L.polygon(o.boundary,{color:"#f59e0b",weight:2,fillColor:"#f59e0b",fillOpacity:.25}).addTo(t).bindPopup('<span class="popup-title">H3 '+o.cell+'</span><span class="popup-meta">'+o.reports+" "+(o.reports===1?e.report||"report":e.reports||"reports")+" · "+o.occurrences+" "+(o.occurrences===1?e.occurrence||"occurrence":e.occurrences||"occurrences")+" · "+(e.resolution||"resolution")+" "+f+"</span>"),d.extend(L.latLngBounds(o.boundary))});function b(o){return["N","NE","E","SE","S","SW","W","NW"][Math.floor((o+22.5)%360/45)]}function v(o,n,s){const c=n*Math.PI/180,i=o[0]*Math.PI/180,h=o[1]*Math.PI/180,r=s/6378137,l=Math.asin(Math.sin(i)*Math.cos(r)+Math.cos(i)*Math.sin(r)*Math.cos(c)),g=h+Math.atan2(Math.sin(c)*Math.sin(r)*Math.cos(i),Math.cos(r)-Math.sin(i)*Math.sin(l));return[l*180/Math.PI,g*180/Math.PI]}const E=L.divIcon({className:"",html:'<div class="report-icon">✦</div>',iconSize:[37,37],iconAnchor:[19,19]});M.forEach(o=>{const n=o.visually_confirmed?e.visuallyConfirmed||"Visually confirmed":e.notVisuallyConfirmed||"Not visually confirmed";let s=o.occurrences+" "+(o.occurrences===1?e.occurrence||"occurrence":e.occurrences||"occurrences")+" · "+n+"<br>"+(e.reported||"Reported")+" "+o.reported_on;if(o.direction_degrees!==null&&(s+="<br>"+(e.compassDirection||"Compass direction")+" "+Math.round(o.direction_degrees)+"° ("+b(o.direction_degrees)+")",o.direction_accuracy_degrees!==null&&(s+=" (±"+Math.round(o.direction_accuracy_degrees)+"°)")),L.marker(o.center,{icon:E}).addTo(t).bindPopup('<span class="popup-title">'+(e.manualReport||"Manual report")+" · H3 "+o.cell+'</span><span class="popup-meta">'+s+"</span>"),o.direction_degrees!==null){const a=v(o.center,o.direction_degrees,900);L.polyline([o.center,a],{color:"#fff7e6",weight:9,opacity:.8}).addTo(t),L.polyline([o.center,a],{color:"#6d45a0",weight:5,opacity:1}).addTo(t);const c=L.divIcon({className:"",html:'<div class="direction-marker"><span style="transform:rotate('+o.direction_degrees+'deg)">↑</span></div>',iconSize:[56,56],iconAnchor:[28,28]});L.marker(a,{icon:c,interactive:!1}).addTo(t)}});d.isValid()&&t.fitBounds(d.pad(.18));const p=document.getElementById("range");p&&document.querySelectorAll("#from-date, #to-date").forEach(o=>{o.addEventListener("change",()=>{p.value="custom"})});
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";
@@ -0,0 +1 @@
import"../../../theme-C3M4iSOd.js";document.querySelector("#ntfy-url").addEventListener("input",()=>{document.querySelector("#ntfy-test-result").replaceChildren()});