mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 10:29:37 +00:00
Add backend translation support for selector select (#15064)
* Base for selector translations * Allow translations for ha-selector-select * Fetch translation for config flow and onboarding * Get translation_key from step handler * Add domain property to DataEntry flow * Revert fetching translation for onboarding flow * Leave domain for repair flows * Use localizeValue function * Change type * Import selector translations in issue flow Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
@@ -57,6 +57,7 @@ class StepFlowForm extends LitElement {
|
||||
.computeLabel=${this._labelCallback}
|
||||
.computeHelper=${this._helperCallback}
|
||||
.computeError=${this._errorCallback}
|
||||
.localizeValue=${this._localizeValueCallback}
|
||||
></ha-form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
@@ -174,6 +175,13 @@ class StepFlowForm extends LitElement {
|
||||
private _errorCallback = (error: string) =>
|
||||
this.flowConfig.renderShowFormStepFieldError(this.hass, this.step, error);
|
||||
|
||||
private _localizeValueCallback = (key: string) =>
|
||||
this.flowConfig.renderShowFormStepFieldLocalizeValue(
|
||||
this.hass,
|
||||
this.step,
|
||||
key
|
||||
);
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
return [
|
||||
configFlowContentStyles,
|
||||
|
||||
Reference in New Issue
Block a user