-
Notifications
You must be signed in to change notification settings - Fork 56
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: i18n translation request backend integration #2168
Conversation
# Conflicts: # package-lock.json # packages/ts/react-i18n/package.json
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2168 +/- ##
=======================================
Coverage 93.77% 93.78%
=======================================
Files 64 64
Lines 1622 1624 +2
Branches 364 365 +1
=======================================
+ Hits 1521 1523 +2
Misses 66 66
Partials 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e10709e
to
1ba2f46
Compare
@@ -39,6 +39,7 @@ | |||
"@vaadin/hilla-react-auth": "file:../../../../ts/react-auth", | |||
"@vaadin/hilla-react-crud": "file:../../../../ts/react-crud", | |||
"@vaadin/hilla-react-form": "file:../../../../ts/react-form", | |||
"@vaadin/hilla-react-i18n": "file:../../../../ts/react-i18n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure if the changes in this file is really necessary.
@@ -11,6 +11,7 @@ | |||
"@vaadin/hilla-react-auth": "file:../../../../ts/react-auth", | |||
"@vaadin/hilla-react-crud": "file:../../../../ts/react-crud", | |||
"@vaadin/hilla-react-form": "file:../../../../ts/react-form", | |||
"@vaadin/hilla-react-i18n": "file:../../../../ts/react-i18n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure if the changes in this file is really necessary.
@@ -0,0 +1,20 @@ | |||
import { i18n, translate } from '@vaadin/hilla-react-i18n'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package here is _views
instead of just views
. The reason is to align with the similar temporary changes in the other test modules.
packages/java/tests/spring/react-i18n/src/test/java/com/vaadin/hilla/test/BasicI18NIT.java
Outdated
Show resolved
Hide resolved
packages/java/tests/spring/react-i18n/frontend/_views/BasicI18NView.tsx
Outdated
Show resolved
Hide resolved
…NView.tsx Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
Quality Gate passedIssues Measures |
This ticket/PR has been released with Hilla 24.4.0.alpha14 and is also targeting the upcoming stable 24.4.0 version. |
* add basic configuration features * change implementation to use signals * update tests * add global instance * add global translate function * remember last used language * add React integration tests * remove unnecessary eslint suppression * update package.json * use fetch-mock to mock backend calls * refactor to use private properties * add missing test coverage * update package-lock.json * fix dependency versions * feat: add backend integration for translation requests * test: use default initial configuration for the tests * test: refactor tests and wait before assertions * feat: allow configuration for filtering based on retrieved locales * refactor: add resolved language signal and remove response types * fix: apply recent fixes on test project * chore: update package json * refactor: add resolved language getter and assertions * refactor: await fetch result and make block flatter * test: use language signals to wait for the translation update * test: remove unused mock case and add test for undefined resolved language * Update packages/java/tests/spring/react-i18n/frontend/_views/BasicI18NView.tsx Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com> --------- Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com> Co-authored-by: Anton Platonov <platosha@gmail.com> Co-authored-by: Luciano Vernaschi <luciano@vaadin.com>
Description
This PR:
Fixes #2103
Type of change
Checklist