Add missing translations on Z-Wave management page (#5932)

This commit is contained in:
Maciej Bieniek 2020-05-29 15:08:23 +02:00 committed by GitHub
parent d0a53d1760
commit d94df728e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 83 additions and 34 deletions

View File

@ -106,7 +106,9 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
<!-- Node card -->
<ha-config-section is-wide="[[isWide]]">
<div class="sectionHeader" slot="header">
<span>Z-Wave Node Management</span>
<span
>[[localize('ui.panel.config.zwave.node_management.header')]]</span
>
<ha-icon-button
class="toggle-help-icon"
on-click="toggleHelp"
@ -114,13 +116,16 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
></ha-icon-button>
</div>
<span slot="introduction">
Run Z-Wave commands that affect a single node. Pick a node to see a
list of available commands.
[[localize('ui.panel.config.zwave.node_management.introduction')]]
</span>
<ha-card class="content">
<div class="device-picker">
<paper-dropdown-menu dynamic-align="" label="Nodes" class="flex">
<paper-dropdown-menu
dynamic-align=""
label="[[localize('ui.panel.config.zwave.node_management.nodes')]]"
class="flex"
>
<paper-listbox
slot="dropdown-content"
selected="{{selectedNode}}"
@ -134,7 +139,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
<template is="dom-if" if="[[!computeIsNodeSelected(selectedNode)]]">
<template is="dom-if" if="[[showHelp]]">
<div style="color: grey; padding: 12px">
Select node to view per-node options
[[localize('ui.panel.config.zwave.node_management.introduction')]]
</div>
</template>
</template>
@ -147,7 +152,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="refresh_node"
service-data="[[computeNodeServiceData(selectedNode)]]"
>
Refresh Node
[[localize('ui.panel.config.zwave.services.refresh_node')]]
</ha-call-service-button>
<ha-service-description
hass="[[hass]]"
@ -164,7 +169,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="remove_failed_node"
service-data="[[computeNodeServiceData(selectedNode)]]"
>
Remove Failed Node
[[localize('ui.panel.config.zwave.services.remove_failed_node')]]
</ha-call-service-button>
<ha-service-description
hass="[[hass]]"
@ -180,7 +185,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="replace_failed_node"
service-data="[[computeNodeServiceData(selectedNode)]]"
>
Replace Failed Node
[[localize('ui.panel.config.zwave.services.replace_failed_node')]]
</ha-call-service-button>
<ha-service-description
hass="[[hass]]"
@ -197,7 +202,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="print_node"
service-data="[[computeNodeServiceData(selectedNode)]]"
>
Print Node
[[localize('ui.panel.config.zwave.services.print_node')]]
</ha-call-service-button>
<ha-service-description
hass="[[hass]]"
@ -213,7 +218,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="heal_node"
service-data="[[computeHealNodeServiceData(selectedNode)]]"
>
Heal Node
[[localize('ui.panel.config.zwave.services.heal_node')]]
</ha-call-service-button>
<ha-service-description
hass="[[hass]]"
@ -229,7 +234,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="test_node"
service-data="[[computeNodeServiceData(selectedNode)]]"
>
Test Node
[[localize('ui.panel.config.zwave.services.test_node')]]
</ha-call-service-button>
<ha-service-description
hass="[[hass]]"
@ -239,13 +244,13 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
>
</ha-service-description>
<mwc-button on-click="_nodeMoreInfo"
>Node Information</mwc-button
>[[localize('ui.panel.config.zwave.services.node_info')]]</mwc-button
>
</div>
<div class="device-picker">
<paper-dropdown-menu
label="Entities of this node"
label="[[localize('ui.panel.config.zwave.node_management.entities')]]"
dynamic-align=""
class="flex"
>
@ -270,7 +275,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="refresh_entity"
service-data="[[computeRefreshEntityServiceData(selectedEntity)]]"
>
Refresh Entity
[[localize('ui.panel.config.zwave.services.refresh_entity')]]
</ha-call-service-button>
<ha-service-description
hass="[[hass]]"
@ -280,7 +285,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
>
</ha-service-description>
<mwc-button on-click="_entityMoreInfo"
>Entity Information</mwc-button
>[[localize('ui.panel.config.zwave.node_management.entity_info')]]</mwc-button
>
</div>
<div class="form-group">
@ -288,11 +293,11 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
checked="{{entityIgnored}}"
class="form-control"
>
Exclude this entity from Home Assistant
[[localize('ui.panel.config.zwave.node_management.exclude_entity')]]
</paper-checkbox>
<paper-input
disabled="{{entityIgnored}}"
label="Polling intensity"
label="[[localize('ui.panel.config.zwave.node_management.pooling_intensity')]]"
type="number"
min="0"
value="{{entityPollingIntensity}}"
@ -306,7 +311,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
service="set_poll_intensity"
service-data="[[computePollIntensityServiceData(entityPollingIntensity)]]"
>
Save
[[localize('ui.common.save')]]
</ha-call-service-button>
</div>
</template>

View File

@ -36,10 +36,17 @@ class ZwaveGroups extends PolymerElement {
padding-bottom: 12px;
}
</style>
<ha-card class="content" header="Node group associations">
<ha-card
class="content"
header="[[localize('ui.panel.config.zwave.node_management.node_group_associations')]]"
>
<!-- TODO make api for getting groups and members -->
<div class="device-picker">
<paper-dropdown-menu label="Group" dynamic-align="" class="flex">
<paper-dropdown-menu
label="[[localize('ui.panel.config.zwave.node_management.group')]]"
dynamic-align=""
class="flex"
>
<paper-listbox
slot="dropdown-content"
selected="{{_selectedGroup}}"
@ -53,7 +60,7 @@ class ZwaveGroups extends PolymerElement {
<template is="dom-if" if="[[_computeIsGroupSelected(_selectedGroup)]]">
<div class="device-picker">
<paper-dropdown-menu
label="Node to control"
label="[[localize('ui.panel.config.zwave.node_management.node_to_control')]]"
dynamic-align=""
class="flex"
>
@ -69,13 +76,18 @@ class ZwaveGroups extends PolymerElement {
</div>
<div class="help-text">
<span>Other Nodes in this group:</span>
<span
>[[localize('ui.panel.config.zwave.node_management.nodes_in_group')]]</span
>
<template is="dom-repeat" items="[[_otherGroupNodes]]" as="state">
<div>[[state]]</div>
</template>
</div>
<div class="help-text">
<span>Max Associations:</span> <span>[[_maxAssociations]]</span>
<span
>[[localize('ui.panel.config.zwave.node_management.max_associations')]]</span
>
<span>[[_maxAssociations]]</span>
</div>
</template>
@ -91,7 +103,7 @@ class ZwaveGroups extends PolymerElement {
service="change_association"
service-data="[[_addAssocServiceData]]"
>
Add To Group
[[localize('ui.panel.config.zwave.node_management.add_to_group')]]
</ha-call-service-button>
</template>
<template
@ -104,7 +116,7 @@ class ZwaveGroups extends PolymerElement {
service="change_association"
service-data="[[_removeAssocServiceData]]"
>
Remove From Group
[[localize('ui.panel.config.zwave.node_management.remove_from_group')]]
</ha-call-service-button>
</template>
<template is="dom-if" if="[[_isBroadcastNodeInGroup]]">
@ -114,7 +126,7 @@ class ZwaveGroups extends PolymerElement {
service="change_association"
service-data="[[_removeBroadcastNodeServiceData]]"
>
Remove Broadcast
[[localize('ui.panel.config.zwave.node_management.remove_broadcast')]]
</ha-call-service-button>
</template>
</div>

View File

@ -42,12 +42,12 @@ class OzwLog extends LocalizeMixin(EventsMixin(PolymerElement)) {
</span>
<ha-card class="content">
<div class="device-picker">
<paper-input label="Number of last log lines." type="number" min="0" max="1000" step="10" value="{{numLogLines}}">
<paper-input label="[[localize('ui.panel.config.zwave.ozw_log.last_log_lines')]]" type="number" min="0" max="1000" step="10" value="{{numLogLines}}">
</paper-input>
</div>
<div class="card-actions">
<mwc-button raised="true" on-click="_openLogWindow">Load</mwc-button>
<mwc-button raised="true" on-click="_tailLog" disabled="{{_completeLog}}">Tail</mwc-button>
<mwc-button raised="true" on-click="_openLogWindow">[[localize('ui.panel.config.zwave.ozw_log.load')]]</mwc-button>
<mwc-button raised="true" on-click="_tailLog" disabled="{{_completeLog}}">[[localize('ui.panel.config.zwave.ozw_log.tail')]]</mwc-button>
</ha-card>
</ha-config-section>
`;

View File

@ -33,9 +33,9 @@ class ZwaveNodeProtection extends PolymerElement {
</style>
<div class="content">
<ha-card header="Node protection">
<ha-card header="[[localize('ui.panel.config.zwave.node_management.node_protection')]]">
<div class="device-picker">
<paper-dropdown-menu label="Protection" dynamic-align class="flex" placeholder="{{_loadedProtectionValue}}">
<paper-dropdown-menu label="[[localize('ui.panel.config.zwave.node_management.protection')]]" dynamic-align class="flex" placeholder="{{_loadedProtectionValue}}">
<paper-listbox slot="dropdown-content" selected="{{_selectedProtectionParameter}}">
<template is="dom-repeat" items="[[_protectionOptions]]" as="state">
<paper-item>[[state]]</paper-item>
@ -48,7 +48,7 @@ class ZwaveNodeProtection extends PolymerElement {
hass="[[hass]]"
path="[[_nodePath]]"
data="[[_protectionData]]">
Set Protection
[[localize('ui.panel.config.zwave.node_management.set_protection')]]
</ha-call-service-button>
</div>
</ha-card>

View File

@ -1570,9 +1570,33 @@
"header": "Z-Wave Network Management",
"introduction": "Run commands that affect the Z-Wave network. You won't get feedback on whether most commands succeeded, but you can check the OZW Log to try to find out."
},
"node_management": {
"header": "Z-Wave Node Management",
"introduction": "Run Z-Wave commands that affect a single node. Pick a node to see a list of available commands.",
"nodes": "Nodes",
"nodes_hint": "Select node to view per-node options",
"entities": "Entities of this node",
"entity_info": "Entity Information",
"exclude_entity": "Exclude this entity from Home Assistant",
"pooling_intensity": "Polling intensity",
"node_protection": "Node protection",
"protection": "Protection",
"set_protection": "Set Protection",
"node_group_associations": "Node group associations",
"group": "Group",
"node_to_control": "Node to control",
"nodes_in_group": "Other Nodes in this group:",
"max_associations": "Max Associations:",
"add_to_group": "Add To Group",
"remove_from_group": "Remove From Group",
"remove_broadcast": "Remove Broadcast"
},
"ozw_log": {
"header": "OZW Log",
"introduction": "View the log. 0 is the minimum (loads entire log) and 1000 is the maximum. Load will show a static log and tail will auto update with the last specified number of lines of the log."
"introduction": "View the log. 0 is the minimum (loads entire log) and 1000 is the maximum. Load will show a static log and tail will auto update with the last specified number of lines of the log.",
"last_log_lines": "Number of last log lines",
"load": "Load",
"tail": "Tail"
},
"network_status": {
"network_stopped": "Z-Wave Network Stopped",
@ -1605,7 +1629,15 @@
"add_node_secure": "Add Node Secure",
"add_node": "Add Node",
"remove_node": "Remove Node",
"cancel_command": "Cancel Command"
"cancel_command": "Cancel Command",
"refresh_node": "Refresh Node",
"remove_failed_node": "Remove Failed Node",
"replace_failed_node": "Replace Failed Node",
"print_node": "Print Node",
"heal_node": "Heal Node",
"test_node": "Test Node",
"node_info": "Node Information",
"refresh_entity": "Refresh Entity"
}
}
},