You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2024. It is now read-only.
Describe the bug
I am using duetds custom element DuetDatePicker in our vanilla JavaScript based project. When I apply the localization settings, everything is translated into German accordingly, but only the "locale" attribute (value "de-DE" or "de-AT") does not translate the screen reader label for days in the calendar. I also tried other locales/languages, nothing seems to get translated - the english description stays.
I appreciate any help.
Here is an excerpt from our code:
import '@duetds/date-picker';
import {DuetDatePicker} from "@duetds/date-picker/custom-element";
...
setLocalization() {
this.date.localization = {
buttonLabel: i18n.get("buttonLabel"),
placeholder: i18n.get("placeholder"),
selectedDateMessage: i18n.get("selectedDateMessage"),
prevMonthLabel: i18n.get("prevMonthLabel"),
nextMonthLabel: i18n.get("nextMonthLabel"),
monthSelectLabel: i18n.get("monthSelectLabel"),
yearSelectLabel: i18n.get("yearSelectLabel"),
closeLabel: i18n.get("closeLabel"),
calendarHeading: i18n.get("calendarHeading"),
dayNames: i18n.get("dayNames"),
monthNames: i18n.get("monthNames"),
monthNamesShort: i18n.get("monthNamesShort"),
locale: i18n.get("locale"), // german locale does not work - issue: screen reader label for chosen date in calendar is still english
}
}
(...)
connectedCallback() {
customElements.whenDefined("duet-date-picker")
.then(() => {
this.date = this.querySelector('duet-date-picker');
setTimeout(() => {
this.setDateAdapter();
this.setLocalization();
}, 0);
});
}
Describe the bug
I am using duetds custom element DuetDatePicker in our vanilla JavaScript based project. When I apply the localization settings, everything is translated into German accordingly, but only the "locale" attribute (value "de-DE" or "de-AT") does not translate the screen reader label for days in the calendar. I also tried other locales/languages, nothing seems to get translated - the english description stays.
I appreciate any help.
Here is an excerpt from our code: