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: add default I18N provider bean for Spring #17933

Merged
merged 8 commits into from
Oct 30, 2023

Conversation

tltv
Copy link
Member

@tltv tltv commented Oct 26, 2023

Extends DefaultI18NProvider (#5917) for Spring. VaadinApplicationConfiguration defines DefaultI18NProvider bean and initializes it with locales based on translation properties files found in the classpath under '/vaadin-i18n' path.

Fixes: #17836

Extends DefaultI18NProvider (#5917) for Spring. `VaadinApplicationConfiguration` defines `DefaultI18NProvider` bean and initializes it with locales based on translation properties files found in the classpath under '/vaadin-i18n' path.

Fixes: #17836
@github-actions
Copy link

github-actions bot commented Oct 26, 2023

Test Results

1 025 files  +  8  1 025 suites  +8   1h 2m 6s ⏱️ - 4m 51s
6 513 tests +  2  6 472 ✔️ +  2  41 💤 ±0  0 ±0 
6 779 runs  +19  6 730 ✔️ +19  49 💤 ±0  0 ±0 

Results for commit 8c31155. ± Comparison against base commit 76f5fcd.

This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both.
com.vaadin.flow.misc.ui.TranslationIT ‑ translationFilesExist_defaultI18NIntantiated_languagesWork[any_Chrome_]
com.vaadin.flow.misc.ui.TranslationIT ‑ translationFilesExist_defaultI18NInstantiated_languagesWork[any_Chrome_]
com.vaadin.flow.spring.flowsecurity.TranslationIT ‑ translationFilesExist_customI18NInstantiated_languagesWork
com.vaadin.flow.spring.test.TranslationIT ‑ translationFilesExist_defaultI18NInstantiated_languagesWork

♻️ This comment has been updated with latest results.

@tltv
Copy link
Member Author

tltv commented Oct 27, 2023

Just noticed that Logger instance field is not needed anymore so I'll remove that.

mcollovati
mcollovati previously approved these changes Oct 27, 2023
Added `vaadin.i18n.location-pattern` property. Added Conditional annotation with Condition implemented by DefaultI18NProviderFactory. Also moved location pattern to create(String) method.
caalador
caalador previously approved these changes Oct 27, 2023
mcollovati
mcollovati previously approved these changes Oct 27, 2023
@tltv tltv dismissed stale reviews from mcollovati and caalador via 8c31155 October 30, 2023 08:30
@sonarcloud
Copy link

sonarcloud bot commented Oct 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mshabarov mshabarov merged commit 5d45ccc into main Oct 30, 2023
26 checks passed
@mshabarov mshabarov deleted the feat/default-i18n-for-spring branch October 30, 2023 12:12
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.3.0.alpha4 and is also targeting the upcoming stable 24.3.0 version.

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

Successfully merging this pull request may close these issues.

Extend DefaultI18NProvider for Spring
5 participants