vaadin / quarkus

An extension to Quarkus to support Vaadin Flow
Apache License 2.0
28 stars 3 forks source link

test: replace deprecated getTranslation calls #155

Closed mcollovati closed 2 months ago

caalador commented 2 months ago

Looks strange that the getTranslation(String key, Locale locale, Object... params) which is deprecated is actually the one used from getTranslation(Locale locale, String key, Object... params)... It would perhaps make more sense if the deprecated one would call the "actual" method and not the other way around. Also as it was introduced in 22.0 when should the deprecated method be removed?

mcollovati commented 2 months ago

Good point! Looks like we forgot to remove them in 24.0. So, I suppose we should clean up in 25. But it would probably make sense to swap the implementation code on Flow right now

mcollovati commented 2 months ago

And the change actually makes the test fail because getTranslation(new Locale("fi", "FI", "label")) calls getTranslation(Object key, Object... params)

Edit: my bad. I did a wrong replacement

mcollovati commented 2 months ago

Also, I18NProvider methods have the Locale as a second parameter. It looks like a bit confusing :thinking:

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud