Skip to content

Add Welsh translation page#2298

Merged
DavidBiddle merged 6 commits into
mainfrom
add-welsh-translation-page
Oct 28, 2025
Merged

Add Welsh translation page#2298
DavidBiddle merged 6 commits into
mainfrom
add-welsh-translation-page

Conversation

@DavidBiddle
Copy link
Copy Markdown
Contributor

@DavidBiddle DavidBiddle commented Oct 24, 2025

What problem does this pull request solve?

Trello card: https://trello.com/c/tQCcRdwS/2638-add-new-page-for-adding-welsh-translations

Adds a new page for adding Welsh translations. At the moment it's just the page with a mark complete component on it:

image

There's a validation message if the user manages to leave the radio button blank (which shouldn't happen by default, because 'No' is the default):

image

There are different success messages depending on whether the user marked the task complete:
image
image

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?

@DavidBiddle DavidBiddle force-pushed the add-welsh-translation-page branch 2 times, most recently from 52f2afe to 173e101 Compare October 27, 2025 09:04
@DavidBiddle DavidBiddle changed the title Add welsh translation page Add Welsh translation page Oct 27, 2025
@DavidBiddle DavidBiddle force-pushed the add-welsh-translation-page branch from 173e101 to 6e52401 Compare October 27, 2025 11:32
@DavidBiddle DavidBiddle marked this pull request as ready for review October 27, 2025 11:55
@chao-xian
Copy link
Copy Markdown
Contributor

Looks good! Will check again when you've rebased?

@DavidBiddle DavidBiddle force-pushed the add-welsh-translation-page branch from 6e52401 to 482b10c Compare October 27, 2025 16:20
Comment thread app/controllers/forms/welsh_translation_controller.rb
chao-xian
chao-xian previously approved these changes Oct 27, 2025
Copy link
Copy Markdown
Contributor

@chao-xian chao-xian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we now have an unused controller from my previous PR but we can either rename or just delete it separately

Adds placeholder actions for adding Welsh translations to forms.

Also updates the path helper from `/translations` to `welsh-translation`
and renames the controller to WelshTranslationController.
Adds a new input object for the Welsh translation page, which will
handle translations in the future but currently just controls whether
the task has been completed.
Adds a form to the new welsh translation page using the input object
from the previous commit and including the mark complete component.
Add a validation message if the user doesn't select a radio button. This
shouldn't normally happen anyway - 'No' will be selected by default for
a new form - but we cover it anyway.
Adds success messages when the Welsh translation is saved, with
different text depending on whether the task has been marked complete.
Hides the page behind the `welsh_enabled` feature flag - if the form is
in a group without the flag enabled, the user will be redirected to the
task list if they try to access this page.
@DavidBiddle DavidBiddle force-pushed the add-welsh-translation-page branch from 8103218 to 6a74afe Compare October 28, 2025 10:15
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2298.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.

@william-castoncook william-castoncook self-requested a review October 28, 2025 11:05
Copy link
Copy Markdown
Contributor

@william-castoncook william-castoncook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshots look as expected.

@DavidBiddle DavidBiddle merged commit 51841b5 into main Oct 28, 2025
6 checks passed
@DavidBiddle DavidBiddle deleted the add-welsh-translation-page branch October 28, 2025 12:02
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.

3 participants