Skip to content

Commit

Permalink
More translations
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Jul 30, 2024
1 parent 049c6c9 commit 2ab53a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
11 changes: 10 additions & 1 deletion dist/irrigation-unlimited-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,8 @@ let IrrigationUnlimitedCard = class IrrigationUnlimitedCard extends s {
adjustment = stateObj.attributes.next_adjustment;
}
const isManual = schedule_index === 0;
if (isManual)
schedule_name = loc.t("menu.manual.name");
const startStr = date_to_str(start);
const classes = ["iu-zone", "iu-object"];
if (isOn)
Expand Down Expand Up @@ -1284,6 +1286,11 @@ let IrrigationUnlimitedCard = class IrrigationUnlimitedCard extends s {
classes.push("iu-timeline-running");
icon = "mdi:play";
}
let schedule_name;
if (timeline.schedule !== 0)
schedule_name = timeline.schedule_name;
else
schedule_name = loc.t("menu.manual.name");
return x `
<div class=${classes.join(" ")}>
<div class="iu-timeline-row iu-td">
Expand All @@ -1292,7 +1299,7 @@ let IrrigationUnlimitedCard = class IrrigationUnlimitedCard extends s {
<ha-icon icon=${icon}></ha-icon>
</div>
<div class="iu-td3">${startStr}</div>
<div class="iu-td4 iu-schedule">${timeline.schedule_name}</div>
<div class="iu-td4 iu-schedule">${schedule_name}</div>
<div class="iu-td5 iu-duration">${duration}</div>
<div class="iu-td6 iu-adjustment">${timeline.adjustment}</div>
<div class="iu-td7"></div>
Expand Down Expand Up @@ -1336,6 +1343,8 @@ let IrrigationUnlimitedCard = class IrrigationUnlimitedCard extends s {
adjustment = stateObj.attributes.adjustment;
}
const isManual = schedule_index === 0;
if (isManual)
schedule_name = loc.t("menu.manual.name");
const isRunning = sequence.remaining !== undefined;
const startStr = date_to_str(start);
const classes = ["iu-sequence", "iu-object"];
Expand Down
7 changes: 6 additions & 1 deletion src/irrigation-unlimited-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ export class IrrigationUnlimitedCard extends LitElement {
adjustment = stateObj.attributes.next_adjustment;
}
const isManual = schedule_index === 0;
if (isManual) schedule_name = loc.t("menu.manual.name");
const startStr = date_to_str(start);
const classes: string[] = ["iu-zone", "iu-object"];
if (isOn) classes.push("iu-on");
Expand Down Expand Up @@ -388,6 +389,9 @@ export class IrrigationUnlimitedCard extends LitElement {
classes.push("iu-timeline-running");
icon = "mdi:play";
}
let schedule_name: string;
if (timeline.schedule !== 0) schedule_name = timeline.schedule_name;
else schedule_name = loc.t("menu.manual.name");

return html`
<div class=${classes.join(" ")}>
Expand All @@ -397,7 +401,7 @@ export class IrrigationUnlimitedCard extends LitElement {
<ha-icon icon=${icon}></ha-icon>
</div>
<div class="iu-td3">${startStr}</div>
<div class="iu-td4 iu-schedule">${timeline.schedule_name}</div>
<div class="iu-td4 iu-schedule">${schedule_name}</div>
<div class="iu-td5 iu-duration">${duration}</div>
<div class="iu-td6 iu-adjustment">${timeline.adjustment}</div>
<div class="iu-td7"></div>
Expand Down Expand Up @@ -444,6 +448,7 @@ export class IrrigationUnlimitedCard extends LitElement {
adjustment = stateObj.attributes.adjustment;
}
const isManual = schedule_index === 0;
if (isManual) schedule_name = loc.t("menu.manual.name");
const isRunning = sequence.remaining !== undefined;
const startStr = date_to_str(start);
const classes: string[] = ["iu-sequence", "iu-object"];
Expand Down
1 change: 1 addition & 0 deletions src/iu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export class IUSequenceZone extends IUBase {
export interface IUTimeline {
start: string;
end: string;
schedule: number;
schedule_name: string;
adjustment: string;
status: string;
Expand Down

0 comments on commit 2ab53a5

Please sign in to comment.