From 988a9bc9186a6b737813d6ddd03cccd809573b81 Mon Sep 17 00:00:00 2001 From: Yago Diaz Date: Fri, 24 Jul 2026 10:18:55 +0200 Subject: [PATCH 1/4] Added translations for Schedule page Added translations for date selector inside booking issue #2320 --- lib/Ravada/I18N/ca.po | 9 +++++++++ lib/Ravada/I18N/en.po | 9 +++++++++ lib/Ravada/I18N/es.po | 9 +++++++++ lib/Ravada/I18N/messages.pot | 9 +++++++++ public/js/booking/booking.module.js | 5 ++++- public/js/booking/calendar.component.js | 5 ++++- templates/booking/formEvent.component.html.ep | 2 +- templates/bootstrap/change_password.html.ep | 2 +- templates/bootstrap/new_group.html.ep | 2 +- templates/bootstrap/new_user.html.ep | 2 +- templates/bootstrap/new_user_ok.html.ep | 2 +- templates/bootstrap/scripts.html.ep | 4 ++++ templates/bootstrap/user_settings.html.ep | 2 +- templates/main/about.html.ep | 2 +- templates/main/admin_charts.html.ep | 2 +- templates/main/admin_group.html.ep | 2 +- templates/main/admin_groups.html.ep | 2 +- templates/main/admin_hostdev.html.ep | 2 +- templates/main/admin_machines.html.ep | 2 +- templates/main/admin_messages.html.ep | 2 +- templates/main/admin_monitoring.html.ep | 2 +- templates/main/admin_networks.html.ep | 2 +- templates/main/admin_nodes.html.ep | 2 +- templates/main/admin_routes.html.ep | 2 +- templates/main/admin_settings.html.ep | 2 +- templates/main/admin_storage.html.ep | 2 +- templates/main/admin_users.html.ep | 2 +- templates/main/list_bases_ng.html.ep | 2 +- templates/main/maintenance.html.ep | 2 +- templates/main/manage_machine.html.ep | 2 +- templates/main/network_new.html.ep | 2 +- templates/main/new_machine.html.ep | 2 +- templates/main/new_node.html.ep | 2 +- templates/main/remove_machine.html.ep | 2 +- templates/main/request.html.ep | 2 +- templates/main/requirements.html.ep | 2 +- templates/main/route_new.html.ep | 2 +- templates/main/run_request.html.ep | 2 +- templates/main/settings_generic.html.ep | 2 +- templates/main/settings_machine.html.ep | 2 +- templates/main/standard_message.html.ep | 2 +- templates/main/start.html.ep | 2 +- templates/main/storage_new.html.ep | 2 +- templates/main/storage_unused.new.html.ep | 2 +- templates/main/upload_group_members.html.ep | 2 +- templates/main/upload_users.html.ep | 2 +- templates/ng-templates/booking/calendar.html.ep | 2 +- 47 files changed, 88 insertions(+), 42 deletions(-) diff --git a/lib/Ravada/I18N/ca.po b/lib/Ravada/I18N/ca.po index d71a3a7e6..d2dd15de9 100644 --- a/lib/Ravada/I18N/ca.po +++ b/lib/Ravada/I18N/ca.po @@ -2779,3 +2779,12 @@ msgstr "Ara" msgid "Later" msgstr "Després" + +msgid "Today" +msgstr "Avui" + +msgid "Clear" +msgstr "Esborra" + +msgid "LDAP groups allowed" +msgstr "Grups LDAP permesos" diff --git a/lib/Ravada/I18N/en.po b/lib/Ravada/I18N/en.po index 9e9355407..9d89f020b 100644 --- a/lib/Ravada/I18N/en.po +++ b/lib/Ravada/I18N/en.po @@ -2613,3 +2613,12 @@ msgstr "Now" msgid "Later" msgstr "Later" + +msgid "Today" +msgstr "Today" + +msgid "Clear" +msgstr "Clear" + +msgid "LDAP groups allowed" +msgstr "LDAP groups allowed" diff --git a/lib/Ravada/I18N/es.po b/lib/Ravada/I18N/es.po index dc4b3a055..4b60f61e2 100644 --- a/lib/Ravada/I18N/es.po +++ b/lib/Ravada/I18N/es.po @@ -2703,3 +2703,12 @@ msgstr "Ahora" msgid "Later" msgstr "Después" + +msgid "Today" +msgstr "Hoy" + +msgid "Clear" +msgstr "Limpiar" + +msgid "LDAP groups allowed" +msgstr "Grupos LDAP permitidos" diff --git a/lib/Ravada/I18N/messages.pot b/lib/Ravada/I18N/messages.pot index 2c1640ad6..8aa45617d 100644 --- a/lib/Ravada/I18N/messages.pot +++ b/lib/Ravada/I18N/messages.pot @@ -2726,3 +2726,12 @@ msgstr "" msgid "Later" msgstr "" + +msgid "Today" +msgstr "" + +msgid "Clear" +msgstr "" + +msgid "LDAP groups allowed" +msgstr "" diff --git a/public/js/booking/booking.module.js b/public/js/booking/booking.module.js index d03b853b7..9d38d7538 100644 --- a/public/js/booking/booking.module.js +++ b/public/js/booking/booking.module.js @@ -21,5 +21,8 @@ angular.module("ravada.booking", ['ui.bootstrap','angularMoment','angularjsToast .service("apiEntry",svcEntry) .service("apiLDAP",svcLDAP) .service("apiLocal",svcLocal) - .run( amMoment => amMoment.changeLocale('en') ); + .run( amMoment => { + const lang = document.documentElement.lang || 'en'; + amMoment.changeLocale(lang); + }); diff --git a/public/js/booking/calendar.component.js b/public/js/booking/calendar.component.js index 91148614f..d1fc1066d 100644 --- a/public/js/booking/calendar.component.js +++ b/public/js/booking/calendar.component.js @@ -12,6 +12,7 @@ calendarCtrl.$inject = ['$element', '$window', 'apiBookings','$uibModal','moment function calendarCtrl($element, $window, apiBookings,$uibModal,moment,apiEntry) { const self = this; + const lang = document.documentElement.lang || 'en'; const parseDate = (data, time) => data + "T" + time; const TimeFormat = { hour: '2-digit', @@ -20,7 +21,7 @@ function calendarCtrl($element, $window, apiBookings,$uibModal,moment,apiEntry) omitZeroMinute: false }; let calendar; - moment.updateLocale('en', { + moment.updateLocale(lang, { week: { dow: 1, } @@ -28,7 +29,9 @@ function calendarCtrl($element, $window, apiBookings,$uibModal,moment,apiEntry) self.$postLink = () => { const calendarEl = $element.find("#rvdCalendar")[0]; calendar = new FullCalendar.Calendar(calendarEl, { + locale: lang, initialView: 'timeGridWeek', + height: 'auto', firstDay: 1, allDaySlot: false, selectOverlap: false, diff --git a/templates/booking/formEvent.component.html.ep b/templates/booking/formEvent.component.html.ep index 51b1e16c0..e71b1e2e0 100644 --- a/templates/booking/formEvent.component.html.ep +++ b/templates/booking/formEvent.component.html.ep @@ -45,7 +45,7 @@ ng-click="$ctrl.openCal('ini_opened')" ng-change="$ctrl.updateDates()" is-open="$ctrl.cal.ini_opened" - ng-required="true" close-text="Close"/> + ng-required="true" current-text="<%=l 'Today' %>" clear-text="<%=l 'Clear' %>" close-text="<%=l 'Close' %>"/> diff --git a/templates/bootstrap/change_password.html.ep b/templates/bootstrap/change_password.html.ep index 12559b335..d155324e1 100644 --- a/templates/bootstrap/change_password.html.ep +++ b/templates/bootstrap/change_password.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/new_group.html.ep b/templates/bootstrap/new_group.html.ep index eca7cbdbf..53c195a4b 100644 --- a/templates/bootstrap/new_group.html.ep +++ b/templates/bootstrap/new_group.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/new_user.html.ep b/templates/bootstrap/new_user.html.ep index dd70970d6..0935cc9d7 100644 --- a/templates/bootstrap/new_user.html.ep +++ b/templates/bootstrap/new_user.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/new_user_ok.html.ep b/templates/bootstrap/new_user_ok.html.ep index 75089fe69..2e1b76c6b 100644 --- a/templates/bootstrap/new_user_ok.html.ep +++ b/templates/bootstrap/new_user_ok.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/scripts.html.ep b/templates/bootstrap/scripts.html.ep index 55c35e367..067226885 100644 --- a/templates/bootstrap/scripts.html.ep +++ b/templates/bootstrap/scripts.html.ep @@ -4,6 +4,8 @@ + + @@ -35,6 +37,8 @@ + + diff --git a/templates/bootstrap/user_settings.html.ep b/templates/bootstrap/user_settings.html.ep index 0429b8593..5e90d24b6 100644 --- a/templates/bootstrap/user_settings.html.ep +++ b/templates/bootstrap/user_settings.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/about.html.ep b/templates/main/about.html.ep index d58d32c15..52bcd2cfe 100644 --- a/templates/main/about.html.ep +++ b/templates/main/about.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_charts.html.ep b/templates/main/admin_charts.html.ep index 1f0d4fc33..860c8ddf3 100644 --- a/templates/main/admin_charts.html.ep +++ b/templates/main/admin_charts.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header' diff --git a/templates/main/admin_group.html.ep b/templates/main/admin_group.html.ep index 1c6c485fd..c71c2a955 100644 --- a/templates/main/admin_group.html.ep +++ b/templates/main/admin_group.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_groups.html.ep b/templates/main/admin_groups.html.ep index 367ccafa9..71629582c 100644 --- a/templates/main/admin_groups.html.ep +++ b/templates/main/admin_groups.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_hostdev.html.ep b/templates/main/admin_hostdev.html.ep index 4b03768c6..ac7eb0c11 100644 --- a/templates/main/admin_hostdev.html.ep +++ b/templates/main/admin_hostdev.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_machines.html.ep b/templates/main/admin_machines.html.ep index 60386bcd4..3d7005df9 100644 --- a/templates/main/admin_machines.html.ep +++ b/templates/main/admin_machines.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_messages.html.ep b/templates/main/admin_messages.html.ep index 74d7f2a13..ae0ca37b9 100644 --- a/templates/main/admin_messages.html.ep +++ b/templates/main/admin_messages.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_monitoring.html.ep b/templates/main/admin_monitoring.html.ep index b8ad83acb..32235ec9d 100644 --- a/templates/main/admin_monitoring.html.ep +++ b/templates/main/admin_monitoring.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_networks.html.ep b/templates/main/admin_networks.html.ep index 2d70fd53b..41521b689 100644 --- a/templates/main/admin_networks.html.ep +++ b/templates/main/admin_networks.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_nodes.html.ep b/templates/main/admin_nodes.html.ep index 425806dbc..44fbb99fa 100644 --- a/templates/main/admin_nodes.html.ep +++ b/templates/main/admin_nodes.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_routes.html.ep b/templates/main/admin_routes.html.ep index afed4cbe9..09dd64c22 100644 --- a/templates/main/admin_routes.html.ep +++ b/templates/main/admin_routes.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_settings.html.ep b/templates/main/admin_settings.html.ep index 49eb82976..305548d78 100644 --- a/templates/main/admin_settings.html.ep +++ b/templates/main/admin_settings.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_storage.html.ep b/templates/main/admin_storage.html.ep index 315788b9d..9fb098542 100644 --- a/templates/main/admin_storage.html.ep +++ b/templates/main/admin_storage.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_users.html.ep b/templates/main/admin_users.html.ep index fb3bd82e5..f867d594c 100644 --- a/templates/main/admin_users.html.ep +++ b/templates/main/admin_users.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/list_bases_ng.html.ep b/templates/main/list_bases_ng.html.ep index d1262586d..52c0791f2 100644 --- a/templates/main/list_bases_ng.html.ep +++ b/templates/main/list_bases_ng.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/maintenance.html.ep b/templates/main/maintenance.html.ep index 0087adef2..d373adf7d 100644 --- a/templates/main/maintenance.html.ep +++ b/templates/main/maintenance.html.ep @@ -1,5 +1,5 @@ - + diff --git a/templates/main/manage_machine.html.ep b/templates/main/manage_machine.html.ep index c251b5355..2af19fbbb 100644 --- a/templates/main/manage_machine.html.ep +++ b/templates/main/manage_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/network_new.html.ep b/templates/main/network_new.html.ep index 79eb53170..4073da9d4 100644 --- a/templates/main/network_new.html.ep +++ b/templates/main/network_new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/new_machine.html.ep b/templates/main/new_machine.html.ep index bc9a96691..99a78c4e4 100644 --- a/templates/main/new_machine.html.ep +++ b/templates/main/new_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/new_node.html.ep b/templates/main/new_node.html.ep index 8c8d00cc0..380bbdd05 100644 --- a/templates/main/new_node.html.ep +++ b/templates/main/new_node.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/remove_machine.html.ep b/templates/main/remove_machine.html.ep index e1d5ae44d..3148eb98e 100644 --- a/templates/main/remove_machine.html.ep +++ b/templates/main/remove_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/request.html.ep b/templates/main/request.html.ep index 567508ddc..e56326f97 100644 --- a/templates/main/request.html.ep +++ b/templates/main/request.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/requirements.html.ep b/templates/main/requirements.html.ep index c2723d525..272537236 100644 --- a/templates/main/requirements.html.ep +++ b/templates/main/requirements.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/route_new.html.ep b/templates/main/route_new.html.ep index 4f00021a2..6b9c1ebf2 100644 --- a/templates/main/route_new.html.ep +++ b/templates/main/route_new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/run_request.html.ep b/templates/main/run_request.html.ep index 030b654b5..0958ee0a8 100644 --- a/templates/main/run_request.html.ep +++ b/templates/main/run_request.html.ep @@ -1,5 +1,5 @@ - + diff --git a/templates/main/settings_generic.html.ep b/templates/main/settings_generic.html.ep index f790c1ae6..a9601cbcd 100644 --- a/templates/main/settings_generic.html.ep +++ b/templates/main/settings_generic.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/settings_machine.html.ep b/templates/main/settings_machine.html.ep index 5d908a99d..494edfb51 100644 --- a/templates/main/settings_machine.html.ep +++ b/templates/main/settings_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/standard_message.html.ep b/templates/main/standard_message.html.ep index 23b5fdbdf..40a2845f6 100644 --- a/templates/main/standard_message.html.ep +++ b/templates/main/standard_message.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/start.html.ep b/templates/main/start.html.ep index cb18a2338..ade79a3e2 100644 --- a/templates/main/start.html.ep +++ b/templates/main/start.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header' %= include 'bootstrap/navigation' diff --git a/templates/main/storage_new.html.ep b/templates/main/storage_new.html.ep index 6271eb94d..82e9c28d9 100644 --- a/templates/main/storage_new.html.ep +++ b/templates/main/storage_new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header' diff --git a/templates/main/storage_unused.new.html.ep b/templates/main/storage_unused.new.html.ep index 0f3df768c..bfb0fd713 100644 --- a/templates/main/storage_unused.new.html.ep +++ b/templates/main/storage_unused.new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/upload_group_members.html.ep b/templates/main/upload_group_members.html.ep index 564159b53..29eba7998 100644 --- a/templates/main/upload_group_members.html.ep +++ b/templates/main/upload_group_members.html.ep @@ -1,5 +1,5 @@ - + %= include '/bootstrap/header'
diff --git a/templates/main/upload_users.html.ep b/templates/main/upload_users.html.ep index 9a5ac4196..4d6f33caa 100644 --- a/templates/main/upload_users.html.ep +++ b/templates/main/upload_users.html.ep @@ -1,5 +1,5 @@ - + %= include '/bootstrap/header'
diff --git a/templates/ng-templates/booking/calendar.html.ep b/templates/ng-templates/booking/calendar.html.ep index ce4659439..b0ff9e396 100644 --- a/templates/ng-templates/booking/calendar.html.ep +++ b/templates/ng-templates/booking/calendar.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
From 2a4865d418b0b94dc315950aa98996730ae2e788 Mon Sep 17 00:00:00 2001 From: Yago Diaz Date: Fri, 24 Jul 2026 12:52:39 +0200 Subject: [PATCH 2/4] getting rid of unnecessary code issue #2320 --- templates/bootstrap/change_password.html.ep | 2 +- templates/bootstrap/new_group.html.ep | 2 +- templates/bootstrap/new_user.html.ep | 2 +- templates/bootstrap/new_user_ok.html.ep | 2 +- templates/bootstrap/user_settings.html.ep | 2 +- templates/main/about.html.ep | 2 +- templates/main/admin_charts.html.ep | 2 +- templates/main/admin_group.html.ep | 2 +- templates/main/admin_groups.html.ep | 2 +- templates/main/admin_hostdev.html.ep | 2 +- templates/main/admin_machines.html.ep | 2 +- templates/main/admin_messages.html.ep | 2 +- templates/main/admin_monitoring.html.ep | 2 +- templates/main/admin_networks.html.ep | 2 +- templates/main/admin_nodes.html.ep | 2 +- templates/main/admin_routes.html.ep | 2 +- templates/main/admin_settings.html.ep | 2 +- templates/main/admin_storage.html.ep | 2 +- templates/main/admin_users.html.ep | 2 +- templates/main/list_bases_ng.html.ep | 2 +- templates/main/maintenance.html.ep | 2 +- templates/main/manage_machine.html.ep | 2 +- templates/main/network_new.html.ep | 2 +- templates/main/new_machine.html.ep | 2 +- templates/main/new_node.html.ep | 2 +- templates/main/remove_machine.html.ep | 2 +- templates/main/request.html.ep | 2 +- templates/main/requirements.html.ep | 2 +- templates/main/route_new.html.ep | 2 +- templates/main/run_request.html.ep | 2 +- templates/main/settings_generic.html.ep | 2 +- templates/main/settings_machine.html.ep | 2 +- templates/main/standard_message.html.ep | 2 +- templates/main/start.html.ep | 2 +- templates/main/storage_new.html.ep | 2 +- templates/main/storage_unused.new.html.ep | 2 +- templates/main/upload_group_members.html.ep | 2 +- templates/main/upload_users.html.ep | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/templates/bootstrap/change_password.html.ep b/templates/bootstrap/change_password.html.ep index d155324e1..12559b335 100644 --- a/templates/bootstrap/change_password.html.ep +++ b/templates/bootstrap/change_password.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/new_group.html.ep b/templates/bootstrap/new_group.html.ep index 53c195a4b..eca7cbdbf 100644 --- a/templates/bootstrap/new_group.html.ep +++ b/templates/bootstrap/new_group.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/new_user.html.ep b/templates/bootstrap/new_user.html.ep index 0935cc9d7..dd70970d6 100644 --- a/templates/bootstrap/new_user.html.ep +++ b/templates/bootstrap/new_user.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/new_user_ok.html.ep b/templates/bootstrap/new_user_ok.html.ep index 2e1b76c6b..75089fe69 100644 --- a/templates/bootstrap/new_user_ok.html.ep +++ b/templates/bootstrap/new_user_ok.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/bootstrap/user_settings.html.ep b/templates/bootstrap/user_settings.html.ep index 5e90d24b6..0429b8593 100644 --- a/templates/bootstrap/user_settings.html.ep +++ b/templates/bootstrap/user_settings.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/about.html.ep b/templates/main/about.html.ep index 52bcd2cfe..d58d32c15 100644 --- a/templates/main/about.html.ep +++ b/templates/main/about.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_charts.html.ep b/templates/main/admin_charts.html.ep index 860c8ddf3..1f0d4fc33 100644 --- a/templates/main/admin_charts.html.ep +++ b/templates/main/admin_charts.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header' diff --git a/templates/main/admin_group.html.ep b/templates/main/admin_group.html.ep index c71c2a955..1c6c485fd 100644 --- a/templates/main/admin_group.html.ep +++ b/templates/main/admin_group.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_groups.html.ep b/templates/main/admin_groups.html.ep index 71629582c..367ccafa9 100644 --- a/templates/main/admin_groups.html.ep +++ b/templates/main/admin_groups.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_hostdev.html.ep b/templates/main/admin_hostdev.html.ep index ac7eb0c11..4b03768c6 100644 --- a/templates/main/admin_hostdev.html.ep +++ b/templates/main/admin_hostdev.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_machines.html.ep b/templates/main/admin_machines.html.ep index 3d7005df9..60386bcd4 100644 --- a/templates/main/admin_machines.html.ep +++ b/templates/main/admin_machines.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_messages.html.ep b/templates/main/admin_messages.html.ep index ae0ca37b9..74d7f2a13 100644 --- a/templates/main/admin_messages.html.ep +++ b/templates/main/admin_messages.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_monitoring.html.ep b/templates/main/admin_monitoring.html.ep index 32235ec9d..b8ad83acb 100644 --- a/templates/main/admin_monitoring.html.ep +++ b/templates/main/admin_monitoring.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_networks.html.ep b/templates/main/admin_networks.html.ep index 41521b689..2d70fd53b 100644 --- a/templates/main/admin_networks.html.ep +++ b/templates/main/admin_networks.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_nodes.html.ep b/templates/main/admin_nodes.html.ep index 44fbb99fa..425806dbc 100644 --- a/templates/main/admin_nodes.html.ep +++ b/templates/main/admin_nodes.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_routes.html.ep b/templates/main/admin_routes.html.ep index 09dd64c22..afed4cbe9 100644 --- a/templates/main/admin_routes.html.ep +++ b/templates/main/admin_routes.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_settings.html.ep b/templates/main/admin_settings.html.ep index 305548d78..49eb82976 100644 --- a/templates/main/admin_settings.html.ep +++ b/templates/main/admin_settings.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_storage.html.ep b/templates/main/admin_storage.html.ep index 9fb098542..315788b9d 100644 --- a/templates/main/admin_storage.html.ep +++ b/templates/main/admin_storage.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/admin_users.html.ep b/templates/main/admin_users.html.ep index f867d594c..fb3bd82e5 100644 --- a/templates/main/admin_users.html.ep +++ b/templates/main/admin_users.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/list_bases_ng.html.ep b/templates/main/list_bases_ng.html.ep index 52c0791f2..d1262586d 100644 --- a/templates/main/list_bases_ng.html.ep +++ b/templates/main/list_bases_ng.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/maintenance.html.ep b/templates/main/maintenance.html.ep index d373adf7d..0087adef2 100644 --- a/templates/main/maintenance.html.ep +++ b/templates/main/maintenance.html.ep @@ -1,5 +1,5 @@ - + diff --git a/templates/main/manage_machine.html.ep b/templates/main/manage_machine.html.ep index 2af19fbbb..c251b5355 100644 --- a/templates/main/manage_machine.html.ep +++ b/templates/main/manage_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/network_new.html.ep b/templates/main/network_new.html.ep index 4073da9d4..79eb53170 100644 --- a/templates/main/network_new.html.ep +++ b/templates/main/network_new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/new_machine.html.ep b/templates/main/new_machine.html.ep index 99a78c4e4..bc9a96691 100644 --- a/templates/main/new_machine.html.ep +++ b/templates/main/new_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/new_node.html.ep b/templates/main/new_node.html.ep index 380bbdd05..8c8d00cc0 100644 --- a/templates/main/new_node.html.ep +++ b/templates/main/new_node.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/remove_machine.html.ep b/templates/main/remove_machine.html.ep index 3148eb98e..e1d5ae44d 100644 --- a/templates/main/remove_machine.html.ep +++ b/templates/main/remove_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/request.html.ep b/templates/main/request.html.ep index e56326f97..567508ddc 100644 --- a/templates/main/request.html.ep +++ b/templates/main/request.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/requirements.html.ep b/templates/main/requirements.html.ep index 272537236..c2723d525 100644 --- a/templates/main/requirements.html.ep +++ b/templates/main/requirements.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/route_new.html.ep b/templates/main/route_new.html.ep index 6b9c1ebf2..4f00021a2 100644 --- a/templates/main/route_new.html.ep +++ b/templates/main/route_new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/run_request.html.ep b/templates/main/run_request.html.ep index 0958ee0a8..030b654b5 100644 --- a/templates/main/run_request.html.ep +++ b/templates/main/run_request.html.ep @@ -1,5 +1,5 @@ - + diff --git a/templates/main/settings_generic.html.ep b/templates/main/settings_generic.html.ep index a9601cbcd..f790c1ae6 100644 --- a/templates/main/settings_generic.html.ep +++ b/templates/main/settings_generic.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/settings_machine.html.ep b/templates/main/settings_machine.html.ep index 494edfb51..5d908a99d 100644 --- a/templates/main/settings_machine.html.ep +++ b/templates/main/settings_machine.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/standard_message.html.ep b/templates/main/standard_message.html.ep index 40a2845f6..23b5fdbdf 100644 --- a/templates/main/standard_message.html.ep +++ b/templates/main/standard_message.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/start.html.ep b/templates/main/start.html.ep index ade79a3e2..cb18a2338 100644 --- a/templates/main/start.html.ep +++ b/templates/main/start.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header' %= include 'bootstrap/navigation' diff --git a/templates/main/storage_new.html.ep b/templates/main/storage_new.html.ep index 82e9c28d9..6271eb94d 100644 --- a/templates/main/storage_new.html.ep +++ b/templates/main/storage_new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header' diff --git a/templates/main/storage_unused.new.html.ep b/templates/main/storage_unused.new.html.ep index bfb0fd713..0f3df768c 100644 --- a/templates/main/storage_unused.new.html.ep +++ b/templates/main/storage_unused.new.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'
diff --git a/templates/main/upload_group_members.html.ep b/templates/main/upload_group_members.html.ep index 29eba7998..564159b53 100644 --- a/templates/main/upload_group_members.html.ep +++ b/templates/main/upload_group_members.html.ep @@ -1,5 +1,5 @@ - + %= include '/bootstrap/header'
diff --git a/templates/main/upload_users.html.ep b/templates/main/upload_users.html.ep index 4d6f33caa..9a5ac4196 100644 --- a/templates/main/upload_users.html.ep +++ b/templates/main/upload_users.html.ep @@ -1,5 +1,5 @@ - + %= include '/bootstrap/header'
From d5654dab4e72be0c83ab723b96a94e9a37085405 Mon Sep 17 00:00:00 2001 From: Yago Diaz Date: Mon, 27 Jul 2026 10:24:08 +0200 Subject: [PATCH 3/4] add more frases issue #2320 --- lib/Ravada/I18N/ca.po | 15 +++++++++++++ lib/Ravada/I18N/en.po | 15 +++++++++++++ lib/Ravada/I18N/es.po | 24 +++++++++++++++++++++ lib/Ravada/I18N/messages.pot | 15 +++++++++++++ templates/main/machine_access_group.html.ep | 2 +- 5 files changed, 70 insertions(+), 1 deletion(-) diff --git a/lib/Ravada/I18N/ca.po b/lib/Ravada/I18N/ca.po index d2dd15de9..f6991d14c 100644 --- a/lib/Ravada/I18N/ca.po +++ b/lib/Ravada/I18N/ca.po @@ -2788,3 +2788,18 @@ msgstr "Esborra" msgid "LDAP groups allowed" msgstr "Grups LDAP permesos" + +msgid "No devices found" +msgstr "No s'han trobat dispositius" + +msgid "found" +msgstr "trobats" + +msgid "Storage Pool" +msgstr "Emmagatzematge" + +msgid "There are no machines that match the selection" +msgstr "No hi ha cap màquina que coincideixi amb la selecció" + +msgid "more" +msgstr "més" diff --git a/lib/Ravada/I18N/en.po b/lib/Ravada/I18N/en.po index 9d89f020b..8cf56b64b 100644 --- a/lib/Ravada/I18N/en.po +++ b/lib/Ravada/I18N/en.po @@ -2622,3 +2622,18 @@ msgstr "Clear" msgid "LDAP groups allowed" msgstr "LDAP groups allowed" + +msgid "No devices found" +msgstr "No devices found" + +msgid "found" +msgstr "found" + +msgid "Storage Pool" +msgstr "Storage Pool" + +msgid "There are no machines that match the selection" +msgstr "There are no machines that match the selection" + +msgid "more" +msgstr "more" diff --git a/lib/Ravada/I18N/es.po b/lib/Ravada/I18N/es.po index 4b60f61e2..776cb89c8 100644 --- a/lib/Ravada/I18N/es.po +++ b/lib/Ravada/I18N/es.po @@ -2712,3 +2712,27 @@ msgstr "Limpiar" msgid "LDAP groups allowed" msgstr "Grupos LDAP permitidos" + +msgid "Local groups" +msgstr "Grupos locales" + +msgid "LDAP groups" +msgstr "Grupos LDAP" + +msgid "No devices found" +msgstr "No se encontraron dispositivos" + +msgid "found" +msgstr "encontrados" + +msgid "Storage Pool" +msgstr "Almacenamiento" + +msgid "available" +msgstr "disponible" + +msgid "There are no machines that match the selection" +msgstr "No hay máquinas que coincidan con la seleción" + +msgid "more" +msgstr "más" diff --git a/lib/Ravada/I18N/messages.pot b/lib/Ravada/I18N/messages.pot index 8aa45617d..9d45a1a7d 100644 --- a/lib/Ravada/I18N/messages.pot +++ b/lib/Ravada/I18N/messages.pot @@ -2735,3 +2735,18 @@ msgstr "" msgid "LDAP groups allowed" msgstr "" + +msgid "No devices found" +msgstr "" + +msgid "found" +msgstr "" + +msgid "Storage Pool" +msgstr "" + +msgid "There are no machines that match the selection" +msgstr "" + +msgid "more" +msgstr "" diff --git a/templates/main/machine_access_group.html.ep b/templates/main/machine_access_group.html.ep index f288ac5dd..fdb068f8b 100644 --- a/templates/main/machine_access_group.html.ep +++ b/templates/main/machine_access_group.html.ep @@ -4,7 +4,7 @@
-

