added further weather templates and translation

This commit is contained in:
louis 2015-01-14 11:28:38 +01:00
parent 8c6a83b72a
commit 645f625d79
6 changed files with 336 additions and 91 deletions

View File

@ -265,6 +265,21 @@ void cTemplateView::Translate(void) {
func->SetTranslatedText(translation);
}
}
if (func->GetType() == ftLoop) {
cTemplateLoopFunction *funcsLoop = dynamic_cast<cTemplateLoopFunction*>(func);
funcsLoop->InitIterator();
cTemplateFunction *loopFunc = NULL;
while(loopFunc = funcsLoop->GetNextFunction()) {
if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox) {
string text = loopFunc->GetParameter(ptText);
string translation;
bool translated = globals->Translate(text, translation);
if (translated) {
loopFunc->SetTranslatedText(translation);
}
}
}
}
}
}
}
@ -346,6 +361,32 @@ void cTemplateView::Translate(void) {
func->SetTranslatedText(translation);
}
}
if (func->GetType() == ftLoop) {
cTemplateLoopFunction *funcsLoop = dynamic_cast<cTemplateLoopFunction*>(func);
funcsLoop->InitIterator();
cTemplateFunction *loopFunc = NULL;
while(loopFunc = funcsLoop->GetNextFunction()) {
if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox) {
string text = loopFunc->GetParameter(ptText);
string translation;
bool translated = globals->Translate(text, translation);
if (translated) {
loopFunc->SetTranslatedText(translation);
}
}
}
}
}
}
//Translate Plugin Views
for (map < string, map< int, cTemplateView*> >::iterator it = pluginViews.begin(); it != pluginViews.end(); it++) {
esyslog("skindesigner: translating plugin %s", (it->first).c_str());
map< int, cTemplateView*> plugViews = it->second;
for (map< int, cTemplateView*>::iterator it2 = plugViews.begin(); it2 != plugViews.end(); it2++) {
esyslog("skindesigner: translating view %d", (int)it2->first);
cTemplateView *pluginView = it2->second;
pluginView->Translate();
}
}

View File

@ -194,6 +194,82 @@
<trans lang="en_EN">Pause</trans>
<trans lang="de_DE">Pause</trans>
</token>
<token name="tr(temp)">
<trans lang="en_EN">Temperature</trans>
<trans lang="de_DE">Temperatur</trans>
</token>
<token name="tr(apparenttemp)">
<trans lang="en_EN">Felt Temperature</trans>
<trans lang="de_DE">Gefühlte Temperatur</trans>
</token>
<token name="tr(todaymin)">
<trans lang="en_EN">minimum today</trans>
<trans lang="de_DE">heutiges Minimum</trans>
</token>
<token name="tr(todaymax)">
<trans lang="en_EN">maximum today</trans>
<trans lang="de_DE">heutiges Maximum</trans>
</token>
<token name="tr(precipitationprobability)">
<trans lang="en_EN">Precipitation Prob.</trans>
<trans lang="de_DE">Regenwahrsch.</trans>
</token>
<token name="tr(precipitationintensity)">
<trans lang="en_EN">Precipitation Intensity</trans>
<trans lang="de_DE">Regenmenge</trans>
</token>
<token name="tr(humidity)">
<trans lang="en_EN">Humidity</trans>
<trans lang="de_DE">Luftfeuchtigkeit</trans>
</token>
<token name="tr(apparenttemp)">
<trans lang="en_EN">Felt Temperature</trans>
<trans lang="de_DE">Gefühlte Temperatur</trans>
</token>
<token name="tr(windbearing)">
<trans lang="en_EN">Wind Bearing</trans>
<trans lang="de_DE">Windrichtung</trans>
</token>
<token name="tr(windspeed)">
<trans lang="en_EN">Wind Speed</trans>
<trans lang="de_DE">Windgeschwindigkeit</trans>
</token>
<token name="tr(cloudcover)">
<trans lang="en_EN">Cloud Cover</trans>
<trans lang="de_DE">Bewölkung</trans>
</token>
<token name="tr(pressure)">
<trans lang="en_EN">Pressure</trans>
<trans lang="de_DE">Luftdruck</trans>
</token>
<token name="tr(ozone)">
<trans lang="en_EN">Ozone</trans>
<trans lang="de_DE">Ozon</trans>
</token>
<token name="tr(visibility)">
<trans lang="en_EN">visibility</trans>
<trans lang="de_DE">Sicht</trans>
</token>
<token name="tr(conditions)">
<trans lang="en_EN">Weather Conditions</trans>
<trans lang="de_DE">Wetterlage</trans>
</token>
<token name="tr(from)">
<trans lang="en_EN">from</trans>
<trans lang="de_DE">aus</trans>
</token>
<token name="tr(felt)">
<trans lang="en_EN">felt</trans>
<trans lang="de_DE">gefühlt</trans>
</token>
<token name="tr(min)">
<trans lang="en_EN">min</trans>
<trans lang="de_DE">min</trans>
</token>
<token name="tr(max)">
<trans lang="en_EN">max</trans>
<trans lang="de_DE">max</trans>
</token>
</translations>
<!--
The three Fonts FontOSD, FontFix and FontSml configured in VDR

