diff --git a/src/panels/config/area_registry/ha-config-area-registry.ts b/src/panels/config/area_registry/ha-config-area-registry.ts index dbca7d6ba9..76cb01757b 100644 --- a/src/panels/config/area_registry/ha-config-area-registry.ts +++ b/src/panels/config/area_registry/ha-config-area-registry.ts @@ -27,6 +27,8 @@ import { showAreaRegistryDetailDialog, loadAreaRegistryDetailDialog, } from "./show-dialog-area-registry-detail"; +import { classMap } from "lit-html/directives/class-map"; +import { computeRTL } from "../../../common/util/compute_rtl"; class HaConfigAreaRegistry extends LitElement { public hass?: HomeAssistant; @@ -48,20 +50,25 @@ class HaConfigAreaRegistry extends LitElement { `; } return html` - + ${this.hass.localize("ui.panel.config.area_registry.picker.header")} - Areas are used to organize where devices are. This information will - be used throughout Home Assistant to help you in organizing your - interface, permissions and integrations with other systems. + ${this.hass.localize( + "ui.panel.config.area_registry.picker.introduction" + )}

- To place devices in an area, navigate to - the integrations page and then - click on a configured integration to get to the device cards. + ${this.hass.localize( + "ui.panel.config.area_registry.picker.introduction2" + )}

+
${this._items.map((entry) => { @@ -94,8 +101,13 @@ class HaConfigAreaRegistry extends LitElement { `; } @@ -188,6 +200,17 @@ All devices in this area will become unassigned.`) bottom: 24px; right: 24px; } + + paper-fab.rtl { + right: auto; + left: 16px; + } + + paper-fab[is-wide].rtl { + bottom: 24px; + right: auto; + left: 24px; + } `; } } diff --git a/src/panels/config/automation/ha-automation-editor.ts b/src/panels/config/automation/ha-automation-editor.ts index b2ad95173d..06003edcb2 100644 --- a/src/panels/config/automation/ha-automation-editor.ts +++ b/src/panels/config/automation/ha-automation-editor.ts @@ -110,6 +110,9 @@ class HaAutomationEditor extends LitElement { "ui.panel.config.automation.editor.save" )}" @click=${this._saveAutomation} + class="${classMap({ + rtl: computeRTL(this.hass), + })}" > `; @@ -280,6 +283,17 @@ class HaAutomationEditor extends LitElement { paper-fab[dirty] { margin-bottom: 0; } + + paper-fab.rtl { + right: auto; + left: 16px; + } + + paper-fab[is-wide].rtl { + bottom: 24px; + right: auto; + left: 24px; + } `, ]; } diff --git a/src/panels/config/automation/ha-automation-picker.js b/src/panels/config/automation/ha-automation-picker.js index 0c32beecbe..348e7d4fef 100644 --- a/src/panels/config/automation/ha-automation-picker.js +++ b/src/panels/config/automation/ha-automation-picker.js @@ -8,7 +8,6 @@ import "@polymer/paper-item/paper-item"; import { html } from "@polymer/polymer/lib/utils/html-tag"; import { PolymerElement } from "@polymer/polymer/polymer-element"; -import "../../../components/ha-markdown"; import "../../../components/ha-paper-icon-button-arrow-prev"; import "../../../layouts/ha-app-layout"; @@ -19,6 +18,7 @@ import "../../../components/ha-icon-next"; import NavigateMixin from "../../../mixins/navigate-mixin"; import LocalizeMixin from "../../../mixins/localize-mixin"; import computeStateName from "../../../common/entity/compute_state_name"; +import { computeRTL } from "../../../common/util/compute_rtl"; /* * @appliesMixin LocalizeMixin @@ -48,12 +48,19 @@ class HaAutomationPicker extends LocalizeMixin(NavigateMixin(PolymerElement)) { right: 24px; } - a { - color: var(--primary-color); + paper-fab[rtl] { + right: auto; + left: 16px; } - ha-markdown p { - margin: 0px; + paper-fab[rtl][is-wide] { + bottom: 24px; + right: auto; + left: 24px; + } + + a { + color: var(--primary-color); } @@ -73,9 +80,10 @@ class HaAutomationPicker extends LocalizeMixin(NavigateMixin(PolymerElement)) { [[localize('ui.panel.config.automation.picker.header')]]
- + [[localize('ui.panel.config.automation.picker.introduction')]] +
`; @@ -133,6 +142,12 @@ class HaAutomationPicker extends LocalizeMixin(NavigateMixin(PolymerElement)) { isWide: { type: Boolean, }, + + rtl: { + type: Boolean, + reflectToAttribute: true, + computed: "_computeRTL(hass)", + }, }; } @@ -160,6 +175,10 @@ class HaAutomationPicker extends LocalizeMixin(NavigateMixin(PolymerElement)) { _backTapped() { history.back(); } + + _computeRTL(hass) { + return computeRTL(hass); + } } customElements.define("ha-automation-picker", HaAutomationPicker); diff --git a/src/panels/config/entity_registry/ha-config-entity-registry.ts b/src/panels/config/entity_registry/ha-config-entity-registry.ts index fb32443e3f..016f03e995 100644 --- a/src/panels/config/entity_registry/ha-config-entity-registry.ts +++ b/src/panels/config/entity_registry/ha-config-entity-registry.ts @@ -51,7 +51,11 @@ class HaConfigEntityRegistry extends LitElement { `; } return html` - + ${this.hass.localize( @@ -59,14 +63,16 @@ class HaConfigEntityRegistry extends LitElement { )} - Home Assistant keeps a registry of every entity it has ever seen - that can be uniquely identified. Each of these entities will have an - entity ID assigned which will be reserved for just this entity. + ${this.hass.localize( + "ui.panel.config.entity_registry.picker.introduction" + )}

- Use the entity registry to override the name, change the entity ID - or remove the entry from Home Assistant. Note, removing the entity - registry entry won't remove the entity. To do that, remove it from - the integrations page. + ${this.hass.localize( + "ui.panel.config.entity_registry.picker.introduction2" + )} +

diff --git a/src/panels/config/js/automation.js b/src/panels/config/js/automation.js index 4c16a8cf52..5c7304c8f6 100644 --- a/src/panels/config/js/automation.js +++ b/src/panels/config/js/automation.js @@ -3,7 +3,6 @@ import { h, Component } from "preact"; import "@polymer/paper-card/paper-card"; import "@polymer/paper-input/paper-input"; import "../ha-config-section"; -import "../../../components/ha-markdown"; import Trigger from "./trigger/index"; import Condition from "./condition/index"; @@ -68,11 +67,14 @@ export default class Automation extends Component { {localize("ui.panel.config.automation.editor.triggers.header")} - + {localize( "ui.panel.config.automation.editor.triggers.introduction" )} - /> +

+ + +
- + {localize( "ui.panel.config.automation.editor.conditions.introduction" )} - /> +

+ + +
- + {localize( "ui.panel.config.automation.editor.actions.introduction" )} - /> +

+ + +