Skip to content

Commit

Permalink
fix for missing translation
Browse files Browse the repository at this point in the history
  • Loading branch information
niels committed Nov 1, 2020
1 parent fff3ea6 commit 02872b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/custom-elements/my-relative-time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ export class MyRelativeTime extends LitElement {
return day + ' ' + localize('ui.components.time.absolute', this.hass.language, '{time}', time);
} else if (Math.round(delta / secondsPerMinute) > 60 && Math.round(delta / secondsPerMinute) < 120) {
const mins = Math.round(delta / secondsPerMinute - 60);
const ts1 = this.hass.localize('ui.components.relative_time.duration.hour', 'count', 1);
const ts1 = this.hass.localize('ui.components.relative_time.future_duration.hour', 'count', 1);
const ts2 = this.hass.localize('ui.components.relative_time.duration.minute', 'count', mins);
const join = this.hass.localize('ui.common.and');
return this.hass.localize('ui.components.relative_time.future', 'time', `${ts1} ${join} ${ts2}`);
return `${ts1} ${join} ${ts2}`;
} else if (Math.round(delta) > 60 && Math.round(delta) < 120) {
const seconds = Math.round(delta - 60);
const ts1 = this.hass.localize('ui.components.relative_time.duration.minute', 'count', 1);
const ts1 = this.hass.localize('ui.components.relative_time.future_duration.minute', 'count', 1);
const ts2 = this.hass.localize('ui.components.relative_time.duration.second', 'count', seconds);
const join = this.hass.localize('ui.common.and');
return this.hass.localize('ui.components.relative_time.future', 'time', `${ts1} ${join} ${ts2}`);
return `${ts1} ${join} ${ts2}`;
}
}

Expand Down

0 comments on commit 02872b6

Please sign in to comment.