fix: add i18n for TimePicker matching DatePicker (#8)
CI / build-and-test (pull_request) Successful in 1m9s

Set German locale on TimePicker in FormView and wire TimePickerI18n
error messages (bad input, required, min, max) through the existing
vaadin-i18n translation bundles, mirroring the DatePicker.DatePickerI18n
setup already present in FormView.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYAcKoXKPN3rJ7nBroKZkc
This commit is contained in:
Pit Friedrich
2026-07-25 22:00:24 +02:00
parent bcf604b7c5
commit e3342d0f53
4 changed files with 18 additions and 0 deletions
@@ -76,6 +76,12 @@ vorname.setAutofocus(true);
.setToday(getTranslation("form.today"))
.setCancel(getTranslation("form.cancel")));
TimePicker uhrzeit = new TimePicker(getTranslation("form.time"));
uhrzeit.setLocale(Locale.GERMANY);
uhrzeit.setI18n(new TimePicker.TimePickerI18n()
.setBadInputErrorMessage(getTranslation("form.time.badInput"))
.setRequiredErrorMessage(getTranslation("form.time.required"))
.setMinErrorMessage(getTranslation("form.time.min"))
.setMaxErrorMessage(getTranslation("form.time.max")));
ComboBox<String> land = new ComboBox<>(getTranslation("form.country"));
land.setItems(getTranslation("country.de"), getTranslation("country.at"),