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

View File

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

View File

@ -42,12 +42,12 @@ class OzwLog extends LocalizeMixin(EventsMixin(PolymerElement)) {
</span> </span>
<ha-card class="content"> <ha-card class="content">
<div class="device-picker"> <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> </paper-input>
</div> </div>
<div class="card-actions"> <div class="card-actions">
<mwc-button raised="true" on-click="_openLogWindow">Load</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}}">Tail</mwc-button> <mwc-button raised="true" on-click="_tailLog" disabled="{{_completeLog}}">[[localize('ui.panel.config.zwave.ozw_log.tail')]]</mwc-button>
</ha-card> </ha-card>
</ha-config-section> </ha-config-section>
`; `;

View File

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

View File

@ -1570,9 +1570,33 @@
"header": "Z-Wave Network Management", "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." "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": { "ozw_log": {
"header": "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_status": {
"network_stopped": "Z-Wave Network Stopped", "network_stopped": "Z-Wave Network Stopped",
@ -1605,7 +1629,15 @@
"add_node_secure": "Add Node Secure", "add_node_secure": "Add Node Secure",
"add_node": "Add Node", "add_node": "Add Node",
"remove_node": "Remove 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"
} }
} }
}, },