Enable translations in filter view

This commit is contained in:
Pieter Vander Vennet 2024-04-01 22:17:57 +02:00
parent cb8efe0e81
commit f04b592c5e
2 changed files with 4 additions and 3 deletions

View file

@ -66,7 +66,7 @@
/>
</If>
{filteredLayer.layerDef.name}
<Tr t={filteredLayer.layerDef.name}/>
{#if $zoomlevel < layer.minzoom}
<span class="alert">
@ -82,7 +82,7 @@
<!-- There are three (and a half) modes of filters: a single checkbox, a radio button/dropdown or with searchable fields -->
{#if filter.options.length === 1 && filter.options[0].fields.length === 0}
<Checkbox selected={getBooleanStateFor(filter)}>
{filter.options[0].question}
<Tr t={filter.options[0].question}/>
</Checkbox>
{/if}
@ -94,7 +94,7 @@
<Dropdown value={getStateFor(filter)}>
{#each filter.options as option, i}
<option value={i}>
{option.question}
<Tr t={option.question}/>
</option>
{/each}
</Dropdown>

View file

@ -6,6 +6,7 @@
import { UIEventSource } from "../../Logic/UIEventSource"
import { onDestroy } from "svelte"
import { Utils } from "../../Utils"
import Tr from "../Base/Tr.svelte"
export let filteredLayer: FilteredLayer
export let option: FilterConfigOption