CSV import: support for decimal comma on temperature

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2016-11-09 21:39:25 +02:00 committed by Dirk Hohndel
parent 50ea5ec296
commit c78bbf6883

View file

@ -290,10 +290,10 @@
<xsl:attribute name="temp"> <xsl:attribute name="temp">
<xsl:choose> <xsl:choose>
<xsl:when test="$units = 0"> <xsl:when test="$units = 0">
<xsl:value-of select="$temp"/> <xsl:value-of select="translate($temp, ',', '.')"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="concat(format-number(($temp - 32) * 5 div 9, '0.0'), ' C')"/> <xsl:value-of select="concat(format-number((translate($temp, ',', '.') - 32) * 5 div 9, '0.0'), ' C')"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute> </xsl:attribute>