mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-11 11:26:35 +00:00
Add translation for script and scene card (#1119)
* Add translation for script and scene card * appliesMixin * Change script button text to "execute"
This commit is contained in:
parent
a22b62cf2a
commit
86db23a957
@ -5,6 +5,7 @@
|
|||||||
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
|
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
|
||||||
|
|
||||||
<link rel="import" href="../components/entity/state-info.html">
|
<link rel="import" href="../components/entity/state-info.html">
|
||||||
|
<link rel='import' href='../util/hass-mixins.html'>
|
||||||
|
|
||||||
<dom-module id="state-card-scene">
|
<dom-module id="state-card-scene">
|
||||||
<template>
|
<template>
|
||||||
@ -21,13 +22,16 @@
|
|||||||
|
|
||||||
<div class='horizontal justified layout'>
|
<div class='horizontal justified layout'>
|
||||||
<state-info state-obj="[[stateObj]]" in-dialog='[[inDialog]]'></state-info>
|
<state-info state-obj="[[stateObj]]" in-dialog='[[inDialog]]'></state-info>
|
||||||
<paper-button on-click='activateScene'>ACTIVATE</paper-button>
|
<paper-button on-click='activateScene'>[[localize('ui.card.scene.activate')]]</paper-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class StateCardScene extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class StateCardScene extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'state-card-scene'; }
|
static get is() { return 'state-card-scene'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<link rel="import" href="../components/entity/state-info.html">
|
<link rel="import" href="../components/entity/state-info.html">
|
||||||
<link rel="import" href="../components/entity/ha-entity-toggle.html">
|
<link rel="import" href="../components/entity/ha-entity-toggle.html">
|
||||||
|
<link rel='import' href='../util/hass-mixins.html'>
|
||||||
|
|
||||||
<dom-module id="state-card-script">
|
<dom-module id="state-card-script">
|
||||||
<template>
|
<template>
|
||||||
@ -30,14 +31,17 @@
|
|||||||
<ha-entity-toggle state-obj='[[stateObj]]' hass='[[hass]]'></ha-entity-toggle>
|
<ha-entity-toggle state-obj='[[stateObj]]' hass='[[hass]]'></ha-entity-toggle>
|
||||||
</template>
|
</template>
|
||||||
<template is='dom-if' if='[[!stateObj.attributes.can_cancel]]'>
|
<template is='dom-if' if='[[!stateObj.attributes.can_cancel]]'>
|
||||||
<paper-button on-click='fireScript'>ACTIVATE</paper-button>
|
<paper-button on-click='fireScript'>[[localize('ui.card.script.execute')]]</paper-button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class StateCardScript extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class StateCardScript extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'state-card-script'; }
|
static get is() { return 'state-card-script'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -311,6 +311,12 @@
|
|||||||
},
|
},
|
||||||
"persistent_notification": {
|
"persistent_notification": {
|
||||||
"dismiss": "Dismiss"
|
"dismiss": "Dismiss"
|
||||||
|
},
|
||||||
|
"scene": {
|
||||||
|
"activate": "Activate"
|
||||||
|
},
|
||||||
|
"script": {
|
||||||
|
"execute": "Execute"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user