View File

@ -39,15 +39,79 @@
</colorbuttons>
<menuitems x="0" y="10%" orientation="vertical" width="100%" height="82%" align="center" numlistelements="10">
<!-- Available Variables schedules menu listelement:
<!-- Available Variables:
{current}
{separator}
{menuitemtext}
{iscurrent}
{ishourly}
{isdaily}
{menuitemtext} "Current Weather", "Next 48 hours" or "Next 7 days"
{iscurrent} true if item is "Current Weather"
{ishourly} true if item is "Next 48 hours"
{isdaily} true if item is "Next 7 days"
If {iscurrent} is true, the following tokens are set:
{timestamp} timestamp in hh:mm dd.mm of current forecast
{temperature} current temperature in °C
{apparenttemperature} apparent (felt) temperature in °C
{summary} short summary of current weather
{icon} path to use in <drawimage> to display appropriate weather icon
{precipitationintensity} precipitation intensity in l/qm
{precipitationprobability} precipitation probability in %
{precipitationtype} precipitation type (snow, ...)
{humidity} humidity in %
{windspeed} wind speed in km/h
{windbearing} wind bearing in degrees
{windbearingstring} wind bearing as human readable string (e.g NE, NNE, ...)
{visibility} visibility in km
{cloudcover} cloud cover in %
{pressure} pressure in HPa
{ozone} Ozone in DU (Dobson Unit)
If {ishourly} is true, the following tokens are set:
{summary} short summary of weather
{icon} path to use in <drawimage> to display appropriate weather icon
{hourly[]} array with up to 48 hourly forecasts
{hourly[num]} number of forecast, starting at 1
{hourly[timestamp]} timestamp in hh:mm
{hourly[temperature]} temperature in °C
{hourly[apparenttemperature]} apparent (felt) temperature in °C
{hourly[summary]} short summary
{hourly[icon]} path to use in <drawimage> to display appropriate weather icon
{hourly[precipitationintensity]} precipitation intensity in l/qm
{hourly[precipitationprobability]} precipitation probability in %
{hourly[precipitationtype]} precipitation type (snow, ...)
{hourly[humidity]} humidity in %
{hourly[windspeed]} wind speed in km/h
{hourly[windbearing]} wind bearing in degrees
{hourly[windbearingstring]} wind bearing as human readable string (e.g NE, NNE, ...)
{hourly[visibility]} visibility in km
{hourly[cloudcover]} cloud cover in %
{hourly[pressure]} pressure in HPa
{hourly[ozone]} Ozone in DU (Dobson Unit)
If {isdaily} is true, the following tokens are set:
{summary} short summary of weather
{icon} path to use in <drawimage> to display appropriate weather icon
{daily[day]} day of forecast in dd.mm
{daily[dayname]} three letter abbrivated day name
{daily[temperaturemin]} minimum temperature at this day in °C
{daily[temperaturemintime]} time of minimum temperature
{daily[temperaturemax]} maximum temperature at this day in °C
{daily[temperaturemaxtime]} time of maximum temperature
{daily[summary]} short summary
{daily[icon]} path to use in <drawimage> to display appropriate weather icon
{daily[precipitationintensity]} precipitation intensity in l/qm
{daily[precipitationprobability]} precipitation probability in %
{daily[precipitationtype]} precipitation type (snow, ...)
{daily[humidity]} humidity in %
{daily[windspeed]} wind speed in km/h
{daily[windbearing]} wind bearing in degrees
{daily[windbearingstring]} wind bearing as human readable string (e.g NE, NNE, ...)
{daily[visibility]} visibility in km
{daily[cloudcover]} cloud cover in %
{daily[pressure]} pressure in HPa
{daily[ozone]} Ozone in DU (Dobson Unit)
-->
<listelement debug="true">
<listelement>
<!-- Background -->
<area x="1%" width="46%" layer="2">
<fill condition="not{current}" color="{clrTransparent}" />
@ -59,22 +123,22 @@
</listelement>
<!-- additional element which is drawn for current element -->
<!-- All Tokens from listelement are available -->
<currentelement debug="true" delay="100" fadetime="0">
<currentelement delay="100" fadetime="0">
<area condition="{iscurrent}" x="51%" y="0" width="48%" height="100%" layer="3">
<drawimage name="weathericon" imagetype="icon" path="{icon}" x="2%" y="0" width="{areawidth}*0.3" height="{areawidth}*0.3"/>
<drawtext align="right" y="0" font="{light}" fontsize="8%" color="{clrWhite}" text="{timestamp}" />
<drawtext align="right" y="6%" font="{light}" fontsize="16%" color="{clrWhite}" text="{temperature}°C" />
<drawtext align="right" y="20%" font="{light}" fontsize="8%" color="{clrWhite}" text="{summary}" />
<drawtext x="0" y="34%" font="{light}" fontsize="6%" color="{clrWhite}" text="Gefühlte Temperatur: {apparenttemperature} °C" />
<drawtext x="0" y="40%" font="{light}" fontsize="6%" color="{clrWhite}" text="Regenwahrsch.: {precipitationprobability} %" />
<drawtext x="0" y="46%" font="{light}" fontsize="6%" color="{clrWhite}" text="Regenmenge: {precipitationintensity} l/qm" />
<drawtext x="0" y="52%" font="{light}" fontsize="6%" color="{clrWhite}" text="Luftfeuchtigkeit: {humidity} %" />
<drawtext x="0" y="58%" font="{light}" fontsize="6%" color="{clrWhite}" text="Windgeschwindigkeit: {windspeed} km/h" />
<drawtext x="0" y="64%" font="{light}" fontsize="6%" color="{clrWhite}" text="Windrichtung: {windbearingstring} ({windbearing} °)" />
<drawtext x="0" y="70%" font="{light}" fontsize="6%" color="{clrWhite}" text="Bewölkung: {cloudcover} %" />
<drawtext x="0" y="76%" font="{light}" fontsize="6%" color="{clrWhite}" text="Luftdruck: {pressure} HPa" />
<drawtext x="0" y="82%" font="{light}" fontsize="6%" color="{clrWhite}" text="Ozon: {ozone} DU" />
<drawtext x="0" y="88%" font="{light}" fontsize="6%" color="{clrWhite}" text="Sicht: {visibility} km" />
<drawtext x="0" y="34%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(apparenttemp)}: {apparenttemperature} °C" />
<drawtext x="0" y="40%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(precipitationprobability)}: {precipitationprobability} %" />
<drawtext x="0" y="46%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(precipitationintensity)}: {precipitationintensity} l/qm" />
<drawtext x="0" y="52%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(humidity)}: {humidity} %" />
<drawtext x="0" y="58%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(apparenttemp)}: {windspeed} km/h" />
<drawtext x="0" y="64%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(windbearing)}: {windbearingstring} ({windbearing} °)" />
<drawtext x="0" y="70%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(cloudcover)}: {cloudcover} %" />
<drawtext x="0" y="76%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(pressure)}: {pressure} HPa" />
<drawtext x="0" y="82%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(ozone)}: {ozone} DU" />
<drawtext x="0" y="88%" font="{light}" fontsize="6%" color="{clrWhite}" text="{tr(visibility)}: {visibility} km" />
</area>
<area condition="{ishourly}" x="51%" y="0" width="48%" height="100%" layer="3">
<loop name="hourly" x="0" y="0" orientation="vertical" columnwidth="{areawidth}" rowheight="{areaheight}/12" overflow="cut">

