Skip to content

Instantly share code, notes, and snippets.

@MartijnR
Created October 19, 2018 21:40
Show Gist options
  • Save MartijnR/b95cab2e11971cf7fca0f364d7b427b3 to your computer and use it in GitHub Desktop.
Save MartijnR/b95cab2e11971cf7fca0f364d7b427b3 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<h:html xmlns="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:jr="http://openrosa.org/javarosa"
xmlns:orx="http://openrosa.org/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>Enketo Bug 2</h:title>
<model>
<itext>
<translation default="true()" lang="default">
<text id="/aYD5RTTP7MunSpmCDEDorA/Single_select_question/option_2:label">
<value>Option 2</value>
</text>
<text id="/aYD5RTTP7MunSpmCDEDorA/Single_select_question:label">
<value>Single-select question</value>
</text>
<text id="/aYD5RTTP7MunSpmCDEDorA/This_sheet_demonstra_Then_change_language:label">
<value>This sheet demonstrates an Enketo bug where the 'autocomplete' appearance for a single/multi-select question breaks when the language is changed, and the form becomes impossible to complete. To demonstrate, please start typing 'Option' into the box below. The option list appears. Don't select anything yet from the list. Then change language.</value>
</text>
<text id="/aYD5RTTP7MunSpmCDEDorA/Single_select_question/option_1:label">
<value>Option 1</value>
</text>
</translation>
<translation lang="French (fr)">
<text id="/aYD5RTTP7MunSpmCDEDorA/Single_select_question/option_2:label">
<value>La Option 2</value>
</text>
<text id="/aYD5RTTP7MunSpmCDEDorA/Single_select_question:label">
<value>La Single-select question</value>
</text>
<text id="/aYD5RTTP7MunSpmCDEDorA/This_sheet_demonstra_Then_change_language:label">
<value>Now you are looking at the same form but in a different language. When you type into the box below, the option list no longer pops up and even if you have correctly typed the name of a possible option (such as 'Option 1') you cannot save it because you can't validate your typing by selecting the right entry from the list that hasn't appeared. If the question is mandatory, that means you can't complete the form.</value>
</text>
<text id="/aYD5RTTP7MunSpmCDEDorA/Single_select_question/option_1:label">
<value>La Option 1</value>
</text>
</translation>
</itext>
<instance>
<aYD5RTTP7MunSpmCDEDorA id="aYD5RTTP7MunSpmCDEDorA" version="vBsycjp3JvBwTxB6AHTwja">
<formhub>
<uuid/>
</formhub>
<start/>
<end/>
<This_sheet_demonstra_Then_change_language/>
<Single_select_question/>
<__version__/>
<meta>
<instanceID/>
</meta>
</aYD5RTTP7MunSpmCDEDorA>
</instance>
<bind jr:preload="timestamp" jr:preloadParams="start" nodeset="/aYD5RTTP7MunSpmCDEDorA/start" type="dateTime"/>
<bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/aYD5RTTP7MunSpmCDEDorA/end" type="dateTime"/>
<bind nodeset="/aYD5RTTP7MunSpmCDEDorA/This_sheet_demonstra_Then_change_language" readonly="true()" required="false()" type="string"/>
<bind nodeset="/aYD5RTTP7MunSpmCDEDorA/Single_select_question" required="true()" type="select1"/>
<bind calculate="'vBsycjp3JvBwTxB6AHTwja'" nodeset="/aYD5RTTP7MunSpmCDEDorA/__version__" type="string"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/aYD5RTTP7MunSpmCDEDorA/meta/instanceID" readonly="true()" type="string"/>
<bind calculate="'1642485881534386b8606e38d40c6045'" nodeset="/aYD5RTTP7MunSpmCDEDorA/formhub/uuid" type="string"/>
</model>
</h:head>
<h:body>
<input ref="/aYD5RTTP7MunSpmCDEDorA/This_sheet_demonstra_Then_change_language">
<label ref="jr:itext('/aYD5RTTP7MunSpmCDEDorA/This_sheet_demonstra_Then_change_language:label')"/>
</input>
<select1 appearance="autocomplete" ref="/aYD5RTTP7MunSpmCDEDorA/Single_select_question">
<label ref="jr:itext('/aYD5RTTP7MunSpmCDEDorA/Single_select_question:label')"/>
<item>
<label ref="jr:itext('/aYD5RTTP7MunSpmCDEDorA/Single_select_question/option_1:label')"/>
<value>option_1</value>
</item>
<item>
<label ref="jr:itext('/aYD5RTTP7MunSpmCDEDorA/Single_select_question/option_2:label')"/>
<value>option_2</value>
</item>
</select1>
</h:body>
</h:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment