Skip to content

Make hardcoded text translatable #561

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peteryates
Copy link
Member

There are some bits of text in the library that are hardcoded and there's no ability to override/configure them.

This PR intends to fix them which will make it easier to use the library in non-English or multilingual applications.

Copy link

netlify bot commented May 23, 2025

Deploy Preview for govuk-form-builder ready!

Name Link
🔨 Latest commit b71a9f7
🔍 Latest deploy log https://app.netlify.com/projects/govuk-form-builder/deploys/6831df6a174a820008f2d79c
😎 Deploy Preview https://deploy-preview-561--govuk-form-builder.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@peteryates peteryates linked an issue May 23, 2025 that may be closed by this pull request
The date input has hardcoded label text for day, month and
year. They should be overrideable and translatable.

This change adds a new param called segment_names that follows the
format of the segments arg. Passing :day, :month and :year values will
allow the labels to be customised.

The segment names are also configurable using the
default_date_segment_names config option.

Refs #558
@peteryates peteryates force-pushed the make-hardcoded-text-translatable branch from 2ffabdb to b71a9f7 Compare May 24, 2025 15: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.

Translating hardcoded default content
1 participant