View File

@ -14,21 +14,6 @@
</area>
</header>
<detailheader>
<area x="0" y="0" width="100%" height="20%" layer="2">
<fill color="{clrTransBlueLight}" />
</area>
<area x="0" y="0" width="100%" height="20%" layer="3">
<drawtext x="20" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{menuheader}" />
</area>
<area x="{areawidth} - {areaheight}*0.2" y="0" width="{areaheight}*0.2" height="20%" layer="4">
<drawimage imagetype="icon" path="{icon}" align="center" valign="center" width="90%" height="90%"/>
</area>
<area x="{areawidth} - {areaheight}*0.6" y="0" width="{areaheight}*0.35" height="20%" layer="4">
<drawtext align="right" valign="center" font="{light}" fontsize="90%" color="{clrWhite}" text="{temperature}°C" />
</area>
</detailheader>
<datetime>
<area x="0" y="0" width="1" height="1" layer="1">
<fill color="{clrTransparent}" />
@ -48,19 +33,54 @@
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrWhite}" />
</area>
</scrollbar>
<!-- Available Variables in detailheader and tab:
{menuheader} "Current Weather"
{timestamp} timestamp in hh:mm dd.mm of current forecast
{temperature} current temperature in °C
{apparenttemperature} apparent (felt) temperature in °C
{temperaturemin} minimum temperature the day in °C
{temperaturemax} maximum temperature the day in °C
{summary} short summary of current weather
{icon} path to use in <drawimage> to display appropriate weather icon
{precipitationintensity} precipitation intensity in l/qm
{precipitationprobability} precipitation probability in %
{precipitationtype} precipitation type (snow, ...)
{humidity} humidity in %
{windspeed} wind speed in km/h
{windbearing} wind bearing in degrees
{windbearingstring} wind bearing as human readable string (e.g NE, NNE, ...)
{visibility} visibility in km
{cloudcover} cloud cover in %
{pressure} pressure in HPa
{ozone} Ozone in DU (Dobson Unit)
-->
<detailheader>
<area x="0" y="0" width="100%" height="20%" layer="2">
<fill color="{clrTransBlueLight}" />
</area>
<area x="0" y="0" width="100%" height="20%" layer="3">
<drawtext x="20" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{menuheader}" />
</area>
<area x="{areawidth} - {areaheight}*0.2" y="0" width="{areaheight}*0.2" height="20%" layer="4">
<drawimage imagetype="icon" path="{icon}" align="center" valign="center" width="90%" height="90%"/>
</area>
<area x="{areawidth} - {areaheight}*0.6" y="0" width="{areaheight}*0.35" height="20%" layer="4">
<drawtext align="right" valign="center" font="{light}" fontsize="90%" color="{clrWhite}" text="{temperature}°C" />
</area>
</detailheader>
<tab name="current" x="2%" y="20%" width="94%" height="65%" layer="2" scrollheight="{areaheight}/4">
<drawtext x="0" y="0" font="{semibold}" fontsize="10%" color="{clrWhite}" text="Wetterlage: {summary}" />
<drawtext x="0" y="10%" font="{light}" fontsize="10%" color="{clrWhite}" text="Aktuelle Temperatur: {temperature}°C" />
<drawtext x="0" y="20%" font="{light}" fontsize="10%" color="{clrWhite}" text="Gefühlte Temperatur: {apparenttemperature}°C" />
<drawtext x="0" y="30%" font="{light}" fontsize="10%" color="{clrWhite}" text="heutiges Minimum: {mintemperature}°C, heutiges Maximum: {maxtemperature}°C" />
<drawtext x="0" y="40%" font="{light}" fontsize="10%" color="{clrWhite}" text="Niederschlagswahrscheinlichkeit: {precipitationprobability} %" />
<drawtext x="0" y="50%" font="{light}" fontsize="10%" color="{clrWhite}" text="Niederschlagsmenge: {precipitationintensity} l/qm" />
<drawtext x="0" y="60%" font="{light}" fontsize="10%" color="{clrWhite}" text="Luftfeuchtigkeit: {humidity} %" />
<drawtext x="0" y="70%" font="{light}" fontsize="10%" color="{clrWhite}" text="Windgeschwindigkeit: {windspeed} km/h aus {windbearingstring}" />
<drawtext x="0" y="80%" font="{light}" fontsize="10%" color="{clrWhite}" text="Sicht: {visibility} km" />
<drawtext x="0" y="90%" font="{light}" fontsize="10%" color="{clrWhite}" text="Bewölkung: {cloudcover} %" />
<drawtext x="0" y="100%" font="{light}" fontsize="10%" color="{clrWhite}" text="Luftdruck: {pressure} HPa" />
<drawtext x="0" y="110%" font="{light}" fontsize="10%" color="{clrWhite}" text="Ozon: {ozone} DU" />
<drawtext x="0" y="0" font="{semibold}" fontsize="10%" color="{clrWhite}" text="{tr(conditions)}: {summary}" />
<drawtext x="0" y="10%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(temp)}: {temperature}°C" />
<drawtext x="0" y="20%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(apparenttemp)}: {apparenttemperature}°C" />
<drawtext x="0" y="30%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(todaymin)}: {mintemperature}°C, {tr(todaymax)}: {maxtemperature}°C" />
<drawtext x="0" y="40%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(precipitationprobability)}: {precipitationprobability} %" />
<drawtext x="0" y="50%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(precipitationintensity)}: {precipitationintensity} l/qm" />
<drawtext x="0" y="60%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(humidity)}: {humidity} %" />
<drawtext x="0" y="70%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(windspeed)}: {windspeed} km/h aus {windbearingstring}" />
<drawtext x="0" y="80%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(visibility)}: {visibility} km" />
<drawtext x="0" y="90%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(cloudcover)}: {cloudcover} %" />
<drawtext x="0" y="100%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(pressure)}: {pressure} HPa" />
<drawtext x="0" y="110%" font="{light}" fontsize="10%" color="{clrWhite}" text="{tr(ozone)}: {ozone} DU" />
</tab>
</menuplugin>

