diff --git a/README.md b/README.md index 541a3bb..2a9ff07 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ This plugin provides a specialized case management system for Security Operation - SOC-specific KPI dashboard and reporting - Role-based access control - Search and filtering capabilities +- Multilanguage support (German, English, French, Italian, Polish, Spanish, Portuguese) ## Requirements - GLPI >= 10.0.0 diff --git a/SOC-Case-Management.xml b/SOC-Case-Management.xml index 2427fd3..caac218 100644 --- a/SOC-Case-Management.xml +++ b/SOC-Case-Management.xml @@ -8,9 +8,11 @@ SOC-Case-Management GLPI-Plugin. SOC-Case-Management GLPI plugin. - Plugin GLPI SOC-Case-Management.ac + Plugin GLPI SOC-Case-Management. Plug-in GLPI "SOC-Case-Management". Plugin SOC-Case-Management. + Plugin GLPI de SOC-Case-Management. + Plugin GLPI de SOC-Case-Management. SOC-Case-Management-Integrations-GLPI-Plugin. @@ -18,6 +20,8 @@ SOC-Case-Management integration GLPI plugin. Plug-in GLPI di integrazione SOC-Case-Management. Wtyczka GLPI dla SOC-Case-Management. + Plugin de integración SOC-Case-Management para GLPI. + Plugin de integração SOC-Case-Management para GLPI. https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/ @@ -40,6 +44,8 @@ fr_FR it_IT pl_PL + es_ES + pt_PT GPL V3+ @@ -57,4 +63,4 @@ https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/blob/main/docs/images/screenshot2.png?raw=true https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/blob/main/docs/images/screenshot3.png?raw=true - + \ No newline at end of file diff --git a/inc/case.class.php b/inc/case.class.php index 4f1be7c..740807c 100644 --- a/inc/case.class.php +++ b/inc/case.class.php @@ -24,7 +24,7 @@ class PluginSocCase extends CommonDBTM { * @return string */ static function getTypeName($nb = 0) { - return _n('SOC Case', 'SOC Cases', $nb); + return _n('SOC Case', 'SOC Cases', $nb, 'soc'); } /** @@ -56,7 +56,7 @@ class PluginSocCase extends CommonDBTM { self::SEVERITY_CRITICAL => __('Critical', 'soc'), self::SEVERITY_HIGH => __('High', 'soc'), self::SEVERITY_MEDIUM => __('Medium', 'soc'), - self::SEVERITY_MEDIUM => __('Low', 'soc') + self::SEVERITY_LOW => __('Low', 'soc') ]; } diff --git a/locales/de_DE/soc.po b/locales/de_DE/soc.po new file mode 100644 index 0000000..c8eee8e --- /dev/null +++ b/locales/de_DE/soc.po @@ -0,0 +1,102 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLPI SOC Case Management Plugin\n" +"POT-Creation-Date: 2025-04-15 12:00+0200\n" +"PO-Revision-Date: 2025-04-15 12:00+0200\n" +"Last-Translator: Your Organization\n" +"Language-Team: German\n" +"Language: de_DE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "SOC Case" +msgstr "SOC-Fall" + +msgid "SOC Cases" +msgstr "SOC-Fälle" + +msgid "SOC Dashboard" +msgstr "SOC-Dashboard" + +msgid "SOC Case Management Dashboard" +msgstr "SOC-Fallmanagement-Dashboard" + +msgid "Total Cases" +msgstr "Gesamtfälle" + +msgid "New Cases" +msgstr "Neue Fälle" + +msgid "Critical Cases" +msgstr "Kritische Fälle" + +msgid "Recent Cases" +msgstr "Aktuelle Fälle" + +msgid "No cases found." +msgstr "Keine Fälle gefunden." + +msgid "View all cases" +msgstr "Alle Fälle anzeigen" + +msgid "Create new case" +msgstr "Neuen Fall erstellen" + +msgid "Status" +msgstr "Status" + +msgid "Severity" +msgstr "Schweregrad" + +msgid "Critical" +msgstr "Kritisch" + +msgid "High" +msgstr "Hoch" + +msgid "Medium" +msgstr "Mittel" + +msgid "Low" +msgstr "Niedrig" + +msgid "New" +msgstr "Neu" + +msgid "Assigned" +msgstr "Zugewiesen" + +msgid "In Progress" +msgstr "In Bearbeitung" + +msgid "Pending" +msgstr "Ausstehend" + +msgid "Resolved" +msgstr "Gelöst" + +msgid "Closed" +msgstr "Geschlossen" + +msgid "Technician" +msgstr "Techniker" + +msgid "Description" +msgstr "Beschreibung" + +msgid "Case created" +msgstr "Fall erstellt" + +msgid "%s updated %s from %s to %s" +msgstr "%s hat %s von %s auf %s aktualisiert" + +msgid "Ticket %s created: %s" +msgstr "Ticket %s erstellt: %s" + +msgid "Change %s created: %s" +msgstr "Änderung %s erstellt: %s" + +msgid "[SOC Case #%s] %s" +msgstr "[SOC-Fall #%s] %s" \ No newline at end of file diff --git a/locales/en_GB/soc.po b/locales/en_GB/soc.po new file mode 100644 index 0000000..889b944 --- /dev/null +++ b/locales/en_GB/soc.po @@ -0,0 +1,102 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLPI SOC Case Management Plugin\n" +"POT-Creation-Date: 2025-04-15 12:00+0200\n" +"PO-Revision-Date: 2025-04-15 12:00+0200\n" +"Last-Translator: Your Organization\n" +"Language-Team: English\n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "SOC Case" +msgstr "SOC Case" + +msgid "SOC Cases" +msgstr "SOC Cases" + +msgid "SOC Dashboard" +msgstr "SOC Dashboard" + +msgid "SOC Case Management Dashboard" +msgstr "SOC Case Management Dashboard" + +msgid "Total Cases" +msgstr "Total Cases" + +msgid "New Cases" +msgstr "New Cases" + +msgid "Critical Cases" +msgstr "Critical Cases" + +msgid "Recent Cases" +msgstr "Recent Cases" + +msgid "No cases found." +msgstr "No cases found." + +msgid "View all cases" +msgstr "View all cases" + +msgid "Create new case" +msgstr "Create new case" + +msgid "Status" +msgstr "Status" + +msgid "Severity" +msgstr "Severity" + +msgid "Critical" +msgstr "Critical" + +msgid "High" +msgstr "High" + +msgid "Medium" +msgstr "Medium" + +msgid "Low" +msgstr "Low" + +msgid "New" +msgstr "New" + +msgid "Assigned" +msgstr "Assigned" + +msgid "In Progress" +msgstr "In Progress" + +msgid "Pending" +msgstr "Pending" + +msgid "Resolved" +msgstr "Resolved" + +msgid "Closed" +msgstr "Closed" + +msgid "Technician" +msgstr "Technician" + +msgid "Description" +msgstr "Description" + +msgid "Case created" +msgstr "Case created" + +msgid "%s updated %s from %s to %s" +msgstr "%s updated %s from %s to %s" + +msgid "Ticket %s created: %s" +msgstr "Ticket %s created: %s" + +msgid "Change %s created: %s" +msgstr "Change %s created: %s" + +msgid "[SOC Case #%s] %s" +msgstr "[SOC Case #%s] %s" \ No newline at end of file diff --git a/locales/es_ES/soc.po b/locales/es_ES/soc.po new file mode 100644 index 0000000..e893661 --- /dev/null +++ b/locales/es_ES/soc.po @@ -0,0 +1,102 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLPI SOC Case Management Plugin\n" +"POT-Creation-Date: 2025-04-15 12:00+0200\n" +"PO-Revision-Date: 2025-04-15 12:00+0200\n" +"Last-Translator: Your Organization\n" +"Language-Team: Spanish\n" +"Language: es_ES\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "SOC Case" +msgstr "Caso SOC" + +msgid "SOC Cases" +msgstr "Casos SOC" + +msgid "SOC Dashboard" +msgstr "Panel SOC" + +msgid "SOC Case Management Dashboard" +msgstr "Panel de gestión de casos SOC" + +msgid "Total Cases" +msgstr "Total de casos" + +msgid "New Cases" +msgstr "Nuevos casos" + +msgid "Critical Cases" +msgstr "Casos críticos" + +msgid "Recent Cases" +msgstr "Casos recientes" + +msgid "No cases found." +msgstr "No se encontraron casos." + +msgid "View all cases" +msgstr "Ver todos los casos" + +msgid "Create new case" +msgstr "Crear nuevo caso" + +msgid "Status" +msgstr "Estado" + +msgid "Severity" +msgstr "Gravedad" + +msgid "Critical" +msgstr "Crítico" + +msgid "High" +msgstr "Alto" + +msgid "Medium" +msgstr "Medio" + +msgid "Low" +msgstr "Bajo" + +msgid "New" +msgstr "Nuevo" + +msgid "Assigned" +msgstr "Asignado" + +msgid "In Progress" +msgstr "En progreso" + +msgid "Pending" +msgstr "Pendiente" + +msgid "Resolved" +msgstr "Resuelto" + +msgid "Closed" +msgstr "Cerrado" + +msgid "Technician" +msgstr "Técnico" + +msgid "Description" +msgstr "Descripción" + +msgid "Case created" +msgstr "Caso creado" + +msgid "%s updated %s from %s to %s" +msgstr "%s actualizó %s de %s a %s" + +msgid "Ticket %s created: %s" +msgstr "Ticket %s creado: %s" + +msgid "Change %s created: %s" +msgstr "Cambio %s creado: %s" + +msgid "[SOC Case #%s] %s" +msgstr "[Caso SOC #%s] %s" \ No newline at end of file diff --git a/locales/fr_FR/soc.po b/locales/fr_FR/soc.po new file mode 100644 index 0000000..f4fbf9f --- /dev/null +++ b/locales/fr_FR/soc.po @@ -0,0 +1,102 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLPI SOC Case Management Plugin\n" +"POT-Creation-Date: 2025-04-15 12:00+0200\n" +"PO-Revision-Date: 2025-04-15 12:00+0200\n" +"Last-Translator: Your Organization\n" +"Language-Team: French\n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +msgid "SOC Case" +msgstr "Cas SOC" + +msgid "SOC Cases" +msgstr "Cas SOC" + +msgid "SOC Dashboard" +msgstr "Tableau de bord SOC" + +msgid "SOC Case Management Dashboard" +msgstr "Tableau de bord de gestion des cas SOC" + +msgid "Total Cases" +msgstr "Total des cas" + +msgid "New Cases" +msgstr "Nouveaux cas" + +msgid "Critical Cases" +msgstr "Cas critiques" + +msgid "Recent Cases" +msgstr "Cas récents" + +msgid "No cases found." +msgstr "Aucun cas trouvé." + +msgid "View all cases" +msgstr "Voir tous les cas" + +msgid "Create new case" +msgstr "Créer un nouveau cas" + +msgid "Status" +msgstr "Statut" + +msgid "Severity" +msgstr "Sévérité" + +msgid "Critical" +msgstr "Critique" + +msgid "High" +msgstr "Élevée" + +msgid "Medium" +msgstr "Moyenne" + +msgid "Low" +msgstr "Faible" + +msgid "New" +msgstr "Nouveau" + +msgid "Assigned" +msgstr "Assigné" + +msgid "In Progress" +msgstr "En cours" + +msgid "Pending" +msgstr "En attente" + +msgid "Resolved" +msgstr "Résolu" + +msgid "Closed" +msgstr "Fermé" + +msgid "Technician" +msgstr "Technicien" + +msgid "Description" +msgstr "Description" + +msgid "Case created" +msgstr "Cas créé" + +msgid "%s updated %s from %s to %s" +msgstr "%s a mis à jour %s de %s à %s" + +msgid "Ticket %s created: %s" +msgstr "Ticket %s créé: %s" + +msgid "Change %s created: %s" +msgstr "Changement %s créé: %s" + +msgid "[SOC Case #%s] %s" +msgstr "[Cas SOC #%s] %s" \ No newline at end of file diff --git a/locales/it_IT/soc.po b/locales/it_IT/soc.po new file mode 100644 index 0000000..e40d14f --- /dev/null +++ b/locales/it_IT/soc.po @@ -0,0 +1,102 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLPI SOC Case Management Plugin\n" +"POT-Creation-Date: 2025-04-15 12:00+0200\n" +"PO-Revision-Date: 2025-04-15 12:00+0200\n" +"Last-Translator: Your Organization\n" +"Language-Team: Italian\n" +"Language: it_IT\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "SOC Case" +msgstr "Caso SOC" + +msgid "SOC Cases" +msgstr "Casi SOC" + +msgid "SOC Dashboard" +msgstr "Dashboard SOC" + +msgid "SOC Case Management Dashboard" +msgstr "Dashboard di gestione casi SOC" + +msgid "Total Cases" +msgstr "Casi totali" + +msgid "New Cases" +msgstr "Nuovi casi" + +msgid "Critical Cases" +msgstr "Casi critici" + +msgid "Recent Cases" +msgstr "Casi recenti" + +msgid "No cases found." +msgstr "Nessun caso trovato." + +msgid "View all cases" +msgstr "Visualizza tutti i casi" + +msgid "Create new case" +msgstr "Crea nuovo caso" + +msgid "Status" +msgstr "Stato" + +msgid "Severity" +msgstr "Gravità" + +msgid "Critical" +msgstr "Critico" + +msgid "High" +msgstr "Alto" + +msgid "Medium" +msgstr "Medio" + +msgid "Low" +msgstr "Basso" + +msgid "New" +msgstr "Nuovo" + +msgid "Assigned" +msgstr "Assegnato" + +msgid "In Progress" +msgstr "In corso" + +msgid "Pending" +msgstr "In attesa" + +msgid "Resolved" +msgstr "Risolto" + +msgid "Closed" +msgstr "Chiuso" + +msgid "Technician" +msgstr "Tecnico" + +msgid "Description" +msgstr "Descrizione" + +msgid "Case created" +msgstr "Caso creato" + +msgid "%s updated %s from %s to %s" +msgstr "%s ha aggiornato %s da %s a %s" + +msgid "Ticket %s created: %s" +msgstr "Ticket %s creato: %s" + +msgid "Change %s created: %s" +msgstr "Modifica %s creata: %s" + +msgid "[SOC Case #%s] %s" +msgstr "[Caso SOC #%s] %s" \ No newline at end of file diff --git a/locales/pl_PL/soc.po b/locales/pl_PL/soc.po new file mode 100644 index 0000000..5f71164 --- /dev/null +++ b/locales/pl_PL/soc.po @@ -0,0 +1,102 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLPI SOC Case Management Plugin\n" +"POT-Creation-Date: 2025-04-15 12:00+0200\n" +"PO-Revision-Date: 2025-04-15 12:00+0200\n" +"Last-Translator: Your Organization\n" +"Language-Team: Polish\n" +"Language: pl_PL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +msgid "SOC Case" +msgstr "Przypadek SOC" + +msgid "SOC Cases" +msgstr "Przypadki SOC" + +msgid "SOC Dashboard" +msgstr "Panel SOC" + +msgid "SOC Case Management Dashboard" +msgstr "Panel zarządzania przypadkami SOC" + +msgid "Total Cases" +msgstr "Wszystkie przypadki" + +msgid "New Cases" +msgstr "Nowe przypadki" + +msgid "Critical Cases" +msgstr "Krytyczne przypadki" + +msgid "Recent Cases" +msgstr "Ostatnie przypadki" + +msgid "No cases found." +msgstr "Nie znaleziono przypadków." + +msgid "View all cases" +msgstr "Zobacz wszystkie przypadki" + +msgid "Create new case" +msgstr "Utwórz nowy przypadek" + +msgid "Status" +msgstr "Status" + +msgid "Severity" +msgstr "Ważność" + +msgid "Critical" +msgstr "Krytyczny" + +msgid "High" +msgstr "Wysoki" + +msgid "Medium" +msgstr "Średni" + +msgid "Low" +msgstr "Niski" + +msgid "New" +msgstr "Nowy" + +msgid "Assigned" +msgstr "Przypisany" + +msgid "In Progress" +msgstr "W trakcie" + +msgid "Pending" +msgstr "Oczekujący" + +msgid "Resolved" +msgstr "Rozwiązany" + +msgid "Closed" +msgstr "Zamknięty" + +msgid "Technician" +msgstr "Technik" + +msgid "Description" +msgstr "Opis" + +msgid "Case created" +msgstr "Przypadek utworzony" + +msgid "%s updated %s from %s to %s" +msgstr "%s zaktualizował %s z %s na %s" + +msgid "Ticket %s created: %s" +msgstr "Zgłoszenie %s utworzone: %s" + +msgid "Change %s created: %s" +msgstr "Zmiana %s utworzona: %s" + +msgid "[SOC Case #%s] %s" +msgstr "[Przypadek SOC #%s] %s" \ No newline at end of file diff --git a/locales/pt_PT/soc.po b/locales/pt_PT/soc.po new file mode 100644 index 0000000..dab396b --- /dev/null +++ b/locales/pt_PT/soc.po @@ -0,0 +1,102 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLPI SOC Case Management Plugin\n" +"POT-Creation-Date: 2025-04-15 12:00+0200\n" +"PO-Revision-Date: 2025-04-15 12:00+0200\n" +"Last-Translator: Your Organization\n" +"Language-Team: Portuguese\n" +"Language: pt_PT\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "SOC Case" +msgstr "Caso SOC" + +msgid "SOC Cases" +msgstr "Casos SOC" + +msgid "SOC Dashboard" +msgstr "Painel SOC" + +msgid "SOC Case Management Dashboard" +msgstr "Painel de gestão de casos SOC" + +msgid "Total Cases" +msgstr "Total de casos" + +msgid "New Cases" +msgstr "Novos casos" + +msgid "Critical Cases" +msgstr "Casos críticos" + +msgid "Recent Cases" +msgstr "Casos recentes" + +msgid "No cases found." +msgstr "Nenhum caso encontrado." + +msgid "View all cases" +msgstr "Ver todos os casos" + +msgid "Create new case" +msgstr "Criar novo caso" + +msgid "Status" +msgstr "Estado" + +msgid "Severity" +msgstr "Gravidade" + +msgid "Critical" +msgstr "Crítico" + +msgid "High" +msgstr "Alto" + +msgid "Medium" +msgstr "Médio" + +msgid "Low" +msgstr "Baixo" + +msgid "New" +msgstr "Novo" + +msgid "Assigned" +msgstr "Atribuído" + +msgid "In Progress" +msgstr "Em progresso" + +msgid "Pending" +msgstr "Pendente" + +msgid "Resolved" +msgstr "Resolvido" + +msgid "Closed" +msgstr "Fechado" + +msgid "Technician" +msgstr "Técnico" + +msgid "Description" +msgstr "Descrição" + +msgid "Case created" +msgstr "Caso criado" + +msgid "%s updated %s from %s to %s" +msgstr "%s atualizou %s de %s para %s" + +msgid "Ticket %s created: %s" +msgstr "Ticket %s criado: %s" + +msgid "Change %s created: %s" +msgstr "Alteração %s criada: %s" + +msgid "[SOC Case #%s] %s" +msgstr "[Caso SOC #%s] %s" \ No newline at end of file diff --git a/plugin.php b/plugin.php index 9649734..677abd2 100644 --- a/plugin.php +++ b/plugin.php @@ -70,6 +70,9 @@ function plugin_init_soc() { $PLUGIN_HOOKS['javascript']['soc'] = ['/plugins/soc/js/soc.js']; $PLUGIN_HOOKS['add_css']['soc'] = ['/plugins/soc/css/soc.css']; + // Initialize translations + $PLUGIN_HOOKS['init_translations']['soc'] = 'initTranslations'; + if (Session::haveRight('plugin_soc_case', READ)) { $PLUGIN_HOOKS['menu_toadd']['soc'] = ['management' => 'PluginSocCase']; } @@ -87,4 +90,21 @@ function plugin_init_soc() { 'addtabtypes' => ['Ticket'] ]); } +} + +/** + * Initialize plugin translations + * + * @return void + */ +function initTranslations() { + global $CFG_GLPI; + + $domain = 'soc'; + $locale_dir = GLPI_ROOT . '/plugins/soc/locales/'; + + if (file_exists($locale_dir)) { + // Load plugin translations + $GLOBALS['LANG']->addTranslationFile('gettext', $locale_dir, $domain, $_SESSION['glpilanguage']); + } } \ No newline at end of file