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

Make the I18n class public #2977

Open
5 tasks
36degrees opened this issue Nov 8, 2022 · 1 comment
Open
5 tasks

Make the I18n class public #2977

36degrees opened this issue Nov 8, 2022 · 1 comment

Comments

@36degrees
Copy link
Contributor

36degrees commented Nov 8, 2022

What

Make the I18n public by removing any @private annotations and exporting it in a way that it can be consumed by users of GOV.UK Frontend.

Include documentation for the class in any user-facing documentation (e.g. the JS API Reference)

Before we do this we should make sure we're happy with the name of the class.

Why

We previously made the I18n class private in order to give us the freedom to make changes to the implementation after shipping it. Once we're happy with the implementation, we should make it public so that people building other components can re-use it.

Who needs to work on this

Developers

Who needs to review this

Developers, tech writer

Done when

  • We're happy with the name of the class
  • Any internal methods are private (either marked with a @private annotation or actually encapsulated as private)
  • Annotations mark the class as public
  • The class can be consumed by users of GOV.UK Frontend
  • Documentation for the class published in API reference etc
@36degrees
Copy link
Contributor Author

I've added another 'done when' to ensure that we clearly delineate which methods are designed to be called from outside of the class and which are 'internal' – at the minute the class itself is private but the methods do not have access annotations.

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

No branches or pull requests

1 participant