View File

@ -14,21 +14,6 @@
</area>
</header>
<detailheader>
<area x="0" y="0" width="100%" height="20%" layer="2">
<fill color="{clrTransBlueLight}" />
</area>
<area x="0" y="0" width="100%" height="20%" layer="3">
<drawtext x="20" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{menuheader}" />
</area>
<area x="{areawidth} - {areaheight}*0.2" y="0" width="{areaheight}*0.2" height="20%" layer="4">
<drawimage imagetype="icon" path="{icon}" align="center" valign="center" width="90%" height="90%"/>
</area>
<area x="{areawidth} - {areaheight}*0.6" y="0" width="{areaheight}*0.35" height="20%" layer="4">
<drawtext align="right" valign="center" font="{light}" fontsize="90%" color="{clrWhite}" text="{temperature}°C" />
</area>
</detailheader>
<datetime>
<area x="0" y="0" width="1" height="1" layer="1">
<fill color="{clrTransparent}" />
@ -49,18 +34,54 @@
</area>
</scrollbar>
<!-- Available Variables in detailheader and tab:
{summary} short summary of weather
{icon} path to use in <drawimage> to display appropriate weather icon
{daily[day]} day of forecast in dd.mm
{daily[dayname]} three letter abbrivated day name
{daily[temperaturemin]} minimum temperature at this day in °C
{daily[temperaturemintime]} time of minimum temperature
{daily[temperaturemax]} maximum temperature at this day in °C
{daily[temperaturemaxtime]} time of maximum temperature
{daily[summary]} short summary
{daily[icon]} path to use in <drawimage> to display appropriate weather icon
{daily[precipitationintensity]} precipitation intensity in l/qm
{daily[precipitationprobability]} precipitation probability in %
{daily[precipitationtype]} precipitation type (snow, ...)
{daily[humidity]} humidity in %
{daily[windspeed]} wind speed in km/h
{daily[windbearing]} wind bearing in degrees
{daily[windbearingstring]} wind bearing as human readable string (e.g NE, NNE, ...)
{daily[visibility]} visibility in km
{daily[cloudcover]} cloud cover in %
{daily[pressure]} pressure in HPa
{daily[ozone]} Ozone in DU (Dobson Unit)
-->
<detailheader>
<area x="0" y="0" width="100%" height="20%" layer="2">
<fill color="{clrTransBlueLight}" />
</area>
<area x="0" y="0" width="100%" height="20%" layer="3">
<drawtext x="20" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{menuheader}" />
</area>
<area x="{areawidth} - {areaheight}*0.2" y="0" width="{areaheight}*0.2" height="20%" layer="4">
<drawimage imagetype="icon" path="{icon}" align="center" valign="center" width="90%" height="90%"/>
</area>
</detailheader>
<tab name="current" x="2%" y="20%" width="94%" height="65%" layer="2" scrollheight="{areaheight}/4">
<drawtext x="0" y="0" font="{semibold}" fontsize="10%" color="{clrWhite}" text="Wetterlage: {summary}" />
<drawtext x="0" y="10%" font="{light}" fontsize="10%" color="{clrWhite}" text="Aktuelle Temperatur: {temperature}°C" />
<drawtext x="0" y="20%" font="{light}" fontsize="10%" color="{clrWhite}" text="Gefühlte Temperatur: {apparenttemperature}°C" />
<drawtext x="0" y="30%" font="{light}" fontsize="10%" color="{clrWhite}" text="heutiges Minimum: {mintemperature}°C, heutiges Maximum: {maxtemperature}°C" />
<drawtext x="0" y="40%" font="{light}" fontsize="10%" color="{clrWhite}" text="Niederschlagswahrscheinlichkeit: {precipitationprobability} %" />
<drawtext x="0" y="50%" font="{light}" fontsize="10%" color="{clrWhite}" text="Niederschlagsmenge: {precipitationintensity} l/qm" />
<drawtext x="0" y="60%" font="{light}" fontsize="10%" color="{clrWhite}" text="Luftfeuchtigkeit: {humidity} %" />
<drawtext x="0" y="70%" font="{light}" fontsize="10%" color="{clrWhite}" text="Windgeschwindigkeit: {windspeed} km/h aus {windbearingstring}" />
<drawtext x="0" y="80%" font="{light}" fontsize="10%" color="{clrWhite}" text="Sicht: {visibility} km" />
<drawtext x="0" y="90%" font="{light}" fontsize="10%" color="{clrWhite}" text="Bewölkung: {cloudcover} %" />
<drawtext x="0" y="100%" font="{light}" fontsize="10%" color="{clrWhite}" text="Luftdruck: {pressure} HPa" />
<drawtext x="0" y="110%" font="{light}" fontsize="10%" color="{clrWhite}" text="Ozon: {ozone} DU" />
<drawtextbox name="summary" x="0" y="5%" width="{areawidth}" font="{semibold}" fontsize="10%" color="{clrWhite}" text="{summary}" />
<drawrectangle x="0" y="{height(summary)}" width="{areawidth}" height="1" color="{clrWhite}" />
<loop name="daily" x="0" y="{height(summary)}" orientation="vertical" columnwidth="{areawidth}" rowheight="{areaheight}/5">
<drawtext x="0" font="{semibold}" fontsize="9%" valign="center" color="{clrWhite}" text="{daily[dayname]} {daily[day]}" />
<drawimage imagetype="icon" path="{daily[icon]}" x="2*{rowheight}" valign="center" width="{rowheight}*0.8" height="{rowheight}*0.8"/>
<drawtext x="3.5*{rowheight}" font="{light}" fontsize="{rowheight}*0.3" y="0" color="{clrWhite}" text="{daily[temperaturemin]}°C - {daily[temperaturemax]}°C ({tr(max)} {daily[temperaturemaxtime]}, {tr(min)} {daily[temperaturemintime]})" />
<drawtext x="3.5*{rowheight}" font="{light}" fontsize="{rowheight}/4" y="{rowheight}*0.25" width="{columnwidth} - 3.5*{rowheight}" color="{clrWhite}" text="{daily[summary]}" />
<drawtext x="3.5*{rowheight}" font="{light}" fontsize="{rowheight}/4" y="{rowheight}*0.5" width="{columnwidth} - 3.5*{rowheight}" color="{clrWhite}" text="{tr(precipitationprobability)} {daily[precipitationprobability]}%, {daily[precipitationintensity]} l/qm, {tr(windspeed)} {daily[windspeed]} km/h {tr(from)} {daily[windbearingstring]}" />
<drawtext x="3.5*{rowheight}" font="{light}" fontsize="{rowheight}/4" y="{rowheight}*0.75" width="{columnwidth} - 3.5*{rowheight}" color="{clrWhite}" text="{tr(cloudcover)} {daily[cloudcover]}%, {tr(visibility)} {daily[visibility]} km, {tr(pressure)} {daily[pressure]} HPa, {tr(ozone)} {daily[ozone]} DU" />
<drawrectangle x="0" y="{rowheight} - 1" width="{columnwidth}" height="1" color="{clrWhite}" />
</loop>
</tab>
</menuplugin>

View File

@ -14,21 +14,6 @@
</area>
</header>
<detailheader>
<area x="0" y="0" width="100%" height="20%" layer="2">
<fill color="{clrTransBlueLight}" />
</area>
<area x="0" y="0" width="100%" height="20%" layer="3">
<drawtext x="20" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{menuheader}" />
</area>
<area x="{areawidth} - {areaheight}*0.2" y="5" width="{areaheight}*0.2" height="20%" layer="4">
<drawimage imagetype="icon" path="{icon}" align="center" y="0" width="70%" height="70%"/>
</area>
<area x="0" y="0" width="100%" height="20%" layer="4">
<drawtext align="right" valign="bottom" font="{light}" fontsize="25%" color="{clrWhite}" text="{summary}" />
</area>
</detailheader>
<datetime>
<area x="0" y="0" width="1" height="1" layer="1">
<fill color="{clrTransparent}" />
@ -48,15 +33,53 @@
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrWhite}" />
</area>
</scrollbar>
<!-- Available Variables in detailheader and tab:
{summary} short summary of weather
{icon} path to use in <drawimage> to display appropriate weather icon
{hourly[]} array with up to 48 hourly forecasts
{hourly[num]} number of forecast, starting at 1
{hourly[timestamp]} timestamp in hh:mm
{hourly[temperature]} temperature in °C
{hourly[apparenttemperature]} apparent (felt) temperature in °C
{hourly[summary]} short summary
{hourly[icon]} path to use in <drawimage> to display appropriate weather icon
{hourly[precipitationintensity]} precipitation intensity in l/qm
{hourly[precipitationprobability]} precipitation probability in %
{hourly[precipitationtype]} precipitation type (snow, ...)
{hourly[humidity]} humidity in %
{hourly[windspeed]} wind speed in km/h
{hourly[windbearing]} wind bearing in degrees
{hourly[windbearingstring]} wind bearing as human readable string (e.g NE, NNE, ...)
{hourly[visibility]} visibility in km
{hourly[cloudcover]} cloud cover in %
{hourly[pressure]} pressure in HPa
{hourly[ozone]} Ozone in DU (Dobson Unit)
-->
<detailheader>
<area x="0" y="0" width="100%" height="20%" layer="2">
<fill color="{clrTransBlueLight}" />
</area>
<area x="0" y="0" width="100%" height="20%" layer="3">
<drawtext x="20" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{menuheader}" />
</area>
<area x="{areawidth} - {areaheight}*0.2" y="0" width="{areaheight}*0.2" height="20%" layer="4">
<drawimage imagetype="icon" path="{icon}" align="center" valign="center" width="70%" height="70%"/>
</area>
</detailheader>
<tab name="current" x="2%" y="20%" width="94%" height="65%" layer="2" scrollheight="{areaheight}/4">
<loop name="hourly" x="0" y="0" orientation="vertical" columnwidth="{areawidth}" rowheight="{areaheight}/5">
<drawtextbox name="summary" x="0" y="5%" width="{areawidth}" font="{semibold}" fontsize="10%" color="{clrWhite}" text="{summary}" />
<drawrectangle x="0" y="{height(summary)}" width="{areawidth}" height="1" color="{clrWhite}" />
<loop name="hourly" x="0" y="{height(summary)}" orientation="vertical" columnwidth="{areawidth}" rowheight="{areaheight}/5">
<drawtext x="0" font="{semibold}" fontsize="9%" valign="center" color="{clrWhite}" text="{hourly[timestamp]}" />
<drawimage imagetype="icon" path="{hourly[icon]}" x="{rowheight}" valign="center" width="{rowheight}*0.8" height="{rowheight}*0.8"/>
<drawtext name="temp" x="2*{rowheight} + 0.75*{rowheight} - {width(temp)}/2" font="{light}" fontsize="13%" y="0" color="{clrWhite}" text="{hourly[temperature]}°C" />
<drawtext name="felt" x="2*{rowheight} + 0.75*{rowheight} - {width(felt)}/2" font="{light}" fontsize="6%" y="{rowheight}*0.6" color="{clrWhite}" text="felt {hourly[apparenttemperature]}°C" />
<drawtext x="4*{rowheight}" font="{light}" fontsize="8%" y="0" width="{columnwidth} - 4*{rowheight}" color="{clrWhite}" text="{hourly[summary]}" />
<drawtext x="4*{rowheight}" font="{light}" fontsize="8%" y="{rowheight}/2" width="{columnwidth} - 4*{rowheight}" color="{clrWhite}" text="Precipitation {hourly[precipitationprobability]}%, {hourly[precipitationintensity]} l/qm, Wind {hourly[windspeed]} from {hourly[windbearingstring]}" />
<drawtext name="felt" x="2*{rowheight} + 0.75*{rowheight} - {width(felt)}/2" font="{light}" fontsize="6%" y="{rowheight}*0.6" color="{clrWhite}" text="{tr(felt)} {hourly[apparenttemperature]}°C" />
<drawtext x="4*{rowheight}" font="{light}" fontsize="{rowheight}/3" y="0" width="{columnwidth} - 4*{rowheight}" color="{clrWhite}" text="{hourly[summary]}" />
<drawtext x="4*{rowheight}" font="{light}" fontsize="{rowheight}/3" y="{rowheight}/3" width="{columnwidth} - 4*{rowheight}" color="{clrWhite}" text="{tr(precipitationprobability)} {hourly[precipitationprobability]}%, {hourly[precipitationintensity]} l/qm" />
<drawtext x="4*{rowheight}" font="{light}" fontsize="{rowheight}/3" y="{rowheight}*2/3" width="{columnwidth} - 4*{rowheight}" color="{clrWhite}" text="{tr(windspeed)} {hourly[windspeed]} km/h {tr(from)} {hourly[windbearingstring]}" />
<drawrectangle x="0" y="{rowheight} - 1" width="{columnwidth}" height="1" color="{clrWhite}" />
</loop>
</tab>