Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date picker is not localized according to selected language in user preferences/workday waiver window #949

Open
timagixe opened this issue Feb 19, 2023 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@timagixe
Copy link
Contributor

Describe the issue
Date picker always displays months in English version.

To Reproduce
Steps to reproduce the behavior:

  1. Go to User preferences
  2. Change language to different from English
  3. Open date picker of Overall balance start date
  4. See that months of the date picker are not translated to the selected language

Expected behavior
I believe date picker should also be localized to selected language

Environment

  • Node/npm version: Node 16
  • OS: MacOS latest
  • TTL version: latest

Screenshots
Screen Shot 2023-02-19 at 11 29 30 AM

@timagixe timagixe added the bug Something isn't working label Feb 19, 2023
@tupaschoal tupaschoal changed the title Date picker is not localized according to selected language in user preferences Date picker is not localized according to selected language in user preferences/workday waiver window Feb 25, 2023
@tupaschoal
Copy link
Collaborator

Nice find, it also needs updating in the workday waiver window

@BikcromBiswas
Copy link

Can you assign this is to me

@tupaschoal
Copy link
Collaborator

Sure

@RahulKannan12
Copy link

I analysed this issue, findings below

  1. In the current logic , we are using default date picker which isn't supporting any localizations (AFAIK) .
  2. My proposal is to use jquery's datepicker from jquery-ui package, it's supporting localization
    Attached my codepen sample -
    https://codepen.io/pen?template=RweGWww

Let's discuss and move it further 👍

@araujoarthur0
Copy link
Collaborator

@RahulKannan12 that looks cool.
Can we also add theme support to it? Currently the datepicker is always white no matter the theme.

@RahulKannan12
Copy link

@araujoarthur0 Thanks.

Yes, I did some checks, it is possible to add, Can some one assign this to me, I can start working on it ?

@araujoarthur0
Copy link
Collaborator

@BikcromBiswas are you still working on this or is it ok to reassign?

@BikcromBiswas
Copy link

@BikcromBiswas are you still working on this or is it ok to reassign?
Please reassign it

@RahulKannan12
Copy link

@araujoarthur0 I've raised the PR for fixing the date picker localizations, unfortunately I couldn't add the theme support to it, as it requires some more understanding for me, I'll do it as part of my upcoming PR's.

@soulflyman
Copy link

No need to change the date picker code. By changing the localization with the --lang parameter as mentioned here #10 (comment), also changes the naming of the months in the date picker.

@araujoarthur0
Copy link
Collaborator

That's rather interesting @soulflyman. Would you be willing to submit a PR for that?
I wonder how we would communicate to users the need to restart the app to see the changes in the datepickers. Maybe a popup when closing the preferences if the language was changed.

@soulflyman
Copy link

I think a popup when closing or changing the language would be the best way.

I'm not familiar with electron development to create a pull request. It was accidentally that I discovered this option and thought this might help.

I'm sorry that I can't help more.

@araujoarthur0
Copy link
Collaborator

@soulflyman no worries, thanks for the input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants