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

flatpicker locale catalan - erro name language JS file #17745

Closed
2 tasks done
nuria2c opened this issue Aug 30, 2024 · 2 comments · Fixed by #18019
Closed
2 tasks done

flatpicker locale catalan - erro name language JS file #17745

nuria2c opened this issue Aug 30, 2024 · 2 comments · Fixed by #18019
Labels
bug dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Milestone

Comments

@nuria2c
Copy link

nuria2c commented Aug 30, 2024

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

10.0.16

Bug description

The flatpickr doesn't detect the catalan language

The locale for catalan language is "ca" NOT "cat" and in the "/glpi/public/lib/flatpickr/l10n" the JS files for catalan are "cat.min.js" and "cat.js".

when we change these files name for "ca.min.js" and "ca.js" works well.

We knoe that filepicker is an external library. We will notify also the bug to them, but if you can solve it directly in GLPI it will be perfect

Relevant log output

No response

Page URL

No response

Steps To reproduce

  1. Select catalan as language in GLPI
  2. Go to any ticket
  3. Open the debug console in the browser. An error about flatpicker appears
  4. Click to "open date" ticket to change it and the calendar appears in english (Not catalan)
  5. Change the name of the catalan files direct to the server in "in the "/public/lib/flatpickr/l10nfor" for "ca.min.js" and "ca.js".
  6. Reload the GLPI ticket page. The console message disappears anf the calendar language is catalan.

Your GLPI setup information

GLPI 10.0.16 ( => /var/www/html/glpi)
Installation mode: TARBALL
Current language:ca_ES

Anything else?

No response

@cedric-anne
Copy link
Member

Related issue on flatpickr side: flatpickr/flatpickr#3043

It should be possible to fix it on our side by adding a specific copy rule in the webpack configuration.

@cedric-anne cedric-anne added this to the 10.0.17 milestone Sep 2, 2024
@cedric-anne cedric-anne added bug dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Sep 2, 2024
cedric-anne added a commit to cedric-anne/glpi that referenced this issue Oct 7, 2024
@trasher trasher closed this as completed in e59c760 Oct 7, 2024
@jspsegarra
Copy link

@nuria2c I changed the file cat.js to ca.js, (also I changed all internal figures that were cat into ca) but there is no file with name cat.min.js in my website.
I refreshed and purged the website but browser continues showing me in English. What's missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants