Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For forms with two or more languages (incl. default/unnamed), use itext for all translatable columns #584

Open
lindsay-stevens opened this issue Feb 1, 2022 · 0 comments
Labels

Comments

@lindsay-stevens
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant