Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve french translation #23

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/css/bootstrap.min.css

Large diffs are not rendered by default.

71 changes: 68 additions & 3 deletions src/index.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#else if $name == 'windSpeed'

<i class="wi wi-wind from-$current.windDir.formatted-deg"
<i class="wi wi-wind towards-$current.windDir.formatted-deg"
title="$current.windDir.formatted°" data-toggle="tooltip"></i>

#end if
Expand All @@ -54,7 +54,7 @@
</div>
<div class="col-3 text-muted font-small hi-text">
$day.wind.max $day.wind.gustdir.ordinal_compass <br>
<i class="wi wi-wind from-$day.wind.gustdir.formatted-deg mr-2"
<i class="wi wi-wind towards-$day.wind.gustdir.formatted-deg mr-2"
title="$day.wind.gustdir.formatted°" data-toggle="tooltip"></i>
($day.wind.maxtime.format($Extras.Formatting.datetime_today))
</div>
Expand Down Expand Up @@ -266,6 +266,71 @@ new ApexCharts(document.querySelector('#$id'), {

#end def

## +-------------------------------------------------------------------------+
## | Get JavaScript code for a chart with extra values in tooltips |
## | |
## | string $name the name of the database field (e.g. windSpeed) |
## | string $nameE the name of the extra field (e.g. windDir) |
## | string $id the ID of the chart target (without hash) |
## | string $type type of chart (area, bar, radar) |
## | string $series1 field name for (1st) series (e.g. windSpeed) |
## | string $seriesE1 field name for series paired with first (e.g. windDir |
## | string $series2 opt. field name for 2nd series (e.g. windGust or "")|
## | string $seriesE2 opt. field name for 4th series (e.g. windDir or "") |
## | string $column the column of the display value (e.g. min, max, avg) |
## +-------------------------------------------------------------------------+

#def getChartJsCodeExtraTooltips($name, $nameE, $id, $type, $series1, $seriesE1, $series2 = "", $seriesE2 = "", $column = "avg")

## Only add JS chart code if in array
#if $name in $Extras.Appearance.charts_order

new ApexCharts(document.querySelector('#$id'), {
...graph_${type}_config,
yaxis: {
labels: {
formatter: function (val) {
return formatNumber(val, "$getVar('unit.format.' + name)") + "$getVar('unit.label.' + name)";
}
}
},
tooltip: {
y: {
formatter: function(value, { series, seriesIndex, dataPointIndex, w }) {
return formatNumber(value, "$getVar('unit.format.' + name)") + "$getVar('unit.label.' + name)" + " " + formatNumber(w.config.seriesE[seriesIndex].data[dataPointIndex][1], "$getVar('unit.format.' + nameE)") + "$getVar('unit.label.' + nameE)";
}
}
},
series: [
{
name: "$getVar('obs.label.' + series1)",
data: [ $getChartData(series1, column) ]
}
#if $series2 != "" and $getVar('day.' + series2 + '.has_data')
,{
name: "$getVar('obs.label.' + series2)",
data: [ $getChartData(series2, column) ]
}
#end if
],
seriesE: [
{
name: "$getVar('obs.label.' + seriesE1)",
data: [ $getChartData(seriesE1, column) ]
}
#if $seriesE2 != "" and $getVar('day.' + seriesE2 + '.has_data')
,{
name: "$getVar('obs.label.' + seriesE2)",
data: [ $getChartData(seriesE2, column) ]
}
#end if
]
}).render()

#end if

#end def

## +-------------------------------------------------------------------------+
## | Chart definitions |
## +-------------------------------------------------------------------------+
Expand Down Expand Up @@ -301,7 +366,7 @@ new ApexCharts(document.querySelector('#$id'), {
$getChartJsCode("rain", "rainchart", "bar", "rain", "", "sum")

// Wind
$getChartJsCode("windSpeed", "windSpeedchart", "area", "windSpeed", "windGust", "max")
$getChartJsCodeExtraTooltips("windSpeed", "windDir", "windSpeedchart", "area", "windSpeed", "windDir", "windGust", "windGustDir", "max")

// outHumidity
$getChartJsCode("outHumidity", "outHumiditychart", "area", "outHumidity")
Expand Down
71 changes: 68 additions & 3 deletions src/month-%Y-%m.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$getVar('obs.label.' + name)
#if $name == 'windSpeed'

<i class="wi wi-wind from-$month.windDir.avg.formatted-deg"
<i class="wi wi-wind towards-$month.windDir.avg.formatted-deg"
title="$month.windDir.avg.formatted°" data-toggle="tooltip"></i>

#end if
Expand All @@ -38,7 +38,7 @@
</div>
<div class="col-3 text-muted font-small hi-text">
$month.wind.max $month.wind.gustdir.ordinal_compass <br>
<i class="wi wi-wind from-$month.wind.gustdir.formatted-deg mr-2"
<i class="wi wi-wind towards-$month.wind.gustdir.formatted-deg mr-2"
title="$month.wind.gustdir.formatted°" data-toggle="tooltip"></i>
($month.wind.maxtime.format($Extras.Formatting.datetime))
</div>
Expand Down Expand Up @@ -297,6 +297,71 @@ new ApexCharts(document.querySelector('#$id'), {

#end def

## +-------------------------------------------------------------------------+
## | Get JavaScript code for a chart with extra values in tooltips |
## | |
## | string $name the name of the database field (e.g. windSpeed) |
## | string $nameE the name of the extra field (e.g. windDir) |
## | string $id the ID of the chart target (without hash) |
## | string $type type of chart (area, bar, radar) |
## | string $series1 field name for (1st) series (e.g. windSpeed) |
## | string $seriesE1 field name for series paired with first (e.g. windDir |
## | string $series2 opt. field name for 2nd series (e.g. windGust or "")|
## | string $seriesE2 opt. field name for 4th series (e.g. windDir or "") |
## | string $column the column of the display value (e.g. min, max, avg) |
## +-------------------------------------------------------------------------+

#def getChartJsCodeExtraTooltips($name, $nameE, $id, $type, $series1, $seriesE1, $series2 = "", $seriesE2 = "", $column = "avg")

## Only add JS chart code if in array
#if $name in $Extras.Appearance.charts_order

new ApexCharts(document.querySelector('#$id'), {
...graph_${type}_config,
yaxis: {
labels: {
formatter: function (val) {
return formatNumber(val, "$getVar('unit.format.' + name)") + "$getVar('unit.label.' + name)";
}
}
},
tooltip: {
y: {
formatter: function(value, { series, seriesIndex, dataPointIndex, w }) {
return formatNumber(value, "$getVar('unit.format.' + name)") + "$getVar('unit.label.' + name)" + " " + formatNumber(w.config.seriesE[seriesIndex].data[dataPointIndex][1], "$getVar('unit.format.' + nameE)") + "$getVar('unit.label.' + nameE)";
}
}
},
series: [
{
name: "$getVar('obs.label.' + series1)",
data: [ $getChartData(series1, column) ]
}
#if $series2 != "" and $getVar('day.' + series2 + '.has_data')
,{
name: "$getVar('obs.label.' + series2)",
data: [ $getChartData(series2, column) ]
}
#end if
],
seriesE: [
{
name: "$getVar('obs.label.' + seriesE1)",
data: [ $getChartData(seriesE1, column) ]
}
#if $seriesE2 != "" and $getVar('day.' + seriesE2 + '.has_data')
,{
name: "$getVar('obs.label.' + seriesE2)",
data: [ $getChartData(seriesE2, column) ]
}
#end if
]
}).render()

#end if

#end def

## +-------------------------------------------------------------------------+
## | Chart definitions |
## +-------------------------------------------------------------------------+
Expand Down Expand Up @@ -332,7 +397,7 @@ new ApexCharts(document.querySelector('#$id'), {
$getChartJsCode("rain", "rainchart", "bar", "rain", "", "sum")

// Wind
$getChartJsCode("windSpeed", "windSpeedchart", "area", "windSpeed", "windGust", "max")
$getChartJsCodeExtraTooltips("windSpeed", "windDir", "windSpeedchart", "area", "windSpeed", "windDir", "windGust", "windGustDir", "max")

// outHumidity
$getChartJsCode("outHumidity", "outHumiditychart", "area", "outHumidity")
Expand Down
71 changes: 68 additions & 3 deletions src/month.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$getVar('obs.label.' + name)
#if $name == 'windSpeed'

<i class="wi wi-wind from-$month.windDir.avg.formatted-deg"
<i class="wi wi-wind towards-$month.windDir.avg.formatted-deg"
title="$month.windDir.avg.formatted°" data-toggle="tooltip"></i>

#end if
Expand All @@ -38,7 +38,7 @@
</div>
<div class="col-3 text-muted font-small hi-text">
$month.wind.max $month.wind.gustdir.ordinal_compass <br>
<i class="wi wi-wind from-$month.wind.gustdir.formatted-deg mr-2"
<i class="wi wi-wind towards-$month.wind.gustdir.formatted-deg mr-2"
title="$month.wind.gustdir.formatted°" data-toggle="tooltip"></i>
($month.wind.maxtime.format($Extras.Formatting.datetime))
</div>
Expand Down Expand Up @@ -248,6 +248,71 @@ new ApexCharts(document.querySelector('#$id'), {

#end def

## +-------------------------------------------------------------------------+
## | Get JavaScript code for a chart with extra values in tooltips |
## | |
## | string $name the name of the database field (e.g. windSpeed) |
## | string $nameE the name of the extra field (e.g. windDir) |
## | string $id the ID of the chart target (without hash) |
## | string $type type of chart (area, bar, radar) |
## | string $series1 field name for (1st) series (e.g. windSpeed) |
## | string $seriesE1 field name for series paired with first (e.g. windDir |
## | string $series2 opt. field name for 2nd series (e.g. windGust or "")|
## | string $seriesE2 opt. field name for 4th series (e.g. windDir or "") |
## | string $column the column of the display value (e.g. min, max, avg) |
## +-------------------------------------------------------------------------+

#def getChartJsCodeExtraTooltips($name, $nameE, $id, $type, $series1, $seriesE1, $series2 = "", $seriesE2 = "", $column = "avg")

## Only add JS chart code if in array
#if $name in $Extras.Appearance.charts_order

new ApexCharts(document.querySelector('#$id'), {
...graph_${type}_config,
yaxis: {
labels: {
formatter: function (val) {
return formatNumber(val, "$getVar('unit.format.' + name)") + "$getVar('unit.label.' + name)";
}
}
},
tooltip: {
y: {
formatter: function(value, { series, seriesIndex, dataPointIndex, w }) {
return formatNumber(value, "$getVar('unit.format.' + name)") + "$getVar('unit.label.' + name)" + " " + formatNumber(w.config.seriesE[seriesIndex].data[dataPointIndex][1], "$getVar('unit.format.' + nameE)") + "$getVar('unit.label.' + nameE)";
}
}
},
series: [
{
name: "$getVar('obs.label.' + series1)",
data: [ $getChartData(series1, column) ]
}
#if $series2 != "" and $getVar('day.' + series2 + '.has_data')
,{
name: "$getVar('obs.label.' + series2)",
data: [ $getChartData(series2, column) ]
}
#end if
],
seriesE: [
{
name: "$getVar('obs.label.' + seriesE1)",
data: [ $getChartData(seriesE1, column) ]
}
#if $seriesE2 != "" and $getVar('day.' + seriesE2 + '.has_data')
,{
name: "$getVar('obs.label.' + seriesE2)",
data: [ $getChartData(seriesE2, column) ]
}
#end if
]
}).render()

#end if

#end def

## +-------------------------------------------------------------------------+
## | Chart definitions |
## +-------------------------------------------------------------------------+
Expand Down Expand Up @@ -283,7 +348,7 @@ new ApexCharts(document.querySelector('#$id'), {
$getChartJsCode("rain", "rainchart", "bar", "rain", "", "sum")

// Wind
$getChartJsCode("windSpeed", "windSpeedchart", "area", "windSpeed", "windGust", "max")
$getChartJsCodeExtraTooltips("windSpeed", "windDir", "windSpeedchart", "area", "windSpeed", "windDir", "windGust", "windGustDir", "max")

// outHumidity
$getChartJsCode("outHumidity", "outHumiditychart", "area", "outHumidity")
Expand Down
16 changes: 8 additions & 8 deletions src/skin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#
# Available: en, ca, de, es, fi, fr, it
#
language = en
language = fr

# Color of your skin
# -------------------------------------------------------------------------
Expand Down Expand Up @@ -196,13 +196,13 @@
[[Appearance]]

# The order of values cards (left column)
values_order = outTemp, outHumidity, barometer, windSpeed, rain, snowDepth, dewpoint, windchill, heatindex, inTemp, inHumidity, UV, ET, radiation, appTemp, cloudbase, extraTemp1, extraHumid1, extraTemp2, extraHumid2, extraTemp3, extraHumid3, extraTemp4, extraHumid4, extraTemp5, extraHumid5, extraTemp6, extraHumid6, extraTemp7, extraHumid7, extraTemp8, extraHumid8
values_order = outTemp, outHumidity, barometer, windSpeed, rain, snowDepth, dewpoint, windchill, heatindex, inTemp, inHumidity, UV, ET, radiation, appTemp, extraTemp1, extraHumid1, extraTemp2, extraHumid2, extraTemp3, extraHumid3, extraTemp4, extraHumid4, extraTemp5, extraHumid5, extraTemp6, extraHumid6, extraTemp7, extraHumid7, extraTemp8, extraHumid8

# The order of chart cards (right column)
charts_order = outTemp, windchill, barometer, rain, snowDepth, windSpeed, windvec, UV, ET, radiation, outHumidity, inTemp, inHumidity, appTemp, cloudbase, extraTemp1, extraHumid1, extraTemp2, extraHumid2, extraTemp3, extraHumid3, extraTemp4, extraHumid4, extraTemp5, extraHumid5, extraTemp6, extraHumid6, extraTemp7, extraHumid7, extraTemp8, extraHumid8
charts_order = outTemp, windchill, barometer, rain, snowDepth, windSpeed, windvec, UV, ET, radiation, outHumidity, inTemp, inHumidity, appTemp, extraTemp1, extraHumid1, extraTemp2, extraHumid2, extraTemp3, extraHumid3, extraTemp4, extraHumid4, extraTemp5, extraHumid5, extraTemp6, extraHumid6, extraTemp7, extraHumid7, extraTemp8, extraHumid8

# The order of cards on telemetry page
telemetry_order = rxCheckPercent, txBatteryStatus, windBatteryStatus, rainBatteryStatus, outTempBatteryStatus, inTempBatteryStatus, consBatteryVoltage, heatingVoltage, supplyVoltage, referenceVoltage, extraBatteryStatus1, extraBatteryStatus2, extraBatteryStatus3, extraBatteryStatus4, extraBatteryStatus5, extraBatteryStatus6, extraBatteryStatus7, extraBatteryStatus8
telemetry_order = CPUtemp, CPUvoltage, CPUcurrent, consBatteryVoltage, consBatteryCurrent, consBatteryTemp, supplyVoltage

# Show trend arrow with tooltip at these values on the "current" page
show_trend_on = barometer, outTemp, outHumidity, inTemp, inHumidity, UV
Expand Down Expand Up @@ -534,7 +534,7 @@
max = Max
avg = Moyen
min = Min
trend = Trend
trend = Tendance
about = Info
hardware = Hardware
altitude = Altitude
Expand All @@ -552,13 +552,13 @@
currently = Actuellement
next_new_moon = Prochaine nouvelle lune
next_full_moon = Prochaine pleine lune
vernal_equinox = Èquinoxe vernal
vernal_equinox = Équinoxe de printemps
summer_solstice = Solstice d'été
autumnal_equinox = Èquinoxe d'automne
autumnal_equinox = Équinoxe d'automne
winter_solstice = Solstice d'hiver
mars = Mars
venus = Venus
saturn = Saturn
saturn = Saturne
jupiter = Jupiter
telemetry = Télémétrie
hemispheres = N, NE, E, SE, S, SO, O, NO
Expand Down
14 changes: 7 additions & 7 deletions src/telemetry.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
## +-------------------------------------------------------------------------+

#def valuesCard($name)
#if $getVar('day.' + name + '.has_data') and $getVar('day.' + name + '.max.raw') > 0
#if $getVar('week.' + name + '.has_data') and $getVar('week.' + name + '.max.raw') > 0
<div class="col-12 col-lg-6 mb-4">
<div class="card">
<div class="card-body text-center">
<h5 class="h5-responsive $Extras.color-text">$getVar('obs.label.' + name)</h5>

<div class="row">
<div class="col-3 text-muted font-small lo-text">
$getVar('day.' + name + '.min') <br>
($getVar('day.' + name + '.mintime').format($Extras.Formatting.datetime_today))
$getVar('week.' + name + '.min') <br>
($getVar('week.' + name + '.mintime').format($Extras.Formatting.datetime))
</div>
<div class="col-6">
<h4 class="h2-responsive">$getVar('current.' + name)</h4>
</div>
<div class="col-3 text-muted font-small hi-text">
$getVar('day.' + name + '.max') <br>
($getVar('day.' + name + '.maxtime').format($Extras.Formatting.datetime_today))
$getVar('week.' + name + '.max') <br>
($getVar('week.' + name + '.maxtime').format($Extras.Formatting.datetime))
</div>

<div class="col-12 mt-4">
Expand Down Expand Up @@ -89,7 +89,7 @@

#def getChartData($name, $column)
#set current_interval = int($Extras.Charts.current_timespan)
#for $record in $span($day_delta=1).spans(interval=current_interval)
#for $record in $span($day_delta=7).spans(interval=current_interval)
#try
#set val = $getattr($record, $name)
#set data = $getattr($val, $column).format(add_label=False, localize=False, None_string="null")
Expand All @@ -110,7 +110,7 @@

#def getChartJsCode($name, $series, $column = "avg")

#if $getVar('day.' + name + '.has_data') and $getVar('day.' + name + '.max.raw') > 0
#if $getVar('week.' + name + '.has_data') and $getVar('week.' + name + '.max.raw') > 0

new ApexCharts(document.querySelector('#$name-chart'), {
...graph_area_config,
Expand Down
Loading