LDAP groups

+

<%=l 'LDAP groups' %>

Date: Tue, 28 Jul 2026 11:45:57 +0200 Subject: [PATCH 4/4] added copilot proposed changes issue #2320 --- lib/Ravada/I18N/es.po | 2 +- public/js/booking/booking.module.js | 10 +++++++--- public/js/booking/calendar.component.js | 6 +++++- templates/booking/formEvent.component.html.ep | 2 +- templates/bootstrap/scripts.html.ep | 4 ++-- templates/ng-templates/booking/calendar.html.ep | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/Ravada/I18N/es.po b/lib/Ravada/I18N/es.po index 776cb89c8..a6d3a89d7 100644 --- a/lib/Ravada/I18N/es.po +++ b/lib/Ravada/I18N/es.po @@ -2732,7 +2732,7 @@ msgid "available" msgstr "disponible" msgid "There are no machines that match the selection" -msgstr "No hay máquinas que coincidan con la seleción" +msgstr "No hay máquinas que coincidan con la selección" msgid "more" msgstr "más" diff --git a/public/js/booking/booking.module.js b/public/js/booking/booking.module.js index 9d38d7538..66ae5f8e4 100644 --- a/public/js/booking/booking.module.js +++ b/public/js/booking/booking.module.js @@ -21,8 +21,12 @@ angular.module("ravada.booking", ['ui.bootstrap','angularMoment','angularjsToast .service("apiEntry",svcEntry) .service("apiLDAP",svcLDAP) .service("apiLocal",svcLocal) - .run( amMoment => { - const lang = document.documentElement.lang || 'en'; - amMoment.changeLocale(lang); + .run( (amMoment, moment) => { + const rawLang = document.documentElement.lang || 'en'; + const normalized = rawLang.toLowerCase().replace(/_/g, '-').replace(/@/g, '-'); + const locales = (moment && typeof moment.locales === 'function') ? moment.locales() : []; + const base = normalized.split('-')[0]; + const resolved = locales.includes(normalized) ? normalized : (locales.includes(base) ? base : 'en'); + amMoment.changeLocale(resolved); }); diff --git a/public/js/booking/calendar.component.js b/public/js/booking/calendar.component.js index d1fc1066d..92f426309 100644 --- a/public/js/booking/calendar.component.js +++ b/public/js/booking/calendar.component.js @@ -12,7 +12,11 @@ calendarCtrl.$inject = ['$element', '$window', 'apiBookings','$uibModal','moment function calendarCtrl($element, $window, apiBookings,$uibModal,moment,apiEntry) { const self = this; - const lang = document.documentElement.lang || 'en'; + const rawLang = document.documentElement.lang || 'en'; + const normalized = rawLang.toLowerCase().replace(/_/g, '-').replace(/@/g, '-'); + const locales = (moment && typeof moment.locales === 'function') ? moment.locales() : []; + const base = normalized.split('-')[0]; + const lang = locales.includes(normalized) ? normalized : (locales.includes(base) ? base : 'en'); const parseDate = (data, time) => data + "T" + time; const TimeFormat = { hour: '2-digit', diff --git a/templates/booking/formEvent.component.html.ep b/templates/booking/formEvent.component.html.ep index e71b1e2e0..1c3ca4118 100644 --- a/templates/booking/formEvent.component.html.ep +++ b/templates/booking/formEvent.component.html.ep @@ -62,7 +62,7 @@ ng-click="$ctrl.openCal('until_opened')" is-open="$ctrl.cal.until_opened" datepicker-options="$ctrl.optionsDateEnd" - ng-required="true" close-text="Close"/> + ng-required="true" current-text="<%=l 'Today' %>" clear-text="<%=l 'Clear' %>" close-text="<%=l 'Close' %>"/>
diff --git a/templates/bootstrap/scripts.html.ep b/templates/bootstrap/scripts.html.ep index 067226885..b3c1e4fd5 100644 --- a/templates/bootstrap/scripts.html.ep +++ b/templates/bootstrap/scripts.html.ep @@ -4,7 +4,7 @@ - + @@ -37,7 +37,7 @@ - + diff --git a/templates/ng-templates/booking/calendar.html.ep b/templates/ng-templates/booking/calendar.html.ep index b0ff9e396..ba6b8c5a1 100644 --- a/templates/ng-templates/booking/calendar.html.ep +++ b/templates/ng-templates/booking/calendar.html.ep @@ -1,5 +1,5 @@ - + %= include 'bootstrap/header'