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

When adding translations, media::image etc. columns in choices sheet are not updated and causing failures #2907

Open
tinok opened this issue Dec 1, 2020 · 1 comment
Labels
bug Things broken and not working as expected check-if-stale

Comments

@tinok
Copy link
Member

tinok commented Dec 1, 2020

Description

When adding languages in the kpi UI, the media::xxx columns/fields in the choices 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

  1. Upload this form mediacolumns.xlsx

  2. Click on the Manage Translations (globe) button

  3. Set default language to English en and then add a translation French fr

  4. Edit the French translation (like so:
    image

  5. Click preview

  6. Open formbuilder

  7. Download XLSForm

Expected behavior

Step 3: File references salame.jpeg and cheese.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 the choices 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.

@tinok tinok added the bug Things broken and not working as expected label Dec 1, 2020
@jnm
Copy link
Member

jnm commented Dec 1, 2020

Related to #2629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things broken and not working as expected check-if-stale
Projects
None yet
Development

No branches or pull requests

3 participants