diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c09b1ba..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: [push, pull_request] -name: Main -jobs: - php-cs-fixer: - name: PHP-CS-Fixer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: PHP-CS-Fixer - uses: docker://oskarstark/php-cs-fixer-ga diff --git a/.github/workflows/php-lint.yml b/.github/workflows/php-lint.yml deleted file mode 100644 index 3abbc65..0000000 --- a/.github/workflows/php-lint.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: PHP Linting -on: pull_request -jobs: - phplint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: michaelw90/PHP-Lint@master diff --git a/README.md b/README.md index ca791cd..f7670ec 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,6 @@ This plugin allows you to manage the rooms and the elements that are included in. A room is not the same as a location that already exists in GLPI because it can not contain items nor be loaned (which a room can be). -GLPI 9.5.1 compatibility added and tested. Translation fixed (gettext domain). -I also added a basic hungarian translation :) - Installation ------------ diff --git a/front/room.form.php b/front/room.form.php index fa31944..043318f 100644 --- a/front/room.form.php +++ b/front/room.form.php @@ -26,68 +26,56 @@ $newID = $room->add($_POST); Html::back(); -} else { - if (isset($_POST['delete'])) { // Supression d'une salle - $room->check($_POST['id'], DELETE); - - $room->delete($_POST); - Html::redirect($CFG_GLPI['root_doc'] . '/plugins/room/index.php'); - } else { - if (isset($_POST['purge'])) { // Purge de la salle - $room->check($_POST['id'], PURGE); - - $room->delete($_POST, 1); - Html::redirect($CFG_GLPI['root_doc'] . '/plugins/room/index.php'); - } else { - if (isset($_POST['restore'])) { // Restauration de la salle - $room->check($_POST['id'], PURGE); - - $room->restore($_POST); - Html::redirect($CFG_GLPI['root_doc'] . '/plugins/room/index.php'); - } else { - if (isset($_POST['update'])) { // Modification d'une salle - $room->check($_POST['id'], UPDATE); - - $room->update($_POST); - Html::back(); - } else { - if (isset($_POST['additem'])) { // Ajout de la liaison à un ordinateur - $room->check($_POST['room_id'], UPDATE); // Ça devrait pas être rooms_id? - - if ($_POST['room_id'] > 0 && $_POST['computers_id'] > 0) { - $room->plugin_room_AddDevice($_POST['room_id'], $_POST['computers_id']); - } - Html::back(); - } else { - if (isset($_POST['deleteitem'])) { // Suppression de la liaison à un ordinateur - $room->check($_POST['room_id'], UPDATE); - - if (count($_POST['item'])) { - foreach ($_POST['item'] as $key => $val) { - $room->plugin_room_DeleteDevice($key); - } - } - Html::back(); - } else { // Logiquement on passe ici pour visualiser une salle - $room->check($_GET['id'], READ); - - // test l'onglet de départ a afficher à l'ouverture de la fiche - if (!isset($_SESSION['glpi_tab'])) { - $_SESSION['glpi_tab'] = 1; - } - if (isset($_GET['tab'])) { - $_SESSION['glpi_tab'] = $_GET['tab']; - } - - Html::header(__('Room Management', 'room'), '', 'assets', 'pluginroommenu'); - - $room->display($_GET); - - Html::footer(); - } - } - } - } +} else if (isset($_POST['delete'])) { // Supression d'une salle + $room->check($_POST['id'], DELETE); + + $room->delete($_POST); + Html::redirect($CFG_GLPI['root_doc'] . '/plugins/room/index.php'); +} else if (isset($_POST['purge'])) { // Purge de la salle + $room->check($_POST['id'], PURGE); + + $room->delete($_POST, 1); + Html::redirect($CFG_GLPI['root_doc'] . '/plugins/room/index.php'); +} else if (isset($_POST['restore'])) { // Restauration de la salle + $room->check($_POST['id'], PURGE); + + $room->restore($_POST); + Html::redirect($CFG_GLPI['root_doc'] . '/plugins/room/index.php'); +} else if (isset($_POST['update'])) { // Modification d'une salle + $room->check($_POST['id'], UPDATE); + + $room->update($_POST); + Html::back(); +} else if (isset($_POST['additem'])) { // Ajout de la liaison à un ordinateur + $room->check($_POST['room_id'], UPDATE); // Ça devrait pas être rooms_id? + + if ($_POST['room_id'] > 0 && $_POST['computers_id'] > 0) { + $room->plugin_room_AddDevice($_POST['room_id'], $_POST['computers_id']); + } + Html::back(); +} else if (isset($_POST['deleteitem'])) { // Suppression de la liaison à un ordinateur + $room->check($_POST['room_id'], UPDATE); + + if (count($_POST['item'])) { + foreach ($_POST['item'] as $key => $val) { + $room->plugin_room_DeleteDevice($key); } } + Html::back(); +} else { // Logiquement on passe ici pour visualiser une salle + $room->check($_GET['id'], READ); + + // test l'onglet de départ a afficher à l'ouverture de la fiche + if (!isset($_SESSION['glpi_tab'])) { + $_SESSION['glpi_tab'] = 1; + } + if (isset($_GET['tab'])) { + $_SESSION['glpi_tab'] = $_GET['tab']; + } + + Html::header(__('Room Management', 'room'), '', 'assets', 'pluginroommenu'); + + $room->display($_GET); + + Html::footer(); } diff --git a/hook.php b/hook.php index d0ab39c..180b412 100644 --- a/hook.php +++ b/hook.php @@ -10,36 +10,36 @@ function plugin_room_install() if (!$DB->tableExists('glpi_plugin_room_rooms')) { $query = <<<'EOS' CREATE TABLE `glpi_plugin_room_rooms` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(255) collate utf8_unicode_ci default NULL, - `entities_id` int(11) NOT NULL default 0, - `locations_id` int(11) NOT NULL default 0, + `id` int unsigned NOT NULL auto_increment, + `name` varchar(255) collate utf8mb4_unicode_ci default NULL, + `entities_id` int unsigned NOT NULL default 0, + `locations_id` int unsigned NOT NULL default 0, `is_recursive` smallint(6) NOT NULL default 0, `is_deleted` smallint(6) NOT NULL default 0, - `type` int(11) NOT NULL default 0, - `date_mod` datetime default NULL, + `type` int unsigned NOT NULL default 0, + `date_mod` timestamp NULL default NULL, `size` smallint(6) NOT NULL default 0, `count_linked` smallint(6) NOT NULL default 0, - `buy` datetime default NULL, - `access` int(11) NOT NULL default 0, + `buy` timestamp NULL default NULL, + `access` int unsigned NOT NULL default 0, `printer` smallint(6) NOT NULL default 0, `videoprojector` smallint(6) NOT NULL default 0, `wifi` smallint(6) NOT NULL default 0, - `comment` text collate utf8_unicode_ci, - `opening` varchar(255) collate utf8_unicode_ci default NULL, - `limits` varchar(255) collate utf8_unicode_ci default NULL, - `text1` varchar(255) collate utf8_unicode_ci default NULL, - `text2` varchar(255) collate utf8_unicode_ci default NULL, - `dropdown1` int(11) NOT NULL default 0, - `dropdown2` int(11) NOT NULL default 0, - `tech_num` int(11) NOT NULL default 0, - `users_id` int(11) NOT NULL default 0, + `comment` text collate utf8mb4_unicode_ci, + `opening` varchar(255) collate utf8mb4_unicode_ci default NULL, + `limits` varchar(255) collate utf8mb4_unicode_ci default NULL, + `text1` varchar(255) collate utf8mb4_unicode_ci default NULL, + `text2` varchar(255) collate utf8mb4_unicode_ci default NULL, + `dropdown1` int unsigned NOT NULL default 0, + `dropdown2` int unsigned NOT NULL default 0, + `tech_num` int unsigned NOT NULL default 0, + `users_id` int unsigned NOT NULL default 0, `is_template` smallint(6) NOT NULL default 0, # not used / for reservation search engine `location` smallint(6) NOT NULL default 0, # not used / for reservation search engine `state` smallint(6) NOT NULL default 0, # not used / for reservation search engine - `manufacturers_id` smallint(6) NOT NULL default 0, # not used / for reservation search engine - `groups_id` smallint(6) NOT NULL default 0, # not used / for reservation search engine - `groups_id_tech` int(11) NOT NULL default 0 COMMENT "Group in charge of the hardware. RELATION to glpi_groups (id)", + `manufacturers_id` int unsigned NOT NULL default 0, # not used / for reservation search engine + `groups_id` int unsigned NOT NULL default 0, # not used / for reservation search engine + `groups_id_tech` int unsigned NOT NULL default 0 COMMENT "Group in charge of the hardware. RELATION to glpi_groups (id)", PRIMARY KEY (`id`), KEY `entities_id` (`entities_id`), KEY `is_deleted` (`is_deleted`), @@ -50,7 +50,7 @@ function plugin_room_install() KEY `dropdown2` (`dropdown2`), KEY `tech_num` (`tech_num`), KEY `users_id` (`users_id`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC EOS; $DB->query($query) || die('error adding glpi_plugin_room table ' . __('Error during the database update', 'room') . $DB->error()); } @@ -59,13 +59,13 @@ function plugin_room_install() if (!$DB->TableExists('glpi_plugin_room_rooms_computers')) { $query = <<<'EOS' CREATE TABLE `glpi_plugin_room_rooms_computers` ( - `id` int(11) NOT NULL auto_increment, - `computers_id` int(11) NOT NULL, - `rooms_id` int(11) NOT NULL, + `id` int unsigned NOT NULL auto_increment, + `computers_id` int unsigned NOT NULL, + `rooms_id` int unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE `computers_id` (`computers_id`), KEY `rooms_id` (`rooms_id`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; EOS; $DB->query($query) || die('error adding glpi_plugin_room_rooms_computers table ' . __('Error during the database update', 'room') . $DB->error()); } @@ -74,12 +74,12 @@ function plugin_room_install() if (!$DB->TableExists('glpi_plugin_room_roomtypes')) { $query = <<<'EOS' CREATE TABLE `glpi_plugin_room_roomtypes` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(255) collate utf8_unicode_ci default NULL, - `comment` text collate utf8_unicode_ci, + `id` int unsigned NOT NULL auto_increment, + `name` varchar(255) collate utf8mb4_unicode_ci default NULL, + `comment` text collate utf8mb4_unicode_ci, PRIMARY KEY (`id`), KEY `name` (`name`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; EOS; $DB->query($query) || die('error adding glpi_plugin_room_roomtypes table ' . __('Error during the database update', 'room') . $DB->error()); } @@ -88,12 +88,12 @@ function plugin_room_install() if (!$DB->TableExists('glpi_plugin_room_roomaccessconds')) { $query = <<<'EOS' CREATE TABLE `glpi_plugin_room_roomaccessconds` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(255) collate utf8_unicode_ci default NULL, - `comment` text collate utf8_unicode_ci, + `id` int unsigned NOT NULL auto_increment, + `name` varchar(255) collate utf8mb4_unicode_ci default NULL, + `comment` text collate utf8mb4_unicode_ci, PRIMARY KEY (`id`), KEY `name` (`name`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; EOS; $DB->query($query) || die('error adding glpi_plugin_room_roomaccessconds table ' . __('Error during the database update', 'room') . $DB->error()); } @@ -102,12 +102,12 @@ function plugin_room_install() if (!$DB->TableExists('glpi_plugin_room_dropdown1s')) { $query = <<<'EOS' CREATE TABLE `glpi_plugin_room_dropdown1s` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(255) collate utf8_unicode_ci default NULL, - `comment` text collate utf8_unicode_ci, + `id` int unsigned NOT NULL auto_increment, + `name` varchar(255) collate utf8mb4_unicode_ci default NULL, + `comment` text collate utf8mb4_unicode_ci, PRIMARY KEY (`id`), KEY `name` (`name`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; EOS; $DB->query($query) || die('error adding glpi_plugin_room_roomspecificities table ' . __('Error during the database update', 'room') . $DB->error()); } @@ -121,6 +121,7 @@ function plugin_room_uninstall() { global $DB; + // Drop plugin tables $tables = [ 'glpi_plugin_room_rooms_computers', 'glpi_plugin_room_roomtypes', @@ -133,6 +134,11 @@ function plugin_room_uninstall() $DB->query("DROP TABLE IF EXISTS `$table`;"); } + // Delete reservations + $DB->query('DELETE FROM `glpi_reservations` WHERE `reservationitems_id` in + (SELECT id FROM `glpi_reservationitems` WHERE `itemtype` = "PluginRoomRoom");'); + + // Delete logs, items and other things from glpi tables $tables_glpi = [ 'glpi_displaypreferences', 'glpi_documents_items', @@ -143,7 +149,7 @@ function plugin_room_uninstall() ]; foreach ($tables_glpi as $table_glpi) { - $DB->query('DELETE FROM `$table_glpi` WHERE `itemtype` = "PluginRoomRoom";'); + $DB->query("DELETE FROM `$table_glpi` WHERE `itemtype` = 'PluginRoomRoom';"); } return true; @@ -293,10 +299,10 @@ function plugin_room_getAddSearchOptions($itemtype) function plugin_room_addSelect($type, $ID, $num) { - global $SEARCH_OPTION; + $searchopt = &Search::getOptions($type); - $table = $SEARCH_OPTION[$type][$ID]['table']; - $field = $SEARCH_OPTION[$type][$ID]['field']; + $table = $searchopt[$ID]['table']; + $field = $searchopt[$ID]['field']; // Example of standard Select clause but use it ONLY for specific Select // No need of the function if you do not have specific cases @@ -358,7 +364,8 @@ function plugin_room_MassiveActionsProcess($data) function plugin_room_AssignToTicket($types) { - if (in_array('PluginRoomRoom', $_SESSION['glpiactiveprofile']['helpdesk_item_type'])) { + if (isset($_SESSION['glpiactiveprofile']['helpdesk_item_type']) + && in_array('PluginRoomRoom', $_SESSION['glpiactiveprofile']['helpdesk_item_type'])) { $types['PluginRoomRoom'] = __('Room Management', 'room'); } return $types; diff --git a/inc/profile.class.php b/inc/profile.class.php index 61c817c..e7a7326 100755 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -129,9 +129,10 @@ public function showForm($profiles_id = 0, $openform = true, $closeform = true) _sx('button', 'Save'), [ 'name' => 'update', + 'class' => 'btn btn-primary', ] ); - echo '\n'; + echo "\n"; Html::closeForm(); } echo ''; diff --git a/inc/room.class.php b/inc/room.class.php index 52a24b2..ca7cafb 100644 --- a/inc/room.class.php +++ b/inc/room.class.php @@ -2,12 +2,20 @@ class PluginRoomRoom extends CommonDBTM { + use Glpi\Features\Clonable; + public $dohistory = true; public static $rightname = 'plugin_room'; protected $usenotepad = true; + public function getCloneRelations() :array { + return [ + Document_Item::class, + ]; + } + public static function getTypeName($nb = 0) { return _n('Room', 'Rooms', $nb, 'room'); @@ -247,14 +255,14 @@ public function defineTabs($options = []) $ong = []; $this->addDefaultFormTab($ong); - if (Session::haveRight('reservation', READ)) { - // Affiche "Réservations" - $this->addStandardTab('Reservation', $ong, $options); - } $this->addStandardTab('Ticket', $ong, $options); $this->addStandardTab('Item_Problem', $ong, $options); $this->addStandardTab('Document_Item', $ong, $options); $this->addStandardTab('Notepad', $ong, $options); + if (Session::haveRight('reservation', READ)) { + // Affiche "Réservations" + $this->addStandardTab('Reservation', $ong, $options); + } $this->addStandardTab('Log', $ong, $options); return $ong; @@ -263,7 +271,7 @@ public function defineTabs($options = []) // Cette fonction affiche le formulaire de l'objet (en création ou en édition/consultation) // Cette fonction est appelée par /front/room.form.php // showForm(ID de l'objet,tableau pour les options) - public function showForm($ID, $options = []) + public function showForm($ID, array $options = []) { global $CFG_GLPI; @@ -301,7 +309,7 @@ public function showForm($ID, $options = []) // Nom de la salle echo '' . __('Name', 'room') . ': '; echo ''; - Html::autocompletionTextField($this, 'name'); + echo Html::input('name', ['value' => $this->fields['name']]); echo ''; echo '' . __('Location', 'room') . ': '; echo ''; @@ -417,7 +425,7 @@ public function showForm($ID, $options = []) // Spécificité 1 echo '' . __('Specificity 1', 'room') . ': '; echo ''; - Html::autocompletionTextField($this, 'text1'); + echo Html::input('text1', ['value' => $this->fields['text1']]); echo ''; // Spécificité 3 @@ -435,7 +443,7 @@ public function showForm($ID, $options = []) // Spécificité 2 echo '' . __('Specificity 2', 'room') . ': '; echo ''; - Html::autocompletionTextField($this, 'text2'); + echo Html::input('text2', ['value' => $this->fields['text2']]); echo ''; // Spécificité 4 @@ -453,13 +461,13 @@ public function showForm($ID, $options = []) // Horaires d'ouverture echo '' . __('Opening Times', 'room') . ': '; echo ''; - Html::autocompletionTextField($this, 'opening'); + echo Html::input('opening', ['value' => $this->fields['opening']]); echo ''; // limitations echo '' . __('Limitations', 'room') . ': '; echo ''; - Html::autocompletionTextField($this, 'limits'); + echo Html::input('limits', ['value' => $this->fields['limits']]); echo ''; // Commentaires diff --git a/locales/es_AR.mo b/locales/es_AR.mo new file mode 100644 index 0000000..74381c0 Binary files /dev/null and b/locales/es_AR.mo differ diff --git a/locales/es_AR.po b/locales/es_AR.po new file mode 100644 index 0000000..6a70a8d --- /dev/null +++ b/locales/es_AR.po @@ -0,0 +1,190 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Rooms Development Team +# This file is distributed under the same license as the GLPI - Rooms plugin package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: GLPI - Rooms plugin\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-07 21:15+0000\n" +"PO-Revision-Date: 2024-01-06 20:40-0300\n" +"Last-Translator: Fernando Toledo \n" +"Language-Team: Fernando Toledo \n" +"Language: es_AR\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" +"X-Generator: Poedit 3.2.2\n" + +#: hook.php:55 hook.php:70 hook.php:84 hook.php:98 hook.php:112 +msgid "Error during the database update" +msgstr "Error durante la actualización de base de datos" + +#: hook.php:276 hook.php:284 hook.php:362 index.php:11 front/room.form.php:82 +#: front/room.php:11 inc/profile.class.php:145 +msgid "Room Management" +msgstr "Administración de Salas" + +#: hook.php:276 inc/room.class.php:51 inc/room.class.php:302 +#: inc/room.class.php:517 +msgid "Name" +msgstr "Nombre" + +#: hook.php:284 +msgid "Type of Room" +msgstr "Tipo de Sala" + +#: hook.php:317 +msgid "Add a Room" +msgstr "Agregar Sala" + +#: hook.php:333 +msgid "Post" +msgstr "Enviar" + +#: setup.php:46 inc/room.class.php:13 inc/room.class.php:635 +msgid "Room" +msgid_plural "Rooms" +msgstr[0] "Sala" +msgstr[1] "Salas" + +#: inc/dropdown1.class.php:14 +msgid "Room specificities" +msgstr "Especificaciones" + +#: inc/profile.class.php:115 +msgid "General" +msgstr "General" + +#: inc/room.class.php:61 inc/room.class.php:318 inc/roomtype.class.php:14 +msgid "Type" +msgid_plural "Types" +msgstr[0] "Tipo" +msgstr[1] "Tipos" + +#: inc/room.class.php:69 inc/room.class.php:377 +msgid "Group in charge of the hardware" +msgstr "Grupo a cargo" + +#: inc/room.class.php:79 inc/room.class.php:353 +msgid "Technician in charge of the hardware" +msgstr "Técnico a cargo" + +#: inc/room.class.php:87 inc/room.class.php:342 +msgid "Alternate username" +msgstr "Nombre de usuario alternativo" + +#: inc/room.class.php:95 inc/room.class.php:153 inc/room.class.php:468 +msgid "Comments" +msgstr "Comentarios" + +#: inc/room.class.php:105 inc/room.class.php:364 +msgid "Seating" +msgstr "Asientos" + +#: inc/room.class.php:113 inc/room.class.php:330 +#: inc/roomaccesscond.class.php:14 +msgid "Conditions of Access" +msgstr "Condiciones de acceso" + +#: inc/room.class.php:121 inc/room.class.php:387 +msgid "Date of purchase" +msgstr "Fecha de compra" + +#: inc/room.class.php:129 +msgid "Printer" +msgstr "Impresora" + +#: inc/room.class.php:137 inc/room.class.php:406 +msgid "Video Projector" +msgstr "Proyector de video" + +#: inc/room.class.php:145 inc/room.class.php:412 +msgid "WiFi" +msgstr "WiFi" + +#: inc/room.class.php:161 inc/room.class.php:454 +msgid "Opening Times" +msgstr "Horarios de Apertura" + +#: inc/room.class.php:169 inc/room.class.php:460 +msgid "Limitations" +msgstr "Limitaciones" + +#: inc/room.class.php:177 inc/room.class.php:418 +msgid "Specificity 1" +msgstr "Especificación 1" + +#: inc/room.class.php:185 inc/room.class.php:436 +msgid "Specificity 2" +msgstr "Especificación 2" + +#: inc/room.class.php:193 inc/room.class.php:424 +msgid "Specificity 3" +msgstr "Especificación 3" + +#: inc/room.class.php:201 inc/room.class.php:442 +msgid "Specificity 4" +msgstr "Especificación 4" + +#: inc/room.class.php:209 +msgid "ID" +msgstr "ID" + +#: inc/room.class.php:217 +msgid "Computers" +msgstr "Computadoras" + +#: inc/room.class.php:228 +msgid "Number of Computers" +msgstr "Número de Computadoras" + +#: inc/room.class.php:237 +msgid "Entity" +msgstr "Entidad" + +#: inc/room.class.php:294 +msgid "Last update" +msgstr "Última modificación" + +#: inc/room.class.php:306 +msgid "Location" +msgstr "Lugar" + +#: inc/room.class.php:400 +msgid "Whiteboard" +msgstr "Pizarra" + +#: inc/room.class.php:513 +msgid "Associated items" +msgstr "Items Asociados" + +#: inc/room.class.php:518 +msgid "Select the desired entity" +msgstr "Seleccionar entidad" + +#: inc/room.class.php:566 +msgid "Add" +msgstr "Agregar" + +#: inc/room.class.php:578 +msgid "Check All" +msgstr "Marcar Todos" + +#: inc/room.class.php:586 +msgid "Uncheck All" +msgstr "Desmarcar Todos" + +#: inc/room.class.php:589 +msgid "To delete" +msgstr "Para eliminar" + +#: inc/room.class.php:634 +msgid "This computer is in room:" +msgstr "Esta computadora está en la sala:" + +#: inc/room.class.php:636 +msgid "Responsible" +msgstr "Responsable" diff --git a/locales/it_IT.mo b/locales/it_IT.mo index 5c09eaa..ec39a07 100644 Binary files a/locales/it_IT.mo and b/locales/it_IT.mo differ diff --git a/locales/it_IT.po b/locales/it_IT.po index af38740..8859006 100644 --- a/locales/it_IT.po +++ b/locales/it_IT.po @@ -52,7 +52,7 @@ msgstr[1] "Locali" #: inc/dropdown1.class.php:14 msgid "Room specificities" -msgstr "Caratteristica di Locale" +msgstr "Caratteristica del locale" #: inc/profile.class.php:115 msgid "General" @@ -61,27 +61,27 @@ msgstr "" #: inc/roomaccesscond.class.php:14 inc/room.class.php:113 #: inc/room.class.php:330 msgid "Conditions of Access" -msgstr "" +msgstr "Condizioni di accesso" #: inc/room.class.php:61 inc/room.class.php:318 msgid "Type" -msgstr "" +msgstr "Tipo" #: inc/room.class.php:69 inc/room.class.php:377 msgid "Group in charge of the hardware" -msgstr "" +msgstr "Gruppo responsabile dell'hardware" #: inc/room.class.php:79 inc/room.class.php:353 msgid "Technician in charge of the hardware" -msgstr "" +msgstr "Responsabile tecnico" #: inc/room.class.php:87 inc/room.class.php:342 msgid "Alternate username" -msgstr "" +msgstr "Nome utente alternativo" #: inc/room.class.php:95 inc/room.class.php:153 inc/room.class.php:468 msgid "Comments" -msgstr "" +msgstr "Commenti" #: inc/room.class.php:105 inc/room.class.php:364 msgid "Seating" @@ -89,7 +89,7 @@ msgstr "Posti a sedere" #: inc/room.class.php:121 inc/room.class.php:387 msgid "Date of purchase" -msgstr "" +msgstr "Data di acquisto" #: inc/room.class.php:129 msgid "Printer" @@ -149,11 +149,11 @@ msgstr "" #: inc/room.class.php:306 msgid "Location" -msgstr "" +msgstr "Posizione" #: inc/room.class.php:400 msgid "Whiteboard" -msgstr "" +msgstr "Lavagna" #: inc/room.class.php:513 msgid "Associated items" diff --git a/locales/room.pot b/locales/room.pot index 9fb3db5..11aad3a 100644 --- a/locales/room.pot +++ b/locales/room.pot @@ -1,13 +1,14 @@ -# GLPI - Room Management plugin -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Rooms Development Team +# This file is distributed under the same license as the GLPI - Rooms plugin package. # FIRST AUTHOR , YEAR. # +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Room plugin 3.2.0-jb\n\n" +"Project-Id-Version: GLPI - Rooms plugin\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-30 18:48+0200\n" +"POT-Creation-Date: 2022-04-07 21:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +22,7 @@ msgstr "" msgid "Error during the database update" msgstr "" -#: hook.php:276 hook.php:284 hook.php:362 front/room.form.php:82 +#: hook.php:276 hook.php:284 hook.php:362 index.php:11 front/room.form.php:82 #: front/room.php:11 inc/profile.class.php:145 msgid "Room Management" msgstr "" @@ -57,14 +58,11 @@ msgstr "" msgid "General" msgstr "" -#: inc/roomaccesscond.class.php:14 inc/room.class.php:113 -#: inc/room.class.php:330 -msgid "Conditions of Access" -msgstr "" - -#: inc/room.class.php:61 inc/room.class.php:318 +#: inc/room.class.php:61 inc/room.class.php:318 inc/roomtype.class.php:14 msgid "Type" -msgstr "" +msgid_plural "Types" +msgstr[0] "" +msgstr[1] "" #: inc/room.class.php:69 inc/room.class.php:377 msgid "Group in charge of the hardware" @@ -86,6 +84,11 @@ msgstr "" msgid "Seating" msgstr "" +#: inc/room.class.php:113 inc/room.class.php:330 +#: inc/roomaccesscond.class.php:14 +msgid "Conditions of Access" +msgstr "" + #: inc/room.class.php:121 inc/room.class.php:387 msgid "Date of purchase" msgstr "" diff --git a/setup.php b/setup.php index bba7857..1c207c3 100644 --- a/setup.php +++ b/setup.php @@ -55,13 +55,13 @@ function plugin_version_room() // Optional : check prerequisites before install : may print errors or add to message after redirect function plugin_room_check_prerequisites() { - if (version_compare(GLPI_VERSION, '9.5', '>=') && version_compare(GLPI_VERSION, '9.6', '<=')) { + if (version_compare(GLPI_VERSION, '9.5', '>=') && version_compare(GLPI_VERSION, '10.1', '<=')) { return true; } else { if (method_exists('Plugin', 'messageIncompatible')) { - echo Plugin::messageIncompatible('core', '9.5', '9.6'); + echo Plugin::messageIncompatible('core', '9.5', '10.1'); } else { - echo 'This plugin requires GLPI >= 9.5 && <= 9.6'; + echo 'This plugin requires GLPI >= 9.5 && <= 10.1'; } return false; }