4 Commits

Author SHA1 Message Date
vcoppe 2e8b2d6f30 add ukrainian 2026-07-21 11:20:31 +02:00
Dobrovolskyi Bohdan 5259d007c9 Fix Locale subscription (#369) 2026-07-21 12:04:42 +02:00
vcoppe cb36725a46 New Crowdin updates (#373)
* New translations en.json (German)

[ci skip]

* New translations view.mdx (German)

[ci skip]
2026-07-21 12:00:16 +02:00
vcoppe deef1bab47 fix embedding playground zoom 2026-07-21 11:11:13 +02:00
5 changed files with 16 additions and 5 deletions
@@ -21,6 +21,7 @@
import { selection } from '$lib/logic/selection'; import { selection } from '$lib/logic/selection';
import { untrack } from 'svelte'; import { untrack } from 'svelte';
import { isSelected, toggle } from '$lib/components/map/layer-control/utils'; import { isSelected, toggle } from '$lib/components/map/layer-control/utils';
import { boundsManager } from '$lib/logic/bounds';
let { let {
useHash = true, useHash = true,
@@ -90,6 +91,7 @@
fileStateCollection.setEmbeddedFiles(files); fileStateCollection.setEmbeddedFiles(files);
$fileOrder = ids; $fileOrder = ids;
selection.selectAll(); selection.selectAll();
boundsManager.fitBoundsOnLoad(ids);
}); });
} }
+2 -2
View File
@@ -50,5 +50,5 @@ Um die Ausrichtung und Neigung der Karte zu steuern, können Sie die Karte auch
### <Maximize2 size="16" class="inline-block" style="margin-bottom: 2px" /> Full screen ### <Maximize2 size="16" class="inline-block" style="margin-bottom: 2px" /> Full screen
Enter or exit full screen mode. Vollbildmodus ein- oder ausschalten.
You can also press <kbd>F11</kbd> to toggle, or <kbd>Escape</kbd> to exit. Du kannst auch <kbd>F11</kbd> drücken, um zu wechseln, oder <kbd>Escape</kbd> zum Beenden.
+8
View File
@@ -1,3 +1,5 @@
import { writable } from 'svelte/store';
type Dictionary = { type Dictionary = {
[key: string]: string | Dictionary; [key: string]: string | Dictionary;
}; };
@@ -10,6 +12,7 @@ function getDateFormatter(locale: string) {
} }
class Locale { class Locale {
private _store = writable(this);
private _lang = $state(''); private _lang = $state('');
private _isLoadingInitial = $state(true); private _isLoadingInitial = $state(true);
private _isLoading = $state(true); private _isLoading = $state(true);
@@ -38,6 +41,7 @@ class Locale {
} }
import(`../locales/${this._lang}.json`).then((module) => { import(`../locales/${this._lang}.json`).then((module) => {
this.dictionary = module.default; this.dictionary = module.default;
this._store.set(this);
if (this._isLoadingInitial) { if (this._isLoadingInitial) {
this._isLoadingInitial = false; this._isLoadingInitial = false;
} }
@@ -67,6 +71,10 @@ class Locale {
public get df() { public get df() {
return this._df; return this._df;
} }
public subscribe(run: (value: Locale) => void, invalidate?: (value?: Locale) => void) {
return this._store.subscribe(run, invalidate);
}
} }
export const i18n = new Locale(); export const i18n = new Locale();
+1
View File
@@ -10,5 +10,6 @@ export const languages: Record<string, string> = {
nl: 'Nederlands', nl: 'Nederlands',
'pt-BR': 'Português (Brasil)', 'pt-BR': 'Português (Brasil)',
tr: 'Türkçe', tr: 'Türkçe',
uk: 'Українська',
zh: '简体中文', zh: '简体中文',
}; };
+3 -3
View File
@@ -36,7 +36,7 @@
"switch_basemap": "Zur vorherigen Basemap wechseln", "switch_basemap": "Zur vorherigen Basemap wechseln",
"toggle_overlays": "Overlay umschalten", "toggle_overlays": "Overlay umschalten",
"toggle_3d": "3D umschalten", "toggle_3d": "3D umschalten",
"fullscreen": "Full screen", "fullscreen": "Vollbildmodus",
"settings": "Einstellungen", "settings": "Einstellungen",
"distance_units": "Entfernungseinheiten", "distance_units": "Entfernungseinheiten",
"metric": "Metrisch", "metric": "Metrisch",
@@ -235,7 +235,7 @@
}, },
"elevation": { "elevation": {
"button": "Höhendaten anfragen", "button": "Höhendaten anfragen",
"help": "Requesting elevation data will erase the existing elevation data, if any, and replace it with data from Mapterhorn.", "help": "Das Anfordern von Höhendaten löscht die vorhandenen Höhendaten, falls vorhanden, und ersetzt diese durch Daten von Mapterhorn.",
"help_no_selection": "Wählen Sie ein Datei-Element, um Höhendaten anzufordern." "help_no_selection": "Wählen Sie ein Datei-Element, um Höhendaten anzufordern."
}, },
"waypoint": { "waypoint": {
@@ -305,7 +305,7 @@
"united_kingdom": "Großbritannien", "united_kingdom": "Großbritannien",
"united_states": "USA", "united_states": "USA",
"libertyTopo": "Liberty Topo", "libertyTopo": "Liberty Topo",
"libertySatellite": "Liberty Satellite", "libertySatellite": "Liberty Satellit",
"osm": "OpenMapTiles OSM", "osm": "OpenMapTiles OSM",
"osmTopo": "OpenMapTiles OSM Topo", "osmTopo": "OpenMapTiles OSM Topo",
"esriSatellite": "Esri Satellite", "esriSatellite": "Esri Satellite",