1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

UDDF import: add support for decimal comma for depth

Depth values might apparently contain decimal comma instead of decimal
point with some locale settings. Thus add support for both of them.

Fixes 

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2018-07-10 19:48:42 +03:00 committed by Dirk Hohndel
parent dc2f0f8e48
commit 7103f36c7c

View file

@ -520,17 +520,17 @@
<xsl:choose>
<xsl:when test="depth != ''">
<xsl:attribute name="depth">
<xsl:value-of select="concat(format-number(depth, '0.00'), ' m')"/>
<xsl:value-of select="concat(format-number(translate(depth, ',', '.'), '0.00'), ' m')"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="u:depth|u1:depth != ''">
<xsl:attribute name="depth">
<xsl:value-of select="concat(format-number(u:depth|u1:depth, '0.00'), ' m')"/>
<xsl:value-of select="concat(format-number(translate(u:depth|u1:depth, ',', '.'), '0.00'), ' m')"/>
</xsl:attribute>
</xsl:when>
<xsl:when test=". != 0">
<xsl:attribute name="depth">
<xsl:value-of select="concat(format-number(., '0.00'), ' m')"/>
<xsl:value-of select="concat(format-number(translate(., ',', '.'), '0.00'), ' m')"/>
</xsl:attribute>
</xsl:when>
</xsl:choose>