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

add lang_header parameter for specify language header values in export #2643

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

@@ -462,10 +468,12 @@ def _build_export_options(self, pack):
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