[PATCH] Fix locale originating decimal point on import

Lubomir I. Ivanov neolit123 at gmail.com
Thu Mar 7 10:43:28 PST 2013


From: Miika Turkia <miika.turkia at gmail.com>

This should take care of the decimal point problem for tank size when
importing from divelogs.de. We have to keep formatting the numbers to
our liking before and after math operation.

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
This is just a single issue fixed, I bet there are more lurking in
there. If this really fixes the issue then I'll just go through all the
XSLTs and do the same in all required math operations.
---
 xslt/divelogs.xslt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xslt/divelogs.xslt b/xslt/divelogs.xslt
index 879fd3d..88b2420 100644
--- a/xslt/divelogs.xslt
+++ b/xslt/divelogs.xslt
@@ -94,7 +94,7 @@
         </xsl:attribute>
         <xsl:if test="CYLINDERSIZE != ''">
           <xsl:attribute name="size">
-            <xsl:value-of select="CYLINDERSIZE + CYLINDERSIZE * DBLTANK"/>
+	    <xsl:value-of select="format-number((format-number(CYLINDERSIZE, '#.##') + format-number(CYLINDERSIZE, '#.##') * DBLTANK), '#.##')"/>
           </xsl:attribute>
         </xsl:if>
         <xsl:if test="WORKINGPRESSURE > 0">
-- 
1.7.9.5



More information about the subsurface mailing list