mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 10:56:34 +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="../components/entity/state-info.html">
|
||||
<link rel='import' href='../util/hass-mixins.html'>
|
||||
|
||||
<dom-module id="state-card-scene">
|
||||
<template>
|
||||
@ -21,13 +22,16 @@
|
||||
|
||||
<div class='horizontal justified layout'>
|
||||
<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>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<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 properties() {
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
<link rel="import" href="../components/entity/state-info.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">
|
||||
<template>
|
||||
@ -30,14 +31,17 @@
|
||||
<ha-entity-toggle state-obj='[[stateObj]]' hass='[[hass]]'></ha-entity-toggle>
|
||||
</template>
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<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 properties() {
|
||||
|
@ -311,6 +311,12 @@
|
||||
},
|
||||
"persistent_notification": {
|
||||
"dismiss": "Dismiss"
|
||||
},
|
||||
"scene": {
|
||||
"activate": "Activate"
|
||||
},
|
||||
"script": {
|
||||
"execute": "Execute"
|
||||
}
|
||||
},
|
||||
"common": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user