Skip to content

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

Open
jdugh wants to merge 2 commits into
kobotoolbox:mainfrom
jdugh:lang_header_param
Open

add lang_header parameter for specify language header values in export#2643
jdugh wants to merge 2 commits into
kobotoolbox:mainfrom
jdugh:lang_header_param

Conversation

@jdugh

@jdugh jdugh commented Apr 29, 2020

Copy link
Copy Markdown

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

dorey commented Apr 29, 2020

Copy link
Copy Markdown
Contributor

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

Comment thread kpi/models/import_export_task.py Outdated
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
Copy Markdown
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

jnm commented Jul 30, 2020

Copy link
Copy Markdown
Member

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