Skip to content

Commit

Permalink
Merge pull request #19 from jp112sdl/dev_hb-rc-12-ep
Browse files Browse the repository at this point in the history
add selection for 10 user icons
  • Loading branch information
jp112sdl committed Feb 4, 2020
2 parents d3dc82c + 436d069 commit 13279b2
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/addon/firmware/rftypes/hb-rc-12-ep-bw.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@
<option id="ICON_HBBELL" />
<option id="ICON_HBCALENDAR" />
<option id="ICON_HBTHERMOMETER" />
<option id="ICON_HB_CUSTOM01" />
<option id="ICON_HB_CUSTOM02" />
<option id="ICON_HB_CUSTOM03" />
<option id="ICON_HB_CUSTOM04" />
<option id="ICON_HB_CUSTOM05" />
<option id="ICON_HB_CUSTOM06" />
<option id="ICON_HB_CUSTOM07" />
<option id="ICON_HB_CUSTOM08" />
<option id="ICON_HB_CUSTOM09" />
<option id="ICON_HB_CUSTOM10" />
</logical>
<physical type="integer" interface="config" list="1" index="146.0" size="1.0"/>
</parameter>
Expand Down
12 changes: 11 additions & 1 deletion src/addon/firmware/rftypes/hb-rc-12-ep-c.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,17 @@
<option id="ICON_HBERROR" />
<option id="ICON_HBBELL" />
<option id="ICON_HBCALENDAR" />
<option id="ICON_HBTHERMOMETER" />
<option id="ICON_HBTHERMOMETER" />
<option id="ICON_HB_CUSTOM01" />
<option id="ICON_HB_CUSTOM02" />
<option id="ICON_HB_CUSTOM03" />
<option id="ICON_HB_CUSTOM04" />
<option id="ICON_HB_CUSTOM05" />
<option id="ICON_HB_CUSTOM06" />
<option id="ICON_HB_CUSTOM07" />
<option id="ICON_HB_CUSTOM08" />
<option id="ICON_HB_CUSTOM09" />
<option id="ICON_HB_CUSTOM10" />
</logical>
<physical type="integer" interface="config" list="1" index="146.0" size="1.0"/>
</parameter>
Expand Down
94 changes: 92 additions & 2 deletions src/addon/install_hb-rc-12-ep
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,56 @@ webuiInsertValue="iconHbThermometer"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi

webuiInsertParam="ICON_HB_CUSTOM01"
webuiInsertValue="iconHbCustom01"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM02"
webuiInsertValue="iconHbCustom02"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM03"
webuiInsertValue="iconHbCustom03"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM04"
webuiInsertValue="iconHbCustom04"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM05"
webuiInsertValue="iconHbCustom05"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM06"
webuiInsertValue="iconHbCustom06"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM07"
webuiInsertValue="iconHbCustom07"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM08"
webuiInsertValue="iconHbCustom08"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM09"
webuiInsertValue="iconHbCustom09"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi
webuiInsertParam="ICON_HB_CUSTOM10"
webuiInsertValue="iconHbCustom10"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile; fi

### Edit stringtable_de.txt ###
stringtable_deFile="/www/config/stringtable_de.txt"
Expand Down Expand Up @@ -227,6 +276,26 @@ stringtable_deInsert="ICON_HBCALENDAR\t\${iconHbCalendar}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HBCALENDAR"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HBTHERMOMETER\t\${iconHbThermometer}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HBTHERMOMETER"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM01\t\${iconHbCustom01}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM01"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM02\t\${iconHbCustom02}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM02"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM03\t\${iconHbCustom03}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM03"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM04\t\${iconHbCustom04}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM04"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM05\t\${iconHbCustom05}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM05"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM06\t\${iconHbCustom06}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM06"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM07\t\${iconHbCustom07}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM07"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM08\t\${iconHbCustom08}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM08"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM09\t\${iconHbCustom09}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM09"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
stringtable_deInsert="ICON_HB_CUSTOM10\t\${iconHbCustom10}"
if [ -z "`cat $stringtable_deFile | grep \"ICON_HB_CUSTOM10"`" ]; then echo -e $stringtable_deInsert >> $stringtable_deFile; fi
### Edit translate.lang.stringtable.js ###
translate_deFile="/www/webui/js/lang/de/translate.lang.stringtable.js"
Expand All @@ -238,14 +307,35 @@ translate_deInsert="\n \"stringTableHbEpTextColored\" : \"Text farbig\","
if [ -z "`cat $translate_deFile | grep \"stringTableHbEpTextColored\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"stringTableHbEpIconColored\" : \"Icon farbig\","
if [ -z "`cat $translate_deFile | grep \"stringTableHbEpIconColored\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"stringTableHbEpIconColored\" : \"Icon farbig\","
if [ -z "`cat $translate_deFile | grep \"stringTableHbEpIconColored\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
### Edit translate.lang.extension.js
translate_deFile="/www/webui/js/lang/de/translate.lang.extension.js"
translate_deSearch="\"iconServiceMessage\":\"Servicemeldung\","
translate_deInsert="\n \"iconChDirArrow\":\"Pfeil zum Taster\","
if [ -z "`cat $translate_deFile | grep \"iconChDirArrow\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom01\":\"Benutzerdefiniert 1\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom01\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom02\":\"Benutzerdefiniert 2\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom02\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom03\":\"Benutzerdefiniert 3\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom03\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom04\":\"Benutzerdefiniert 4\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom04\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom05\":\"Benutzerdefiniert 5\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom05\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom06\":\"Benutzerdefiniert 6\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom06\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom07\":\"Benutzerdefiniert 7\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom07\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom08\":\"Benutzerdefiniert 8\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom08\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom09\":\"Benutzerdefiniert 9\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom09\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
translate_deInsert="\n \"iconHbCustom10\":\"Benutzerdefiniert 10\","
if [ -z "`cat $translate_deFile | grep \"iconHbCustom10\"`" ]; then sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile; fi
###############################################################################
Expand Down
30 changes: 30 additions & 0 deletions src/addon/uninstall_hb-rc-12-ep
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ webuiSearch="ICON_HBBELL"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HBCALENDAR"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HBTHERMOMETER"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_CH_DIR_ARROW"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM01"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM02"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM03"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM04"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM05"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM06"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM07"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM08"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM09"; sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="ICON_HB_CUSTOM10"; sed -i "/\($webuiSearch\)/d" $webuiFile

stringtable_deFile="/www/config/stringtable_de.txt"
stringtable_deSearch="HB_EP_TEXT_BOLD"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
Expand Down Expand Up @@ -66,11 +76,31 @@ stringtable_deSearch="ICON_HBBELL"; sed -i "/\($stringtable_deSearch\)/d" $strin
stringtable_deSearch="ICON_HBCALENDAR"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HBTHERMOMETER"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_CH_DIR_ARROW"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM01"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM02"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM03"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM04"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM05"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM06"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM07"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM08"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM09"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="ICON_HB_CUSTOM10"; sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile

translate_deFile="/www/webui/js/lang/de/translate.lang.stringtable.js"
translate_deSearch="stringTableHbEpTextColored"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="stringTableHbEpTextBold"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="stringTableHbEpIconColored"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom01"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom02"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom03"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom04"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom05"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom06"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom07"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom08"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom09"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="iconHbCustom10"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile

translate_deFile="/www/webui/js/lang/de/translate.lang.extension.js"
translate_deSearch="iconChDirArrow"; sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
Expand Down

0 comments on commit 13279b2

Please sign in to comment.