Localize ha-relative-time (#1241)

* Localize relative time

* Add mixin

* Pass hass to ha-relative-time

* Remove debug

* Add hass

* Add hass everywhere

* Remove value from translation file

* Add quotes to attributes

* Lint

* Fix in hassio file

* Use current placeholder syntax

* Use correct syntax

* Move to ui.components
This commit is contained in:
c727
2018-06-01 15:55:00 +02:00
committed by Paulus Schoutsen
parent e11cca28fd
commit 1a3966e55f
26 changed files with 70 additions and 57 deletions

View File

@@ -62,7 +62,7 @@ class StateInfo extends PolymerElement {
<template is="dom-if" if="[[inDialog]]">
<div class="time-ago">
<ha-relative-time datetime="[[stateObj.last_changed]]"></ha-relative-time>
<ha-relative-time hass="[[hass]]" datetime="[[stateObj.last_changed]]"></ha-relative-time>
</div>
</template>
<template is="dom-if" if="[[!inDialog]]">
@@ -80,14 +80,9 @@ class StateInfo extends PolymerElement {
type: Boolean,
value: false,
},
stateObj: {
type: Object,
},
inDialog: {
type: Boolean,
},
hass: Object,
stateObj: Object,
inDialog: Boolean
};
}