fundamental-ngx
fundamental-ngx copied to clipboard
SS-38610 Hardcoded text & buttons in event bidding start time date picker
Bug
Hrs, Min, Period, OK, Cancel are hardcoded, they are displaying in English for all locales
Angular version affected: Angular 12
Steps to reproduce the bug:
- Production Data Centre/QA Service: gcpman07
- Realm/Customer Name: s4All-7
- Logged in as eu_FR210309b
- Create a guided sourcing project
- Forward auction > Dutch Forward auction > Create
- Click Edit event rules
- Click time picker for bidding start time
- Observe the issue
Jira Link: https://product-jira.ariba.com/browse/SS-38610
Hello @i563785, thank you for using fundamental-ngx! The fundamental-ngx team will triage your issue as soon as possible.

@i563785, Please do not provide a links to internal issues, this is open source projects with many contributors that does not have access to some internal links.
Could you please confirm if "Ok" and "Cancel" button texts are also being translated ? Thanks.
There is currently a disconnect with how our calendar handles i18n (using the DatetimeAdapter) compared to the rest of the library (using the @fundamental-ngx/i18n package). Because datetimepicker is a composite of the calendar and time components, we are seeing the discrepancy here. We'll need to sync these up. Thank you for filing this issue. In the meantime you can also see the documentation for i18n (https://sap.github.io/fundamental-ngx/#/core/i18n) to see how to handle translations for the rest of the library, but I think we should make this a priority
![]()
These strings are not getting translated as verified at https://sap.github.io/fundamental-ngx/#/core/datetime-picker
To further clarify - the translations you are seeing on the calendar in the quoted screenshot are coming from the DatetimeAdapter. "Sec/Min" and "Ok/Cancel" are not hardcoded in their components, but are actually translated via the fundamental-ngx/i18n module. So one current workaround would be that wherever you allow the user to change the locale of the calendar, you could also run some similar logic to the fundamental-ngx/i18n module that would change the "Hrs/Sec/Min" and "Ok/Cancel" of the rest of the datepicker. Or vice-versa. And this logic can be ran globally or per component.
Unfortunately the locales between DatetimeAdapter and fundamental-ngx/i18n will not have a 1:1 correlation - for example when changing the DatetimeAdapter to use "en-us"
you will need to tell fundamental-ngx/i18n to use FD_LANGUAGE_ENGLISH
.
This is admittedly a disjointed approach to localization. One advantage is that the calendar does currently allow more customization than the rest of the library. However I do think these need to be unified, so next week I'll be discussing with my time to find a solution. In the meantime I'll be updating datetimepicker's documentation to demonstrate the temporary solution I described above
Here is the draft example pull request (I still wish to discuss this with my team and fix e2e tests before merging)
https://github.com/SAP/fundamental-ngx/pull/8810/files
Hi @mikerodonnell89 , Could you please confirm if there are any updates on this issue ?
the issue seems to be fixed already. If you switch to French you will see this: