Skip to content

Improve localisation (particularly Welsh) #417

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 4 commits into
base: main
Choose a base branch
from

Conversation

yndajas
Copy link
Member

@yndajas yndajas commented Jun 3, 2025

  • Fix localisation for image credit label and add Welsh translation
  • Test existing localisation of contact labels
  • Add localisation of footnote labels
  • Add localisation of devolved content headings

TODO: verify translations added here

Trello

yndajas added 3 commits June 3, 2025 17:50
... which now includes Welsh

The `ImagePresenter` code looked like it was handling translations, but
it wasn't. We don't set `I18n.locale` to anything other than English in
the Govspeak code, so we need to pass the locale explicitly when calling
`I18n.t`. We already do this for contacts via the `TemplateRender#t`
wrapper
... which now includes Welsh. The Welsh translation is per the GOV.WALES
style guide: https://www.gov.wales/govwales-style-guide
@yndajas yndajas force-pushed the add-footnote-translation branch 2 times, most recently from 7f4921d to 6f8cbd9 Compare June 3, 2025 17:42
... which now includes Welsh. This actually simplifies some of the main
Govspeak module code, removing an unnecessary class method

The basic test for devolved content is in the monster `GovspeakTest`
spec
@yndajas yndajas force-pushed the add-footnote-translation branch from 6f8cbd9 to 4dc1870 Compare June 3, 2025 17:43

def initialize(image)
def initialize(image, locale)
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be nicer as a named parameter?

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.

2 participants