From f7273ce97e7006f69f5ae4973102672666ac33c3 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Mon, 19 May 2025 18:18:52 +0200 Subject: [PATCH] UI: add missing French and German localization for calendars Signed-off-by: Nicola Murino --- .../plugins/custom/flatpickr/l10n/de.js | 70 +++++++++++++++++ .../plugins/custom/flatpickr/l10n/fr.js | 75 +++++++++++++++++++ templates/webadmin/events.html | 2 + templates/webadmin/user.html | 2 + templates/webclient/share.html | 2 + 5 files changed, 151 insertions(+) create mode 100644 static/assets/plugins/custom/flatpickr/l10n/de.js create mode 100644 static/assets/plugins/custom/flatpickr/l10n/fr.js diff --git a/static/assets/plugins/custom/flatpickr/l10n/de.js b/static/assets/plugins/custom/flatpickr/l10n/de.js new file mode 100644 index 00000000..18fe4569 --- /dev/null +++ b/static/assets/plugins/custom/flatpickr/l10n/de.js @@ -0,0 +1,70 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.de = {})); +}(this, (function (exports) { 'use strict'; + + var fp = typeof window !== "undefined" && window.flatpickr !== undefined + ? window.flatpickr + : { + l10ns: {}, + }; + var German = { + weekdays: { + shorthand: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], + longhand: [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag", + ], + }, + months: { + shorthand: [ + "Jan", + "Feb", + "Mär", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez", + ], + longhand: [ + "Januar", + "Februar", + "März", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember", + ], + }, + firstDayOfWeek: 1, + weekAbbreviation: "KW", + rangeSeparator: " bis ", + scrollTitle: "Zum Ändern scrollen", + toggleTitle: "Zum Umschalten klicken", + time_24hr: true, + }; + fp.l10ns.de = German; + var de = fp.l10ns; + + exports.German = German; + exports.default = de; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/static/assets/plugins/custom/flatpickr/l10n/fr.js b/static/assets/plugins/custom/flatpickr/l10n/fr.js new file mode 100644 index 00000000..f2f7b0fa --- /dev/null +++ b/static/assets/plugins/custom/flatpickr/l10n/fr.js @@ -0,0 +1,75 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fr = {})); +}(this, (function (exports) { 'use strict'; + + var fp = typeof window !== "undefined" && window.flatpickr !== undefined + ? window.flatpickr + : { + l10ns: {}, + }; + var French = { + firstDayOfWeek: 1, + weekdays: { + shorthand: ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"], + longhand: [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi", + ], + }, + months: { + shorthand: [ + "janv", + "févr", + "mars", + "avr", + "mai", + "juin", + "juil", + "août", + "sept", + "oct", + "nov", + "déc", + ], + longhand: [ + "janvier", + "février", + "mars", + "avril", + "mai", + "juin", + "juillet", + "août", + "septembre", + "octobre", + "novembre", + "décembre", + ], + }, + ordinal: function (nth) { + if (nth > 1) + return ""; + return "er"; + }, + rangeSeparator: " au ", + weekAbbreviation: "Sem", + scrollTitle: "Défiler pour augmenter la valeur", + toggleTitle: "Cliquer pour basculer", + time_24hr: true, + }; + fp.l10ns.fr = French; + var fr = fp.l10ns; + + exports.French = French; + exports.default = fr; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/templates/webadmin/events.html b/templates/webadmin/events.html index 44d1cdb3..355b70e2 100644 --- a/templates/webadmin/events.html +++ b/templates/webadmin/events.html @@ -152,6 +152,8 @@ explicit grant from the SFTPGo Team (support@sftpgo.com). {{- define "extra_js"}} + + + + + +