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

Duplicate label translations for secondary itemsets #463

Closed
lognaturel opened this issue Aug 14, 2020 · 1 comment
Closed

Duplicate label translations for secondary itemsets #463

lognaturel opened this issue Aug 14, 2020 · 1 comment

Comments

@lognaturel
Copy link
Contributor

Software and hardware versions

all

Problem description

When a XLSForm definition includes a select with a choice filter, that select is output as a XForm secondary instance. If the choices have labels in multiple languages, the itext machinery is used and each label gets included twice in the translation block. For example, for this form:

<translation lang="French">
	<text id="/data/foo/a:label">
		<value>Ah</value>
	</text>
	<text id="/data/foo/b:label">
		<value>Bé</value>
	</text>
	<text id="/data/foo/c:label">
		<value>Cé</value>
	</text>
	<text id="static_instance-list-0">
		<value>Ah</value>
	</text>
	<text id="static_instance-list-1">
		<value>Bé</value>
	</text>
	<text id="static_instance-list-2">
		<value>Cé</value>
	</text>
</translation>

Steps to reproduce the problem

Write a form with a select with translated labels and a choice filter.

Expected behavior

Label strings should only be included once per language.

Other information

Note that itext and secondary instances aren't complementary. This ODK forum thread has more on that. The solution might be to swap all of it out at some point but before clients are all on the same page it would be good to only output each label once.

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

No branches or pull requests

1 participant