forked from btclock/webui
Add German translation, add own price source selection
This commit is contained in:
parent
dcdf98964a
commit
e47fc066b0
9 changed files with 167 additions and 8 deletions
|
@ -6,6 +6,7 @@ const defaultLocale = 'en';
|
||||||
register('en', () => import('../locales/en.json'));
|
register('en', () => import('../locales/en.json'));
|
||||||
register('nl', () => import('../locales/nl.json'));
|
register('nl', () => import('../locales/nl.json'));
|
||||||
register('es', () => import('../locales/es.json'));
|
register('es', () => import('../locales/es.json'));
|
||||||
|
register('de', () => import('../locales/de.json'));
|
||||||
|
|
||||||
init({
|
init({
|
||||||
fallbackLocale: defaultLocale,
|
fallbackLocale: defaultLocale,
|
||||||
|
|
88
src/lib/locales/de.json
Normal file
88
src/lib/locales/de.json
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
{
|
||||||
|
"section": {
|
||||||
|
"settings": {
|
||||||
|
"title": "Einstellungen",
|
||||||
|
"textColor": "Textfarbe",
|
||||||
|
"backgroundColor": "Hintergrundfarbe",
|
||||||
|
"ledPowerOnTest": "LED-Einschalttest",
|
||||||
|
"ledFlashOnBlock": "LED blinkt bei neuem Block",
|
||||||
|
"timePerScreen": "Zeit pro Bildschirm",
|
||||||
|
"ledBrightness": "LED-Helligkeit",
|
||||||
|
"flMaxBrightness": "Displaybeleuchtung Helligkeit",
|
||||||
|
"timezoneOffset": "Zeitzonenoffset",
|
||||||
|
"timeBetweenPriceUpdates": "Zeit zwischen Preisaktualisierungen",
|
||||||
|
"fullRefreshEvery": "Vollständige Aktualisierung alle",
|
||||||
|
"mempoolnstance": "Mempool Instance",
|
||||||
|
"hostnamePrefix": "Hostnamen-Präfix",
|
||||||
|
"StealFocusOnNewBlock": "Steal focus on new block",
|
||||||
|
"useBigCharsMcap": "Verwende große Zeichen für die Marktkapitalisierung",
|
||||||
|
"useBlkCountdown": "Blocks Countdown zur Halbierung",
|
||||||
|
"useSatsSymbol": "Sats-Symbol verwenden",
|
||||||
|
"suffixPrice": "Suffix-Preisformat",
|
||||||
|
"disableLeds": "Alle LED-Effekte deaktivieren",
|
||||||
|
"otaUpdates": "OTA updates",
|
||||||
|
"enableMdns": "mDNS",
|
||||||
|
"fetchEuroPrice": "€-Preis abrufen",
|
||||||
|
"shortAmountsWarning": "Geringe Beträge können die Lebensdauer der Displays verkürzen",
|
||||||
|
"tzOffsetHelpText": "Ein Neustart ist erforderlich, um den TZ-Offset anzuwenden.",
|
||||||
|
"screens": "Bildschirme",
|
||||||
|
"wifiTxPowerText": "In den meisten Fällen muss dies nicht eingestellt werden.",
|
||||||
|
"wifiTxPower": "WiFi-TX-Leistung",
|
||||||
|
"settingsSaved": "Einstellungen gespeichert",
|
||||||
|
"errorSavingSettings": "Fehler beim Speichern der Einstellungen",
|
||||||
|
"ownPriceSource": "BTClock-Preisquelle verwenden",
|
||||||
|
"flAlwaysOn": "Displaybeleuchtung immer an"
|
||||||
|
},
|
||||||
|
"control": {
|
||||||
|
"systemInfo": "Systeminfo",
|
||||||
|
"version": "Version",
|
||||||
|
"buildTime": "Build time",
|
||||||
|
"ledColor": "LED-Farbe",
|
||||||
|
"turnOff": "Ausschalten",
|
||||||
|
"setColor": "Farbe festlegen",
|
||||||
|
"showText": "Text anzeigen",
|
||||||
|
"text": "Text",
|
||||||
|
"title": "Kontrolle",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"frontlight": "Displaybeleuchtung",
|
||||||
|
"turnOn": "Einschalten"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"title": "Status",
|
||||||
|
"screenCycle": "Bildschirmzyklus",
|
||||||
|
"memoryFree": "Speicher frei",
|
||||||
|
"wsPriceConnection": "WS-Preisverbindung",
|
||||||
|
"wsMempoolConnection": "WS Mempool.space-Verbindung",
|
||||||
|
"fetchEuroNote": "If you use \"Fetch € price\" the WS Price connection will show ❌ since it uses another data source.",
|
||||||
|
"uptime": "Betriebszeit",
|
||||||
|
"wifiSignalStrength": "WiFi-Signalstärke"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"black": "Schwarz",
|
||||||
|
"white": "Weiss"
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"minutes": "Minuten",
|
||||||
|
"seconds": "Sekunden"
|
||||||
|
},
|
||||||
|
"restartRequired": "Neustart erforderlich",
|
||||||
|
"button": {
|
||||||
|
"save": "Speichern",
|
||||||
|
"reset": "Zurücksetzen",
|
||||||
|
"restart": "Neustart",
|
||||||
|
"forceFullRefresh": "Vollständige Aktualisierung erzwingen"
|
||||||
|
},
|
||||||
|
"timer": {
|
||||||
|
"running": "läuft",
|
||||||
|
"stopped": "gestoppt"
|
||||||
|
},
|
||||||
|
"sections": {
|
||||||
|
"control": {
|
||||||
|
"keepSameColor": "Gleiche Farbe beibehalten"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rssiBar": {
|
||||||
|
"tooltip": "Werte > -67 dBm gelten als gut. > -30 dBm ist erstaunlich"
|
||||||
|
}
|
||||||
|
}
|
|
@ -28,7 +28,10 @@
|
||||||
"wifiTxPowerText": "In most cases this does not need to be set.",
|
"wifiTxPowerText": "In most cases this does not need to be set.",
|
||||||
"wifiTxPower": "WiFi TX power",
|
"wifiTxPower": "WiFi TX power",
|
||||||
"settingsSaved": "Settings saved",
|
"settingsSaved": "Settings saved",
|
||||||
"errorSavingSettings": "Error saving settings"
|
"errorSavingSettings": "Error saving settings",
|
||||||
|
"ownPriceSource": "Use BTClock price source",
|
||||||
|
"flMaxBrightness": "Frontlight brightness",
|
||||||
|
"flAlwaysOn": "Frontlight always on"
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "System info",
|
"systemInfo": "System info",
|
||||||
|
@ -40,7 +43,9 @@
|
||||||
"showText": "Show text",
|
"showText": "Show text",
|
||||||
"text": "Text",
|
"text": "Text",
|
||||||
"title": "Control",
|
"title": "Control",
|
||||||
"hostname": "Hostname"
|
"hostname": "Hostname",
|
||||||
|
"frontlight": "Frontlight",
|
||||||
|
"turnOn": "Turn on"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"title": "Status",
|
"title": "Status",
|
||||||
|
|
|
@ -27,7 +27,10 @@
|
||||||
"otaUpdates": "Actualización por aire",
|
"otaUpdates": "Actualización por aire",
|
||||||
"wifiTxPowerText": "En la mayoría de los casos no es necesario configurar esto.",
|
"wifiTxPowerText": "En la mayoría de los casos no es necesario configurar esto.",
|
||||||
"settingsSaved": "Configuración guardada",
|
"settingsSaved": "Configuración guardada",
|
||||||
"errorSavingSettings": "Error al guardar la configuración"
|
"errorSavingSettings": "Error al guardar la configuración",
|
||||||
|
"ownPriceSource": "Usar fuente de precios BTClock",
|
||||||
|
"flMaxBrightness": "Brillo de luz de la pantalla",
|
||||||
|
"flAlwaysOn": "Luz de la pantalla siempre encendida"
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"turnOff": "Apagar",
|
"turnOff": "Apagar",
|
||||||
|
@ -39,7 +42,9 @@
|
||||||
"text": "Texto",
|
"text": "Texto",
|
||||||
"title": "Control",
|
"title": "Control",
|
||||||
"buildTime": "Tiempo de compilación",
|
"buildTime": "Tiempo de compilación",
|
||||||
"hostname": "Nombre del host"
|
"hostname": "Nombre del host",
|
||||||
|
"turnOn": "Encender",
|
||||||
|
"frontlight": "Luz de la pantalla"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"memoryFree": "Memoria RAM libre",
|
"memoryFree": "Memoria RAM libre",
|
||||||
|
|
|
@ -28,7 +28,10 @@
|
||||||
"wifiTxPower": "WiFi TX power",
|
"wifiTxPower": "WiFi TX power",
|
||||||
"wifiTxPowerText": "Meestal hoeft dit niet aangepast te worden.",
|
"wifiTxPowerText": "Meestal hoeft dit niet aangepast te worden.",
|
||||||
"settingsSaved": "Instellingen opgeslagen",
|
"settingsSaved": "Instellingen opgeslagen",
|
||||||
"errorSavingSettings": "Fout bij opslaan instellingen"
|
"errorSavingSettings": "Fout bij opslaan instellingen",
|
||||||
|
"ownPriceSource": "Gebruik BTClock prijs bron",
|
||||||
|
"flMaxBrightness": "Displaylicht helderheid",
|
||||||
|
"flAlwaysOn": "Displaylicht altijd aan"
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "Systeeminformatie",
|
"systemInfo": "Systeeminformatie",
|
||||||
|
@ -39,7 +42,9 @@
|
||||||
"ledColor": "LED kleur",
|
"ledColor": "LED kleur",
|
||||||
"showText": "Toon tekst",
|
"showText": "Toon tekst",
|
||||||
"text": "Tekst",
|
"text": "Tekst",
|
||||||
"title": "Besturing"
|
"title": "Besturing",
|
||||||
|
"frontlight": "Displaylicht",
|
||||||
|
"turnOn": "Aanzetten"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"title": "Status",
|
"title": "Status",
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
const flagMap: { [key: string]: string } = {
|
const flagMap: { [key: string]: string } = {
|
||||||
en: '🇬🇧', // English flag emoji
|
en: '🇬🇧', // English flag emoji
|
||||||
nl: '🇳🇱', // Dutch flag emoji
|
nl: '🇳🇱', // Dutch flag emoji
|
||||||
es: '🇪🇸' // Spanish flag emoji
|
es: '🇪🇸', // Spanish flag emoji
|
||||||
|
de: '🇩🇪' // German flag emoji
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert the language code to lowercase for case-insensitive matching
|
// Convert the language code to lowercase for case-insensitive matching
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>₿TClock</title>
|
<title>BTClock</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<Container fluid>
|
<Container fluid>
|
||||||
|
|
|
@ -55,6 +55,14 @@
|
||||||
fetch(`${PUBLIC_BASE_URL}/api/lights/off`).catch(() => {});
|
fetch(`${PUBLIC_BASE_URL}/api/lights/off`).catch(() => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const turnOnFrontlight = () => {
|
||||||
|
fetch(`${PUBLIC_BASE_URL}/api/frontlight/on`).catch(() => {});
|
||||||
|
};
|
||||||
|
|
||||||
|
const turnOffFrontlight = () => {
|
||||||
|
fetch(`${PUBLIC_BASE_URL}/api/frontlight/off`).catch(() => {});
|
||||||
|
};
|
||||||
|
|
||||||
const restartClock = () => {
|
const restartClock = () => {
|
||||||
fetch(`${PUBLIC_BASE_URL}/api/restart`).catch(() => {});
|
fetch(`${PUBLIC_BASE_URL}/api/restart`).catch(() => {});
|
||||||
};
|
};
|
||||||
|
@ -146,6 +154,14 @@
|
||||||
</Form>
|
</Form>
|
||||||
<hr />
|
<hr />
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if $settings.hasFrontlight}
|
||||||
|
<h3>{$_('section.control.frontlight')}</h3>
|
||||||
|
<Button color="secondary" id="turnOffFrontlightBtn" on:click={turnOffFrontlight}
|
||||||
|
>{$_('section.control.turnOff')}</Button
|
||||||
|
>
|
||||||
|
<Button color="primary" on:click={turnOnFrontlight}>{$_('section.control.turnOn')}</Button>
|
||||||
|
<hr />
|
||||||
|
{/if}
|
||||||
<h3>{$_('section.control.systemInfo')}</h3>
|
<h3>{$_('section.control.systemInfo')}</h3>
|
||||||
<ul class="small system_info">
|
<ul class="small system_info">
|
||||||
<li>{$_('section.control.version')}: {$settings.gitRev}</li>
|
<li>{$_('section.control.version')}: {$settings.gitRev}</li>
|
||||||
|
|
|
@ -193,6 +193,24 @@
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
{#if $settings.hasFrontlight}
|
||||||
|
<Row>
|
||||||
|
<Label md={6} for="flMaxBrightness" size="sm"
|
||||||
|
>{$_('section.settings.flMaxBrightness')}</Label
|
||||||
|
>
|
||||||
|
<Col md="6">
|
||||||
|
<Input
|
||||||
|
type="range"
|
||||||
|
name="flMaxBrightness"
|
||||||
|
id="flMaxBrightness"
|
||||||
|
bind:value={$settings.flMaxBrightness}
|
||||||
|
min={0}
|
||||||
|
max={4095}
|
||||||
|
step={1}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
{/if}
|
||||||
<Row>
|
<Row>
|
||||||
<Label md={6} for="mempoolInstance" size="sm"
|
<Label md={6} for="mempoolInstance" size="sm"
|
||||||
>{$_('section.settings.mempoolnstance')}</Label
|
>{$_('section.settings.mempoolnstance')}</Label
|
||||||
|
@ -341,6 +359,26 @@
|
||||||
label={$_('section.settings.disableLeds')}
|
label={$_('section.settings.disableLeds')}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col md="6">
|
||||||
|
<Input
|
||||||
|
id="ownPriceSource"
|
||||||
|
bind:checked={$settings.ownPriceSource}
|
||||||
|
type="switch"
|
||||||
|
bsSize="sm"
|
||||||
|
label="{$_('section.settings.ownPriceSource')} ({$_('restartRequired')})"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
{#if $settings.hasFrontlight}
|
||||||
|
<Col md="6">
|
||||||
|
<Input
|
||||||
|
id="flAlwaysOn"
|
||||||
|
bind:checked={$settings.flAlwaysOn}
|
||||||
|
type="switch"
|
||||||
|
bsSize="sm"
|
||||||
|
label={$_('section.settings.flAlwaysOn')}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
{/if}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
|
|
Loading…
Reference in a new issue