k-donn / plasmoid-wunderground

A Plasma 5/6 widget for showing data from Wunderground PWS
https://store.kde.org/p/2135799
GNU General Public License v2.0
40 stars 19 forks source link

Allow translations for the sidepanel of the configuration page #54

Closed tabascosw closed 6 months ago

tabascosw commented 7 months ago

Just as the title says, to allow a more complete localization it would be good to make some minor changes to the config.qml.

`import QtQuick import org.kde.plasma.configuration

ConfigModel { ConfigCategory { name: i18n("Station") icon: "flag" source: "config/ConfigStation.qml" } ConfigCategory { name: i18n("Appearance") icon: "preferences-desktop-color" source: "config/ConfigAppearance.qml" } ConfigCategory { name: i18n("Units") icon: "configuration" source: "config/ConfigUnits.qml" } ConfigCategory { name: i18n("Debug") icon: "preferences-other" source: "config/ConfigDebug.qml" } }`

The translation will then appear, after it has been added to the template. Please note I made the translation in the qt5 version and then just copied it to the qt6 version. Screenshot_20240328_092907

k-donn commented 7 months ago

Will do. Another simple change I will add is i18n tags to the configure button on the widget.

In addition, I just realized the textual description of conditions in the top right is always set to English. It does not need to be like this because the API can return different language output. It's the same for the forecast.

Keep an eye out for a commit coming.

k-donn commented 7 months ago

Version 0.0.7 just added these changes. Let me know if it broke anything.

tabascosw commented 7 months ago

Looks good, only the text under the daily forecast has disappeared. Screenshot_20240414_093319

tabascosw commented 7 months ago

It is actually worse now, all data in the forecast is gone.

k-donn commented 7 months ago

Sorry about that. Line 246 of pws-api.js was improperly copied from above and should be night["phrase_32char"] instead of it being day. It errors out when day is null.

tabascosw commented 7 months ago

No problem, after changing the line 246 it works fine. Thanks for your hard work. Screenshot_20240414_215824