You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a problem with the way Kobo Toolbox imports questions from the library into surveys when the library asset is localized. The use case is that we are loading questions into the question library for users to be able to import to their own surveys. Many of these have multiple reviewed translations which are useful for users to be able to access out-of-the-box. These translations are uploaded to question and choice labels by API as English (en), Spanish (es), etc. This same behavior can be reproduced by the attached XLSForm example.
Load provided XLSForm into the question library as either a block or a template.
Create a survey from scratch.
Select Add from Library and select the block from the XLSForm example.
See that the question name is visible instead of the label. Preview the form and see that a new default language has been added with the question name as the label and the English choices. Viewing English will show the English label and Spanish choices while viewing Spanish will show the Spanish label and empty choices.
Save the form and see that you cannot edit the survey as is with this error: There is an unnamed translation in your form definition.
Some of the proper functionality is attained if you set the languages before importing or if you set a new default and delete the unnamed language after importing. However, this seems to be inconsistent with occasionally disrupting translations. It is also not a desirable user experience.
Expected behavior
I expect the question to be added to the survey and to perform as it did in the library.
EDIT: The expected behavior is also attained by creating the library question block, downloading it as an XLSForm, and then uploading that form to create a survey.
Actual behavior
From Library
When Imported
Previewing English
Previewing Spanish
Additional details
I wasn't sure how to get the version of our self-hosted instance, but I have reproduced this issue on Kobo Cloud so I believe it would be a current issue with 2.024.09 (?).
Non-localized forms only have label, whereas once an asset is localized it cannot have label because that is taken as a null language. When you import from the library, the operation seems to expect non-localized assets and adds label if it doesn't exist, falling back to the name value. I believe the appropriate fix would involve the import from library operation accepting localized assets, even if questions do not include a label field. Thanks so much!!
The text was updated successfully, but these errors were encountered:
I forgot to include the error after an imported form is saved, as in Steps to Reproduce 5. I can remove the unnamed translation, but the translated texts then get re-shuffled.
Description
There seems to be a problem with the way Kobo Toolbox imports questions from the library into surveys when the library asset is localized. The use case is that we are loading questions into the question library for users to be able to import to their own surveys. Many of these have multiple reviewed translations which are useful for users to be able to access out-of-the-box. These translations are uploaded to question and choice labels by API as
English (en)
,Spanish (es)
, etc. This same behavior can be reproduced by the attached XLSForm example.Example XLSForm
Steps to Reproduce
Add from Library
and select the block from the XLSForm example.There is an unnamed translation in your form definition
.Expected behavior
I expect the question to be added to the survey and to perform as it did in the library.
EDIT: The expected behavior is also attained by creating the library question block, downloading it as an XLSForm, and then uploading that form to create a survey.
Actual behavior
From Library
When Imported
Previewing English
Previewing Spanish
Additional details
I wasn't sure how to get the version of our self-hosted instance, but I have reproduced this issue on Kobo Cloud so I believe it would be a current issue with 2.024.09 (?).
Non-localized forms only have
label
, whereas once an asset is localized it cannot havelabel
because that is taken as a null language. When you import from the library, the operation seems to expect non-localized assets and addslabel
if it doesn't exist, falling back to thename
value. I believe the appropriate fix would involve the import from library operation accepting localized assets, even if questions do not include alabel
field. Thanks so much!!The text was updated successfully, but these errors were encountered: