glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.26k stars 1.29k forks source link

flatpicker locale catalan - erro name language JS file #17745

Closed nuria2c closed 3 weeks ago

nuria2c commented 2 months ago

Code of Conduct

Is there an existing issue for this?

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 commented 2 months ago

Related issue on flatpickr side: https://github.com/flatpickr/flatpickr/issues/3043

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

jspsegarra commented 1 week ago

@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?