Skip to content

Commit

Permalink
fix: iso639 language code 'eng' should convert to country+language co…
Browse files Browse the repository at this point in the history
…de 'en_GB' instead of 'en_EN'
  • Loading branch information
MLenterman committed Aug 23, 2024
1 parent cdfdc04 commit 5775b26
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion e2e/SoapUI/openforms2bpel-e2e-soapui-project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20677,7 +20677,7 @@ project.getRestMockServiceByName("Objects API Mock").getMockRunner().stop();</sc
<con:testStep type="properties" name="Properties" id="5c265a92-0f00-4689-b308-e637ef2e45a7">
<con:settings/>
<con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<con:target>C:/Projects/openforms2bpel/e2e/SoapUI/test</con:target>
<con:target/>
<con:properties>
<con:property>
<con:name>caseReferenceNumber</con:name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<xsl:stylesheet exclude-result-prefixes="#all" version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" />
<xsl:mode on-no-match="deep-skip" on-multiple-match="fail" />
<xsl:strip-space elements="*"/>

<xsl:param name="Alpha2" select="''" as="xs:string" />
<xsl:param name="Alpha3" select="''" as="xs:string" />

<xsl:template match="/">
<xsl:choose>
<xsl:when test="$Alpha3 = 'eng'"><xsl:value-of select="'en_GB'" /></xsl:when>
<xsl:otherwise><xsl:value-of select="concat(concat($Alpha2, '_'), upper-case($Alpha2))" /></xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,27 @@
>
</IbisLocalSender>
<Param name="Alpha3" sessionKey="ZgwEnkelvoudigInformatieObject" xpathExpression="//taal" />
<Forward name="success" path="EnrichZgwEnkelvoudigInformatieObject" />
<Forward name="success" path="ConvertISO639ToCountryAndLanguageCode" />
</SenderPipe>

<XsltPipe
name="ConvertISO639ToCountryAndLanguageCode"
getInputFromFixedValue="&lt;dummy/&gt;"
styleSheetName="Common/xsl/Alpha2ToCountryAndLanguageCode.xslt"
storeResultInSessionKey="CountryAndLanguageCode"
>
<Param name="Alpha3" sessionKey="ZgwEnkelvoudigInformatieObject" xpathExpression="//taal" />
<Param name="Alpha2" sessionKey="Alpha2" />
<Forward name="success" path="EnrichZgwEnkelvoudigInformatieObject"/>
</XsltPipe>

<XsltPipe
name="EnrichZgwEnkelvoudigInformatieObject"
getInputFromSessionKey="ZgwEnkelvoudigInformatieObject"
styleSheetName="Zgw/Documenten/Model/ZgwEnkelvoudigInformatieObject.xslt"
storeResultInSessionKey="ZgwEnkelvoudigInformatieObject"
>
<Param name="Taal" xpathExpression="concat(concat($Alpha2, '_'), upper-case($Alpha2))">
<Param name="Alpha2" sessionKey="Alpha2" />
</Param>
<Param name="Taal" sessionKey="CountryAndLanguageCode" />
<Forward name="success" path="SelectDocumentStateSender"/>
</XsltPipe>

Expand Down

0 comments on commit 5775b26

Please sign in to comment.