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

Create documentation for localisation - passing translations via data attributes #2307

Closed
6 tasks done
Tracked by #1708
vanitabarrett opened this issue Aug 15, 2022 · 3 comments
Closed
6 tasks done
Tracked by #1708
Assignees
Labels
documentation User requests new documentation or improvements to existing documentation javascript Pull requests that update Javascript code localisation
Milestone

Comments

@vanitabarrett
Copy link
Contributor

vanitabarrett commented Aug 15, 2022

What

Documentation is needed for the work which allows users to override hardcoded strings in our component JavaScript

There are two ways for users of GOV.UK Frontend to pass translations - via data-attributes or via JavaScript. The first approach (data attributes) will be documented in the Design System website, as the "primary" option for translating component JavaScript. This is what this ticket covers.

The second approach (passing translations via JavaScript) is more technical and may be less commonly used - we should document this approach in the Frontend Docs site. There is a separate card for this work

Why

  • To allow users to pass translations via data attributes
  • So we document both methods of passing in translations
  • So users can see examples of translated components
  • So users understand what we mean by localisation and the features and limits of our solution

Who needs to work on this

Tech Writer; Content; Developer

Who needs to review this

Tech Writer; Content; Developer

Done when

  • Plan out rough structure of what needs to be included and where, i.e: rough content structure
  • Draft documentation
  • Examples added for each component
  • Developer review
  • 2i review
  • Publish
@vanitabarrett vanitabarrett added awaiting triage Needs triaging by team documentation User requests new documentation or improvements to existing documentation javascript Pull requests that update Javascript code localisation javascript squad and removed awaiting triage Needs triaging by team labels Aug 15, 2022
@vanitabarrett vanitabarrett linked a pull request Aug 15, 2022 that will close this issue
@36degrees 36degrees added this to the [NEXT] milestone Sep 30, 2022
@claireashworth
Copy link
Contributor

This has gone to another tech writer for 2i.

@claireashworth
Copy link
Contributor

2i done and approved for publishing

@colinrotherham
Copy link
Contributor

New JavaScript API Reference added:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation User requests new documentation or improvements to existing documentation javascript Pull requests that update Javascript code localisation
Projects
Development

Successfully merging a pull request may close this issue.

4 participants