refactored translations, preparing sending of document

This commit is contained in:
2025-07-17 13:03:49 +02:00
parent 7616aa9581
commit dc8de9707a
38 changed files with 430 additions and 390 deletions

View File

@@ -1,9 +1,9 @@
<script>
import {onMount} from 'svelte';
import {t} from '../../translations.svelte.js';
let { caption = t('document.select_state'), selected = $bindable(0), onchange = (val) => console.log('changed to '+val)} = $props();
let { caption = t('select_state'), selected = $bindable(0), onchange = (val) => console.log('changed to '+val)} = $props();
let message = $state(t('document.loading'));
let message = $state(t('loading'));
let states = $state(null);
async function loadStates(){
@@ -22,7 +22,7 @@
{#if states}
<select bind:value={selected} onchange={() => onchange(selected)}>
{#each Object.entries(states) as [k,s]}
<option value={+k}>{t('document.state_'+s.toLowerCase())}</option>
<option value={+k}>{t('state_'+s.toLowerCase())}</option>
{/each}
</select>
{:else}