aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/MacDive.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-03-06 19:11:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-07 10:27:20 -0800
commita9cc7f9b10017d2fe3d95bf19d1e9c2389631ef9 (patch)
treeca8b41c48bc42461cd65de1c0052aab15354e37c /xslt/MacDive.xslt
parent2120bc3a9e1729b3d7374725260f5e8603d9fa4f (diff)
downloadsubsurface-a9cc7f9b10017d2fe3d95bf19d1e9c2389631ef9.tar.gz
Fix import when locale set to decimal comma
This should take care of locale caused problems when the input uses decimal point but locale uses decimal comma. Also the sample I have of Suunto DM3 format weight is represented with comma instead of dot so converting that as well. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/MacDive.xslt')
-rw-r--r--xslt/MacDive.xslt10
1 files changed, 5 insertions, 5 deletions
diff --git a/xslt/MacDive.xslt b/xslt/MacDive.xslt
index 8faa429b1..e9ad9a801 100644
--- a/xslt/MacDive.xslt
+++ b/xslt/MacDive.xslt
@@ -395,7 +395,7 @@
<xsl:choose>
<xsl:when test="$units = 'Imperial'">
- <xsl:value-of select="concat(($number div 14.5037738007), ' bar')"/>
+ <xsl:value-of select="concat(format-number(($number div 14.5037738007), '#.##'), ' bar')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($number, ' bar')"/>
@@ -412,13 +412,13 @@
<xsl:param name="units"/>
<xsl:variable name="size">
- <xsl:value-of select="$singleSize + $singleSize * $double"/>
+ <xsl:value-of select="format-number($singleSize + $singleSize * $double, '#.##')"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$units = 'Imperial'">
<xsl:if test="$pressure != '0'">
- <xsl:value-of select="concat((($size * 14.7 div $pressure) div 0.035315), ' l')"/>
+ <xsl:value-of select="concat(format-number((($size * 14.7 div $pressure) div 0.035315), '#.##'), ' l')"/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
@@ -462,7 +462,7 @@
<xsl:choose>
<xsl:when test="$units = 'Imperial'">
- <xsl:value-of select="concat(($depth * 0.3048), ' m')"/>
+ <xsl:value-of select="concat(format-number(($depth * 0.3048), '#.##'), ' m')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($depth, ' m')"/>
@@ -480,7 +480,7 @@
<xsl:when test="$weight &gt; 0">
<xsl:choose>
<xsl:when test="$units = 'Imperial'">
- <xsl:value-of select="concat(($weight * 0.453592), ' kg')"/>
+ <xsl:value-of select="concat(format-number(($weight * 0.453592), '#.##'), ' kg')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($weight, ' kg')"/>