Skip to content

Conversation

jdugh
Copy link

@jdugh jdugh commented Apr 29, 2020

add lang_header parameter. lang_header can be used for specify the language for header values in excel/csv export (you can have _xml header values and _default values for submits datas). If not set, lang arg override lang_header arg value. Need this PR : kobotoolbox/formpack#215

…nguage for header values in excel/csv export (you can have _xml header values and _default values for submits datas). If not set, lang arg override lang_header arg value. Need this PR : kobotoolbox/formpack#215
@dorey
Copy link
Contributor

dorey commented Apr 29, 2020

Edit: I moved my comment over to kobotoolbox/formpack#215

group_sep = self.data.get('group_sep', '/')
translations = pack.available_translations
lang = self.data.get('lang', None) or next(iter(translations), None)
lang_header = self.data.get('lang_header', lang) or next(iter(translations), None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lang_header = self.data.get('lang_header', lang) or next(iter(translations), None)
lang_header = self.data.get('lang_header', lang)

because lang is the fallback value, and it's set in the line above, we don't need a second fallback value

@jnm jnm reopened this Jul 30, 2020
@jnm jnm changed the base branch from two-databases to master July 30, 2020 15:51
@jnm
Copy link
Member

jnm commented Jul 30, 2020

PR was closed accidentally because we removed the underlying base branch. Please carry on the discussion!

@jnm jnm added the Back end label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants