Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Default language should contain valid language code #260

Open
florianm opened this issue Dec 9, 2021 · 1 comment
Open

Default language should contain valid language code #260

florianm opened this issue Dec 9, 2021 · 1 comment
Milestone

Comments

@florianm
Copy link
Contributor

florianm commented Dec 9, 2021

ODK Build uses English as default language. Exported as XForm, the import to ODK Central works fine and the form is usable - this is likely what most users will do.
However, when exported via XLSForm, ODK Central shows the following warning:

This XLSForm file can be used, but it has the following possible problems (conversion warnings):

    The following language declarations do not contain valid machine-readable codes: English. Learn more: http://xlsform.org#multiple-language-support

This warning can be corrected by either manually changing the language from English to English (en) in the XLSX spreadsheet, or directly in ODK Build (Edit > Manage translations > Active language > add the (en).

@florianm florianm added this to the 0.5.0 milestone Dec 9, 2021
@florianm
Copy link
Contributor Author

florianm commented Dec 13, 2021

This could be as simple as changing https://github.com/getodk/build/blob/master/public/javascripts/i18n.js#L13 from

    var defaultLanguages = function() { return { 0: 'English', _counter: 0, _display: '0' }; };

to

    var defaultLanguages = function() { return { 0: 'English (en)', _counter: 0, _display: '0' }; };

and possible update the "Displayed Language" in index.erb:91

Edit: the above idea does not work but may be an entry point.

Alternatively, this could be handled in build2xlsform.

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

No branches or pull requests

1 participant