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
In #571 it was found that sometimes the behaviour (noted as TODO's in test_translations.py, also see this thread) for the default/unnamed language can be surprising when more than one language is present in a form.
For example the following XLSForm results in an XForm with label ref="jr:itext..." in the body, an itext translation for the eng label "hi there" but the unnamed label "hello" is not in the XForm at all (neither body or itext). The same can happen for hints.
| settings | |
| | default_language |
| | eng |
| survey | | | | | |
| | type | name | label | label::eng | hint |
| | note | n1 | hello | hi there | salutation |
See the test_translations.py file for other examples. The XForms spec allows both a body label and ref at the same time, e.g. <label ref="jr:itext('mykey')">a default value</label>. However it may be more straightforward to consider forms with 2 or more languages to be in "itext-only" mode, especially since translatable columns (aka text value forms) other than label/hint always go into itext.
As noted by @lognaturel, some pyxform users (non-Collect/Enketo) may expect / require single-language forms to still use the body for label / hint so this behaviour should be retained.
Another possible regression could be if users intended the unnamed language label or hint to be used as the default across multiple languages. This seems somewhat unlikely (perhaps more reasonable for images/media), but the workaround would be to copy the label or hint text into columns for those other languages.
The text was updated successfully, but these errors were encountered:
In #571 it was found that sometimes the behaviour (noted as TODO's in
test_translations.py
, also see this thread) for the default/unnamed language can be surprising when more than one language is present in a form.For example the following XLSForm results in an XForm with
label ref="jr:itext..."
in the body, an itext translation for theeng
label "hi there" but theunnamed
label "hello" is not in the XForm at all (neither body or itext). The same can happen for hints.See the
test_translations.py
file for other examples. The XForms spec allows both a body label and ref at the same time, e.g.<label ref="jr:itext('mykey')">a default value</label>
. However it may be more straightforward to consider forms with 2 or more languages to be in "itext-only" mode, especially since translatable columns (aka text value forms) other than label/hint always go into itext.As noted by @lognaturel, some pyxform users (non-Collect/Enketo) may expect / require single-language forms to still use the body for label / hint so this behaviour should be retained.
Another possible regression could be if users intended the unnamed language label or hint to be used as the default across multiple languages. This seems somewhat unlikely (perhaps more reasonable for images/media), but the workaround would be to copy the label or hint text into columns for those other languages.
The text was updated successfully, but these errors were encountered: