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

feat(forms): Moving translations to a Provider wrapper #3268

Closed
2 tasks
tujoworker opened this issue Jan 24, 2024 · 0 comments
Closed
2 tasks

feat(forms): Moving translations to a Provider wrapper #3268

tujoworker opened this issue Jan 24, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tujoworker
Copy link
Member

tujoworker commented Jan 24, 2024

Form.Provider

By moving, we may ;

  • remove the Forms object.
  • move all fields into their own objects.
@tujoworker tujoworker added this to the Forms Release milestone Jan 24, 2024
@tujoworker tujoworker added the enhancement New feature or request label Jan 25, 2024
@joakbjerk joakbjerk self-assigned this Feb 22, 2024
tujoworker added a commit that referenced this issue Mar 26, 2024
…` hook (#3332)

mainly a proposal to partially solve
#3268

Grouping the translations by components makes it easier to read and work
with, as opposed to having a flat structure with long key names.

But will also explore different things for where the translations should
live

- [x] find where the translations should live. `DataContext` might not
be the best place from my research.
- [x] move all fields into their own objects.
- [x] Capitalize first letter of component names in translation files. 
- [x] Move error translations up one level
- [x] integrate `useLocale`-hook
- [x] Fix tests
- [x] Rebase form main
- [x] Rename Organization number => Organisation number (en-US => en-GB)
for upper and lower case
- [x] Document the new `Form.useLocale` hook.
- [x] Reframe the PR title and mention the "breaking" change.

relies on #3349

---------

Co-authored-by: Tobias Høegh <tobias@tujo.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants