From c84950a488ff10572091dd22d7160f3246f815c6 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 11 Aug 2022 23:58:48 +0200 Subject: [PATCH] Some fixes in the Energy View if there is only a producer --- nymea-app/translations/nymea-app-de.ts | 16 ++++++++++++++-- nymea-app/translations/nymea-app-en.ts | 20 ++++++++++++-------- nymea-app/translations/nymea-app-en_US.ts | 20 ++++++++++++-------- nymea-app/translations/nymea-app-it.ts | 20 ++++++++++++-------- nymea-app/translations/nymea-app-ko.ts | 20 ++++++++++++-------- nymea-app/translations/nymea-app-nl.ts | 20 ++++++++++++-------- nymea-app/translations/nymea-app-tr.ts | 18 +++++++++++++----- nymea-app/translations/nymea-app-vi.ts | 20 ++++++++++++-------- nymea-app/ui/mainviews/EnergyView.qml | 8 ++++---- 9 files changed, 103 insertions(+), 59 deletions(-) diff --git a/nymea-app/translations/nymea-app-de.ts b/nymea-app/translations/nymea-app-de.ts index c9abe611..4012b130 100644 --- a/nymea-app/translations/nymea-app-de.ts +++ b/nymea-app/translations/nymea-app-de.ts @@ -1939,7 +1939,7 @@ To get an overview of your current energy usage, install an energy meter. - Installiere ein Energiemessgerät um eine Übersicht über Deinen Energieverbrauch zu erhalten. + Installiere ein Energiemessgerät um eine Übersicht über Deinen Energieverbrauch zu erhalten. Energy plugin not installed installed. @@ -1947,7 +1947,7 @@ This %1 system does not have the energy extensions installed. - Auf diesem %1 System ist die Energieerweiterung nicht installiert. + Auf diesem %1 System ist die Energieerweiterung nicht installiert. Install energy plugin @@ -1957,6 +1957,14 @@ Energy plugin not installed. Das Energie-Plugin ist nicht installiert. + + To get an overview of your current energy usage, install the energy plugin. + Um einen Überblick über Deinen Energieverbrauch zu bekommen, installiere das Energy-Plugin. + + + To get an overview of your current energy usage, set up an energy meter. + Um einen Überblick über deinen Energieverbrauch zu bekommen, richte einen Stromgzähler ein. + ErrorDialog @@ -5460,6 +5468,10 @@ Möchtest Du fortfahren? Installed integration plugins Installierte Integrationen + + Install more plugins + Weitere Plugins installieren + PowerBalanceStats diff --git a/nymea-app/translations/nymea-app-en.ts b/nymea-app/translations/nymea-app-en.ts index 54e631f8..f4930686 100644 --- a/nymea-app/translations/nymea-app-en.ts +++ b/nymea-app/translations/nymea-app-en.ts @@ -1819,14 +1819,6 @@ Add things - - To get an overview of your current energy usage, install an energy meter. - - - - This %1 system does not have the energy extensions installed. - - Install energy plugin @@ -1835,6 +1827,14 @@ Energy plugin not installed. + + To get an overview of your current energy usage, install the energy plugin. + + + + To get an overview of your current energy usage, set up an energy meter. + + ErrorDialog @@ -5188,6 +5188,10 @@ Do you want to proceed? Installed integration plugins + + Install more plugins + + PowerBalanceStats diff --git a/nymea-app/translations/nymea-app-en_US.ts b/nymea-app/translations/nymea-app-en_US.ts index 54e631f8..f4930686 100644 --- a/nymea-app/translations/nymea-app-en_US.ts +++ b/nymea-app/translations/nymea-app-en_US.ts @@ -1819,14 +1819,6 @@ Add things - - To get an overview of your current energy usage, install an energy meter. - - - - This %1 system does not have the energy extensions installed. - - Install energy plugin @@ -1835,6 +1827,14 @@ Energy plugin not installed. + + To get an overview of your current energy usage, install the energy plugin. + + + + To get an overview of your current energy usage, set up an energy meter. + + ErrorDialog @@ -5188,6 +5188,10 @@ Do you want to proceed? Installed integration plugins + + Install more plugins + + PowerBalanceStats diff --git a/nymea-app/translations/nymea-app-it.ts b/nymea-app/translations/nymea-app-it.ts index 9eaa0844..2e1cd683 100644 --- a/nymea-app/translations/nymea-app-it.ts +++ b/nymea-app/translations/nymea-app-it.ts @@ -1862,14 +1862,6 @@ Add things - - To get an overview of your current energy usage, install an energy meter. - - - - This %1 system does not have the energy extensions installed. - - Install energy plugin @@ -1878,6 +1870,14 @@ Energy plugin not installed. + + To get an overview of your current energy usage, install the energy plugin. + + + + To get an overview of your current energy usage, set up an energy meter. + + ErrorDialog @@ -5235,6 +5235,10 @@ Do you want to proceed? Installed integration plugins + + Install more plugins + + PowerBalanceStats diff --git a/nymea-app/translations/nymea-app-ko.ts b/nymea-app/translations/nymea-app-ko.ts index 23b4936c..51c9ff1b 100644 --- a/nymea-app/translations/nymea-app-ko.ts +++ b/nymea-app/translations/nymea-app-ko.ts @@ -1890,14 +1890,6 @@ Add things 사물(장치) 추가 - - To get an overview of your current energy usage, install an energy meter. - - - - This %1 system does not have the energy extensions installed. - - Install energy plugin @@ -1906,6 +1898,14 @@ Energy plugin not installed. + + To get an overview of your current energy usage, install the energy plugin. + + + + To get an overview of your current energy usage, set up an energy meter. + + ErrorDialog @@ -5346,6 +5346,10 @@ Do you want to proceed? Installed integration plugins + + Install more plugins + + PowerBalanceStats diff --git a/nymea-app/translations/nymea-app-nl.ts b/nymea-app/translations/nymea-app-nl.ts index 8952c602..e3e45787 100644 --- a/nymea-app/translations/nymea-app-nl.ts +++ b/nymea-app/translations/nymea-app-nl.ts @@ -1869,14 +1869,6 @@ Add things - - To get an overview of your current energy usage, install an energy meter. - - - - This %1 system does not have the energy extensions installed. - - Install energy plugin @@ -1885,6 +1877,14 @@ Energy plugin not installed. + + To get an overview of your current energy usage, install the energy plugin. + + + + To get an overview of your current energy usage, set up an energy meter. + + ErrorDialog @@ -5246,6 +5246,10 @@ Do you want to proceed? Installed integration plugins + + Install more plugins + + PowerBalanceStats diff --git a/nymea-app/translations/nymea-app-tr.ts b/nymea-app/translations/nymea-app-tr.ts index 9e7e0547..230ae745 100644 --- a/nymea-app/translations/nymea-app-tr.ts +++ b/nymea-app/translations/nymea-app-tr.ts @@ -1926,11 +1926,7 @@ To get an overview of your current energy usage, install an energy meter. - Mevcut enerji kullanımınıza genel bir bakış için bir enerji sayacı kurun. - - - This %1 system does not have the energy extensions installed. - + Mevcut enerji kullanımınıza genel bir bakış için bir enerji sayacı kurun. Install energy plugin @@ -1940,6 +1936,14 @@ Energy plugin not installed. + + To get an overview of your current energy usage, install the energy plugin. + + + + To get an overview of your current energy usage, set up an energy meter. + + ErrorDialog @@ -5384,6 +5388,10 @@ Do you want to proceed? Installed integration plugins Yüklü entegrasyon eklentileri + + Install more plugins + + PowerBalanceStats diff --git a/nymea-app/translations/nymea-app-vi.ts b/nymea-app/translations/nymea-app-vi.ts index 0b256651..40e711d8 100644 --- a/nymea-app/translations/nymea-app-vi.ts +++ b/nymea-app/translations/nymea-app-vi.ts @@ -1818,14 +1818,6 @@ Add things - - To get an overview of your current energy usage, install an energy meter. - - - - This %1 system does not have the energy extensions installed. - - Install energy plugin @@ -1834,6 +1826,14 @@ Energy plugin not installed. + + To get an overview of your current energy usage, install the energy plugin. + + + + To get an overview of your current energy usage, set up an energy meter. + + ErrorDialog @@ -5171,6 +5171,10 @@ Do you want to proceed? Installed integration plugins + + Install more plugins + + PowerBalanceStats diff --git a/nymea-app/ui/mainviews/EnergyView.qml b/nymea-app/ui/mainviews/EnergyView.qml index d4d11794..2cde5d65 100644 --- a/nymea-app/ui/mainviews/EnergyView.qml +++ b/nymea-app/ui/mainviews/EnergyView.qml @@ -170,7 +170,7 @@ MainViewBase { Layout.fillWidth: true Layout.preferredHeight: width energyManager: energyManager - visible: rootMeter != null + visible: rootMeter != null || producers.count > 0 producers: producers } @@ -191,7 +191,7 @@ MainViewBase { width: parent.width - app.margins * 2 visible: !engine.thingManager.fetchingData && (!engine.jsonRpcClient.experiences.hasOwnProperty("Energy") || engine.jsonRpcClient.experiences["Energy"] <= "0.1") title: qsTr("Energy plugin not installed.") - text: qsTr("This %1 system does not have the energy extensions installed.").arg(Configuration.systemName) + text: qsTr("To get an overview of your current energy usage, install the energy plugin.") imageSource: "../images/smartmeter.svg" buttonText: qsTr("Install energy plugin") buttonVisible: packagesFilterModel.count > 0 @@ -205,9 +205,9 @@ MainViewBase { EmptyViewPlaceholder { anchors.centerIn: parent width: parent.width - app.margins * 2 - visible: engine.jsonRpcClient.experiences["Energy"] >= "0.2" && !engine.thingManager.fetchingData && energyMeters.count == 0 && consumers.count == 0 + visible: engine.jsonRpcClient.experiences["Energy"] >= "0.2" && !engine.thingManager.fetchingData && energyMeters.count == 0 && consumers.count == 0 && producers.count == 0 title: qsTr("There are no energy meters installed.") - text: qsTr("To get an overview of your current energy usage, install an energy meter.") + text: qsTr("To get an overview of your current energy usage, set up an energy meter.") imageSource: "../images/smartmeter.svg" buttonText: qsTr("Add things") onButtonClicked: pageStack.push(Qt.resolvedUrl("../thingconfiguration/NewThingPage.qml"))