mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-04 13:48:57 +00:00
feat: add complete German localization
Add Deutsch across all card surfaces and backend flows, backed by the language registry introduced in #62. German loads as a fingerprint-checked page-shared locale chunk so EN/RU remain synchronous and the initial View budget stays intact. Root render gates prevent mixed-language flashes, retry once, and fail open to English. Extend parity, runtime, bundle, browser and visual coverage, plus contributor and user documentation. Issue: #348 User-Visible: yes
This commit is contained in:
+8
-2
@@ -1,7 +1,8 @@
|
||||
/** Card configuration editor (Lovelace GUI). */
|
||||
import { LitElement, html, nothing } from 'lit';
|
||||
import { LitElement, html, nothing, noChange } from 'lit';
|
||||
import { langOf, t, type Lang } from './i18n';
|
||||
import { languageOptions } from './i18n/registry';
|
||||
import { LANGUAGE_RUNTIME, languageOptions } from './i18n/registry';
|
||||
import { languageLoadingTemplate, languageRenderGate } from './i18n/language-runtime';
|
||||
import { invalidDefaultFloor } from './card-editor-validation';
|
||||
|
||||
class HouseplanCardEditor extends LitElement {
|
||||
@@ -113,6 +114,11 @@ class HouseplanCardEditor extends LitElement {
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this._config) return nothing;
|
||||
const localeGate = languageRenderGate(
|
||||
this, LANGUAGE_RUNTIME, langOf(this.hass, this._config.language),
|
||||
);
|
||||
if (localeGate === 'cold') return languageLoadingTemplate();
|
||||
if (localeGate === 'warm') return noChange;
|
||||
this._loadSpaces();
|
||||
const L = this._lang;
|
||||
const labels: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user