Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Renaming Airquality

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

Post Reply
sutne
Posts: 577
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: HP2560 (WS80) and HP2550 (WS90)
Operating System: Raspbian Bullseye and Bookworm
Location: Rjoanddalen and Kronstad, Norway
Contact:

Renaming Airquality

Post by sutne »

I am trying to rename the Airquality in the language file

Code: Select all

AirQuality1=Sensor 1
AirQualityAvg1=Sensor Avg 1
ParticulateMatter=Svevestøv
to

Code: Select all

AirQuality1=WH45
AirQualityAvg1=WH45 snitt
ParticulateMatter=Svevestøv 
But after running ‘cumulusutils.exe website’ the language file is overwritten with the original text.

Code: Select all

AirQuality1=Sensor 1
AirQualityAvg1=Sensor Avg 1
ParticulateMatter=Svevestøv 
and this is what is used in the chart.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Renaming Airquality

Post by HansR »

@sutne: looking into it, a bit more complex than anticipated.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Renaming Airquality

Post by HansR »

OK, it took me some time to refind how this was done.

As with all ExtraSensors the name is initialised from strings.ini. Although strings.ini is no longer defining the sensors used - that is now uniquely defined in cumulusutils.ini - the name is still taken from there to have the same name in the interface as in CUtils website.

However, the user may change that in the language file and those changes are supposed to be used in the next compilation.

Every run however, the value of strings.ini overwrites whatever the user changed and does a hard reset to the strings.ini value.
I consider that as a bug: only the first creation must initialise from strings.ini

I enclose patch 4 which should fix that. You can confirm by removing the parameter for AirQuality1 (and Particulate matter) in the compiler section. A run will create with the strings.ini default values and changing that text followed by a rerun will use the changed text.

Let me know how it goes.
You do not have the required permissions to view the files attached to this post.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
sutne
Posts: 577
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: HP2560 (WS80) and HP2550 (WS90)
Operating System: Raspbian Bullseye and Bookworm
Location: Rjoanddalen and Kronstad, Norway
Contact:

Re: Renaming Airquality

Post by sutne »

Almost.
The graph got the new text, but the values above it keeps Sensor 1.
And misses the value (maybe it has always been like that).
‘Sensor name’ also need translation.
762ED79D-D151-4B04-85F1-4C398E14BD78.png
You do not have the required permissions to view the files attached to this post.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Renaming Airquality

Post by HansR »

Ha... yes, just checked your site and see what you mean. Next patch and if it's ok i'll make a release.
This evening or tomorrow morning.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Renaming Airquality

Post by HansR »

Steinar,

Attached is patch 5 which takes care of correct translations for the ExtraSensors module which indeed has been neglected until now.

The basics is that you will find some of translation tags - the HTML translation tags - in the section [ExtraSensors].

You will find all translation tags for the sensor names in the section [Compiler] and this includes the three values for the lightning detector although those are not really explicit sensors. This is analogue to all standard plot variables.

The translation tags for the sensor names are defaulted with the text from strings.ini when the tags are created in the CUstringsXX.ini and can then be changed by the user which modifications will be used in subsequent runs for the ExtraSensors module.

I'll modify the wiki accordingly.

Let me know how you get on.
You do not have the required permissions to view the files attached to this post.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
sutne
Posts: 577
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: HP2560 (WS80) and HP2550 (WS90)
Operating System: Raspbian Bullseye and Bookworm
Location: Rjoanddalen and Kronstad, Norway
Contact:

Re: Renaming Airquality

Post by sutne »

Excellent!

Thank you, Hans!
Post Reply