mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-10 03:19:44 +00:00
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:
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user