Wetterstation HB-UNI-SEN-WEA
Moderator: Co-Administratoren
-
- Beiträge: 2483
- Registriert: 13.02.2012, 20:23
- System: Alternative CCU (auf Basis OCCU)
- Hat sich bedankt: 302 Mal
- Danksagung erhalten: 116 Mal
Re: Wetterstation HB-UNI-SEN-WEA
Hello, please forgive me, but I do not not speak German and have to use English.
I'm was looking to possibility add english translation to HB-UNI-SEN-WEA addon and found multiple "stringTableWeatherAnemometerRadius" assignment in install_hb-uni-sen-wea file. Is it correct?
Boru
I'm was looking to possibility add english translation to HB-UNI-SEN-WEA addon and found multiple "stringTableWeatherAnemometerRadius" assignment in install_hb-uni-sen-wea file. Is it correct?
Code: Alles auswählen
stringtable_deInsert="WEATHER|ANEMOMETER_RADIUS \${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|ANEMOMETER_RADIUS"`" ]; then
sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi
stringtable_deInsert="WEATHER|ANEMOMETER_CALIBRATION_FACTOR \${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|ANEMOMETER_CALIBRATION_FACTOR"`" ]; then
sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi
stringtable_deInsert="WEATHER|LD_CAPACITOR \${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|LD_CAPACITOR"`" ]; then
sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi
stringtable_deInsert="WEATHER|LD_DISTURBER_DETECTION \${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|LD_DISTURBER_DETECTION "`" ]; then
sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi
-
- Beiträge: 12116
- Registriert: 20.11.2016, 20:01
- Hat sich bedankt: 849 Mal
- Danksagung erhalten: 2150 Mal
- Kontaktdaten:
Re: Wetterstation HB-UNI-SEN-WEA
Hi!
In fact, there is only a file stringtable_de.txt in /www/config which contains references to the german translation list.
I don't know why there is only that one file for german language at this place.
But that's not the problem.
Take a look at the section
There you will find the translated german descriptions.
If you want to put your english description, you have to do it in /www/webui/js/lang/en/translate.lang.stringtable.js.
All you have to do, is changing the path to it:
and change the german translation to your english one, i.e.:
gets to
.
And if you want to do it exact, you can also change every variable, that starts with "translate_de..." to "translate_en...".
translate_enFile, translate_enInsert and so on.
In fact, there is only a file stringtable_de.txt in /www/config which contains references to the german translation list.
I don't know why there is only that one file for german language at this place.
But that's not the problem.
Take a look at the section
Code: Alles auswählen
### Edit translate.lang.stringtable.js ###
translate_deFile="/www/webui/js/lang/de/translate.lang.stringtable.js"
...
If you want to put your english description, you have to do it in /www/webui/js/lang/en/translate.lang.stringtable.js.
All you have to do, is changing the path to it:
Code: Alles auswählen
### Edit translate.lang.stringtable.js ###
translate_deFile="/www/webui/js/lang/en/translate.lang.stringtable.js"
...
Code: Alles auswählen
translate_deInsert="\n \"stringTableWeatherGustSpeed\" : \"Boe-Geschwindigkeit\","
Code: Alles auswählen
translate_deInsert="\n \"stringTableWeatherGustSpeed\" : \"Gust Speed\","
And if you want to do it exact, you can also change every variable, that starts with "translate_de..." to "translate_en...".
translate_enFile, translate_enInsert and so on.
Re: Wetterstation HB-UNI-SEN-WEA
Thank you! I will do it in this way.
By the way, amazing job... appreciate.
Boru
By the way, amazing job... appreciate.
Boru
-
- Beiträge: 12116
- Registriert: 20.11.2016, 20:01
- Hat sich bedankt: 849 Mal
- Danksagung erhalten: 2150 Mal
- Kontaktdaten:
Re: Wetterstation HB-UNI-SEN-WEA
Thanks a lot!
And if you want, you can send me your translated values so that I can put it into the addon.
And if you want, you can send me your translated values so that I can put it into the addon.
Re: Wetterstation HB-UNI-SEN-WEA
It would be great, because for me harder part is find, how to execute sh script in homematic console.
Thanks again.
Boru
Code: Alles auswählen
### Edit english translate.lang.stringtable.js ###
translate_enFile="/www/webui/js/lang/en/translate.lang.stringtable.js"
translate_enSearch="\"dummy\" : \"\","
translate_enInsert="\n \"stringTableHbWeaAltitude\" : \"Height Above Sea Level\","
if [ -z "`cat $translate_enFile | grep \"stringTableHbWeaAltitude\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherGustSpeed\" : \"Gust-Speed\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherGustSpeed\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherUvIndex\" : \"UV-Index\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherUvIndex\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherLightningCounter\" : \"Lightning-Counter\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningCounter\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherLightningDistance\" : \"Lightning-Distance\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningDistance\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherAnemometerRadius\" : \"Anemometer Radius\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherAnemometerRadius\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherAnemometerCalibrationFactor\" : \"Anemometer Calibration Factor\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherAnemometerCalibrationFactor\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherLightningDetectorCapacitor\" : \"Lightning Detector Capacitor\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningDetectorCapacitor\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherLightningDetectorDisturberDetection\" : \"Lightning Detector Disturber Detection\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningDetectorDisturberDetection\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherGustThresholdExtraMessage\" : \"Gust Threshold Extra Message\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherGustThresholdExtraMessage\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherRdHeating\" : \"Rain Detector Heating\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherRdHeating\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherRdHeatingTrue\" : \"Rain Detector Heating ON\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherRdHeatingTrue\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
translate_enInsert="\n \"stringTableWeatherRdHeatingFalse\" : \"Rain Detector Heating OFF\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherRdHeatingFalse\"`" ]; then
sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
Boru
-
- Beiträge: 12116
- Registriert: 20.11.2016, 20:01
- Hat sich bedankt: 849 Mal
- Danksagung erhalten: 2150 Mal
- Kontaktdaten:
Re: Wetterstation HB-UNI-SEN-WEA
There is one small mistake in the screenshot:
But I have already fixed it in the code.
The english descriptions are now available in Addon Version 1.12
And don't bother, if there are not all parameters availabe in your current device settings.
The last 5 are new and will appear with the next release of HB-UNI-SEN-WEA sketch, version 1.4 in a few days.
But I have already fixed it in the code.
The english descriptions are now available in Addon Version 1.12
And don't bother, if there are not all parameters availabe in your current device settings.
The last 5 are new and will appear with the next release of HB-UNI-SEN-WEA sketch, version 1.4 in a few days.