Problematic method signature of Component#getTranslation
See original GitHub issueComponent
has to methods for i18n:
public String getTranslation(String key, Object... params)
- and
public String getTranslation(String key, Locale locale, Object... params)
The second method signature is problematic:
- You expect
public String getTranslation(Locale locale, String key, Object... params)
(consistent with the shorter version) - What about
getTranslation("Current Locale is {0}", Locale.ENGLISH)
?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:6 (5 by maintainers)
Top Results From Across the Web
I18n Vaadin flow
Hi, I've got a question about localization in Vaadin flow. Will you implement a "transparent" way to internationalize Vaadin app ?
Read more >Entity system does not provide an API for retrieving ... - Drupal
Problem /Motivation When presenting an entity for interaction by a ... Is "editable" the right signature for the method, it seems like the ......
Read more >Cakephp i18n get translation locales - Stack Overflow
My method includes overwriting the existing TranslateBehavior, added a new TranslationBehavior, a helper and a component. Here's the zip with the files.
Read more >Problem with map zoom | Angular - EJ 2 Forums - Syncfusion
We must call the zoomToCoordinates() method after complete render of the Maps component. This method will zoom the map within the provided ...
Read more >com.vaadin.flow.component.Component.getTranslation java ...
Get the translation for the component locale. * <p> * The method never returns a null. If there is no {@link I18NProvider} *...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unless I’m missing something, it should be possible to just add
and deprecate the problematic
public String getTranslation(String key, Locale locale, Object... params)
in favor of the new method.This ticket/PR has been released with platform 22.0.0.alpha5 and is also targeting the upcoming stable 22.0.0 version.