Skip to content

Commit

Permalink
web/solar_forecast: Improve plane config count description
Browse files Browse the repository at this point in the history
  • Loading branch information
borg42 committed Nov 15, 2024
1 parent 1ea679b commit 87d6bfd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion software/web/src/modules/solar_forecast/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ export class SolarForecast extends ConfigComponent<"solar_forecast/config", {sta
}
addEnabled={get_active_unsaved_planes().length < SOLAR_FORECAST_PLANES}
addTitle={__("solar_forecast.content.add_plane_config_title")}
addMessage={get_active_unsaved_planes().length == SOLAR_FORECAST_PLANES ? __("solar_forecast.content.add_plane_config_done") : __("solar_forecast.content.add_plane_config_prefix") + (get_active_unsaved_planes().length + 1) + __("solar_forecast.content.add_plane_config_infix") + SOLAR_FORECAST_PLANES + __("solar_forecast.content.add_plane_config_postfix")}
addMessage={get_active_unsaved_planes().length == SOLAR_FORECAST_PLANES ? __("solar_forecast.content.add_plane_config_done") : __("solar_forecast.content.add_plane_config_count")(get_active_unsaved_planes().length, SOLAR_FORECAST_PLANES)}
onAddShow={async () => {
this.setState({plane_config_tmp: {active: true, name: "#" + get_next_free_unsaved_plane_index(), latitude: 0, longitude: 0, declination: 0, azimuth: 0, wp: 0}})
}}
Expand Down
4 changes: 1 addition & 3 deletions software/web/src/modules/solar_forecast/translation_de.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ let x = {
"plane_config_kwp": "kWp",
"plane_config_kwp_muted": "Peak-Leistung der PV-Fläche",
"add_plane_config_title": "Neue PV-Fläche",
"add_plane_config_prefix": "Neue PV-Fläche hinzufügen (",
"add_plane_config_infix": " von ",
"add_plane_config_postfix": ")",
"add_plane_config_count": /*SFN*/(x: number, max: number) => x + " von " + max + " PV-Flächen konfiguriert"/*NF*/,
"add_plane_config_done": "Alle PV-Flächen hinzugefügt (6 von 6)",
"edit_plane_config_title": "PV-Fläche bearbeiten",
"solar_forecast_desc": "Lädt automatisch die Solarprognose herunter. Für diese Funktion muss das Gerät Zugriff auf das Internet haben.",
Expand Down
4 changes: 1 addition & 3 deletions software/web/src/modules/solar_forecast/translation_en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ let x = {
"plane_config_kwp": "kWp",
"plane_config_kwp_muted": "Peak power of the PV plane",
"add_plane_config_title": "New PV plane",
"add_plane_config_prefix": "Add new PV plane (",
"add_plane_config_infix": " of ",
"add_plane_config_postfix": ")",
"add_plane_config_count": /*SFN*/(x: number, max: number) => x + " of " + max + " PV planes configured"/*NF*/,
"add_plane_config_done": "All PV planes added (6 of 6)",
"edit_plane_config_title": "Edit PV plane",
"solar_forecast_desc": "Automatic download of solar forecast. For this feature the device requires Internet access.",
Expand Down

0 comments on commit 87d6bfd

Please sign in to comment.