mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Add missing translations to statistics graph card editor (#13836)
This commit is contained in:
parent
cedde3d6a2
commit
977fdd9fbb
@ -65,12 +65,6 @@ const cardConfigStruct = assign(
|
||||
|
||||
const periods = ["5minute", "hour", "day", "month"] as const;
|
||||
const stat_types = ["mean", "min", "max", "sum"] as const;
|
||||
const stat_type_labels = {
|
||||
mean: "Mean",
|
||||
min: "Min",
|
||||
max: "Max",
|
||||
sum: "Sum",
|
||||
} as const;
|
||||
|
||||
@customElement("hui-statistics-graph-card-editor")
|
||||
export class HuiStatisticsGraphCardEditor
|
||||
@ -156,7 +150,9 @@ export class HuiStatisticsGraphCardEditor
|
||||
multiple: true,
|
||||
options: stat_types.map((stat_type) => ({
|
||||
value: stat_type,
|
||||
label: stat_type_labels[stat_type],
|
||||
label: localize(
|
||||
`ui.panel.lovelace.editor.card.statistics-graph.stat_type_labels.${stat_type}`
|
||||
),
|
||||
disabled:
|
||||
!metaDatas ||
|
||||
!metaDatas?.every((metaData) =>
|
||||
@ -214,8 +210,12 @@ export class HuiStatisticsGraphCardEditor
|
||||
></ha-form>
|
||||
<ha-statistics-picker
|
||||
.hass=${this.hass}
|
||||
.pickStatisticLabel=${`Add a statistic`}
|
||||
.pickedStatisticLabel=${`Statistic`}
|
||||
.pickStatisticLabel=${this.hass!.localize(
|
||||
"ui.panel.lovelace.editor.card.statistics-graph.pick_statistic"
|
||||
)}
|
||||
.pickedStatisticLabel=${this.hass!.localize(
|
||||
"ui.panel.lovelace.editor.card.statistics-graph.picked_statistic"
|
||||
)}
|
||||
.includeDisplayUnitOfMeasurement=${displayUnit}
|
||||
.ignoreRestrictionsOnFirstStatistic=${true}
|
||||
.value=${this._configEntities}
|
||||
|
@ -3929,13 +3929,21 @@
|
||||
"description": "The Statistics Graph card allows you to display a graph of the statistics for each of the entities listed.",
|
||||
"period": "Period",
|
||||
"stat_types": "Show stat types",
|
||||
"stat_type_labels": {
|
||||
"mean": "Mean",
|
||||
"min": "Min",
|
||||
"max": "Max",
|
||||
"sum": "Sum"
|
||||
},
|
||||
"chart_type": "Chart type",
|
||||
"periods": {
|
||||
"hour": "Hour",
|
||||
"day": "Day",
|
||||
"month": "Month",
|
||||
"5minute": "5 Minutes"
|
||||
}
|
||||
},
|
||||
"pick_statistic": "Add a statistic",
|
||||
"picked_statistic": "Statistic"
|
||||
},
|
||||
"horizontal-stack": {
|
||||
"name": "Horizontal Stack",
|
||||
|
Loading…
x
Reference in New Issue
Block a user