Skip to content

SPIKE: Add support for uploading a spreadsheet containing Welsh translations#2870

Draft
stephencdaly wants to merge 3 commits into
mainfrom
spike-support-translations-upload
Draft

SPIKE: Add support for uploading a spreadsheet containing Welsh translations#2870
stephencdaly wants to merge 3 commits into
mainfrom
spike-support-translations-upload

Conversation

@stephencdaly

@stephencdaly stephencdaly commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/EBUuaK6P/3161-spike-make-it-easier-to-add-welsh-translations-to-a-long-list-of-options

Allow uploading a spreadsheet file (CSV, XLSX, or ODS) in the same format as the existing CSV download for the form content.

Add an identifier to each CSV row so we can identify which translation to update.

When the spreadsheet is uploaded, show the add/edit translations page with the translations filled from the spreadsheet. The translations will not be saved until the user submits this page.

Some of the code for this was generated by Claude code for the purpose of spiking this, so might not all be the best way to do it. When implementing it properly, make sure to properly review all the decisions made in this PR.

This hasn't been properly designed, but for a proof of concept this adds a link to a page to upload a CSV with the translations:

Screenshot 2026-06-30 at 14 55 09 Screenshot 2026-06-30 at 14 55 14

Not yet investigated

  • Handling content identifiers in the uploaded CSV file that don't map to content in the form to show an error
  • Other validation scenarios
  • Supporting other spreadsheet file types

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@stephencdaly stephencdaly force-pushed the spike-support-translations-upload branch 2 times, most recently from 8700acf to 1d4052a Compare June 30, 2026 13:49
Allow uploading a CSV file in the same format as the existing CSV
download for the form content.

Add an identifier to each CSV row so we can identify which translation
to update.

When the CSV is uploaded, show the add/edit translations page with
the translations filled from the CSV file. The translations will not
be saved until the user submits this page.

This code was mainly generated by Claude code for the purpose of
spiking this, so might not all be the best way to do it.
@stephencdaly stephencdaly force-pushed the spike-support-translations-upload branch from 1d4052a to 9c19c37 Compare June 30, 2026 14:00
@stephencdaly stephencdaly marked this pull request as draft June 30, 2026 15:17
@stephencdaly stephencdaly changed the title SPIKE: Add support for uploading translations via CSV SPIKE: Add support for uploading a spreadsheet containing Welsh translations Jul 1, 2026
@stephencdaly stephencdaly force-pushed the spike-support-translations-upload branch from e77865e to 81c5e2d Compare July 1, 2026 13:44
@stephencdaly stephencdaly force-pushed the spike-support-translations-upload branch from 81c5e2d to a91b4ed Compare July 1, 2026 13:58
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2870.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant