fix: add i18n for TimePicker matching DatePicker (#8)
CI / build-and-test (pull_request) Successful in 1m9s
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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user