Skip to content

Commit

Permalink
add missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
jp112sdl committed Feb 26, 2021
1 parent e35b5e8 commit 7ff9f82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/addon/install_hb-uni-sen-current
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fi
### Edit stringtable_de.txt ###
stringtable_deFile="/www/config/stringtable_de.txt"

stringtable_deInsert="HB_GENERIC|CURRENT\t\${stringTablePowerMeterCurrent}"
stringtable_deInsert="HB_GENERIC|CURRENT\t\${stringTableCurrent}"
if [ -z "`cat $stringtable_deFile | grep \"HB_GENERIC|CURRENT"`" ]; then
echo -e $stringtable_deInsert >> $stringtable_deFile
fi
Expand Down Expand Up @@ -132,10 +132,12 @@ fi
translate_deFile="/www/webui/js/lang/de/translate.lang.stringtable.js"
translate_deSearch="\"dummy\" : \"\","
### for compatibility with older versions
translate_deInsert="\n \"stringTablePowerMeterCurrent\" : \"Strom\","
if [ -z "`cat $translate_deFile | grep \"stringTablePowerMeterCurrent\"`" ]; then
sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile
fi
###
translate_deInsert="\n \"stringTableHBSampleTime\" : \"Messdauer (Sampletime)\","
if [ -z "`cat $translate_deFile | grep \"stringTableHBSampleTime\"`" ]; then
Expand Down
13 changes: 12 additions & 1 deletion src/addon/install_hb-uni-sen-volt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,18 @@ webuiSearchBegin="elvST[[:space:]]*=[[:space:]]*new Array();"
### Edit stringtable_de.txt ###
stringtable_deFile="/www/config/stringtable_de.txt"

stringtable_deInsert="HB_GENERIC_VOLT|HB_VOLTAGE\t\${stringTablePowerMeterVoltage}"
stringtable_deInsert="HB_GENERIC_VOLT|HB_VOLTAGE\t\${stringTableVoltage}"
if [ -z "`cat $stringtable_deFile | grep \"HB_GENERIC_VOLT|HB_VOLTAGE"`" ]; then
echo -e $stringtable_deInsert >> $stringtable_deFile
fi
### Edit translate.lang.stringtable.js ###
translate_deFile="/www/webui/js/lang/de/translate.lang.stringtable.js"
translate_deSearch="\"dummy\" : \"\","
### for compatibility with older versions
translate_deInsert="\n \"stringTablePowerMeterVoltage\" : \"Spannung\","
if [ -z "`cat $translate_deFile | grep \"stringTablePowerMeterCurrent\"`" ]; then
sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile
fi
###

0 comments on commit 7ff9f82

Please sign in to comment.