When adding translations, media::image
etc. columns in choices
sheet are not updated and causing failures
#2907
Labels
media::image
etc. columns in choices
sheet are not updated and causing failures
#2907
Description
When adding languages in the kpi UI, the
media::xxx
columns/fields in thechoices
sheet are not being "translated" updated to include the new language, leading to previews to fail, form downloads to fail, and not allowing users to translate these file names in the UI.Steps to Reproduce
Upload this form mediacolumns.xlsx
Click on the Manage Translations (globe) button
Set default language to English en and then add a translation French fr
Edit the French translation (like so:
Click preview
Open formbuilder
Download XLSForm
Expected behavior
Step 3: File references
salame.jpeg
andcheese.jpeg
appear in the translation list.Step 5: Preview succeeds.
Step 6: Formbuilder opens.
Step 7: Download succeeds
Actual behavior
Step 3:. File references for the two choice list images are not included in the translation screen.
Step 5: Preview fails to open with error
{"status":"failure","error_type":"ValueError","error":"('Incorrect translation count: \"media::image\"', {'label': ['Salame', None], 'list_name': 'pizza', 'media::image': ['salame.jpeg'], 'name': 'Salame'})","warnings":[]}
Step 6: Formbuilder fails to open with error
Step 7: Download fails with 500 server response
Additional details
Tested on HHI,
du
.When deleting the
media::image
column in thechoices
sheet this issue goes away, so it's definitely the case that the media in the choices sheet isn't being included in kpi's translation method.The text was updated successfully, but these errors were encountered: