Skip to content

Add datatables translations.

Jesús Pérez requested to merge chuso/canaille:datatable-translation into main

As commented in #122 (comment 1244724904) (sorry, I didn't notice the issue was already closed when I added the comment), JavaScript tables like the one shown when managing clients are missing the translation and even the ability to load translations if they were present.

This MR tries to fix this with the following changes

  • Moved static/datatables/French.json to static/datatables/i18n/fr.json. It's moved to a new subdirectory to keep translation and code separated.
  • Added translations for English and Spanish (the translations currently supported by Canaille).
  • Modified canaille/static/js/users.js to replace the hardcoded French.json with the corresponding file from the translations folder. The chosen language is gotten from the lang attribute in the HTML taag.

Merge request reports