build
build copied to clipboard
Default language should contain valid language code
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)
.
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.