-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The current TranslationProvider implementation in src/test/java/com/flowingcode/vaadin/addons/cronexpressioneditor/TranslationProvider.java can be improved with modern Java syntax and a proper stub implementation.
Current Issues
- Uses legacy
Collections.unmodifiableList(Arrays.asList())instead of modernList.of() - Returns
nullfromgetTranslation()method which may cause issues - Contains TODO comment indicating incomplete implementation
Suggested Improvements
As suggested by @javier-godoy in PR #1:
@Override
public List<Locale> getProvidedLocales() {
return List.of(Locale.ENGLISH);
}
@Override
public String getTranslation(String key, Locale locale, Object... params) {
// Stub implementation for demo purposes
return "\!"+key;
}References
Acceptance Criteria
- Replace
Collections.unmodifiableList(Arrays.asList(Locale.ENGLISH))withList.of(Locale.ENGLISH) - Implement proper stub for
getTranslation()method that returns"\!" + key - Remove TODO comment
- Ensure all tests still pass
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Inbox (needs triage)