diff --git a/CHANGELOG.md b/CHANGELOG.md
index f704c62..04a35da 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,18 @@
# One-Time Secret GLPI Plugin CHANGELOG
+## 1.1.1
+### Features
+
+### Bugfixes
+- Copyright year replaced
+
+## 1.1.0
+### Features
+- Added French and Arabic translations
+### Bugfixes
+- Fixed errors at secrets with special characters
+
## 1.0.1
-### Feaures
+### Features
- Open link in new window or tab
### Bugfixes
- Tweak Localazy integration to drop deprecated translations
diff --git a/LICENSE b/LICENSE
index 30512bc..757f2f0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -630,7 +630,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Byemail
- Copyright (C) 2021 TICgal / GLPIPlugins
+ Copyright (C) 2021-2022 TICgal / GLPIPlugins
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
diff --git a/front/config.form.php b/front/config.form.php
index 1bce13a..45df19f 100644
--- a/front/config.form.php
+++ b/front/config.form.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal
-------------------------------------------------------------------------
LICENSE
@@ -20,11 +20,11 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
include('../../../inc/includes.php');
diff --git a/front/link.form.php b/front/link.form.php
index 17858b3..2dcb38f 100644
--- a/front/link.form.php
+++ b/front/link.form.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal
-------------------------------------------------------------------------
LICENSE
@@ -20,11 +20,11 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
diff --git a/hook.php b/hook.php
index 21761d9..90dc6be 100644
--- a/hook.php
+++ b/hook.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal
-------------------------------------------------------------------------
LICENSE
@@ -20,11 +20,11 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
function plugin_onetimesecret_install() {
diff --git a/inc/config.class.php b/inc/config.class.php
index d1eb9e8..2825d78 100644
--- a/inc/config.class.php
+++ b/inc/config.class.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal
-------------------------------------------------------------------------
LICENSE
@@ -20,11 +20,11 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
if(!defined('GLPI_ROOT')) {
diff --git a/inc/link.class.php b/inc/link.class.php
index a62270e..75f9d9b 100644
--- a/inc/link.class.php
+++ b/inc/link.class.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal
-------------------------------------------------------------------------
LICENSE
@@ -20,11 +20,11 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
diff --git a/inc/profile.class.php b/inc/profile.class.php
index b98190f..eb3e2a1 100644
--- a/inc/profile.class.php
+++ b/inc/profile.class.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal/
-------------------------------------------------------------------------
LICENSE
@@ -20,11 +20,11 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal/
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
diff --git a/inc/secret.class.php b/inc/secret.class.php
index 343ef2d..a629b0f 100644
--- a/inc/secret.class.php
+++ b/inc/secret.class.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal
-------------------------------------------------------------------------
LICENSE
@@ -20,11 +20,11 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
@@ -40,7 +40,7 @@ static function authentication(){
$config->getFromDB(1);
$curl = curl_init();
- $server = "https://".$config->fields["email"] . ":" . Toolbox::sodiumDecrypt($config->fields["apikey"])."onetimesecret.com/api";
+ $server = "https://".$config->fields["email"] . ":" . Toolbox::sodiumDecrypt($config->fields["apikey"]).$config->fields["server"]."/api";
curl_setopt($curl, CURLOPT_URL, $server);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
@@ -71,13 +71,14 @@ static function createSecret($params=[]) {
$curl = curl_init();
- $post_fields = 'secret='.$params["password"].'&ttl='.self::hoursToSeconds($params["lifetime"]);
+ $post_fields = ['secret'=>$params["password"],
+ 'ttl'=>self::hoursToSeconds($params["lifetime"])];
if($params["passphrase"]!=""){
- $post_fields .= '&passphrase='.$params["passphrase"];
+ $post_fields ["passphrase"]= $params["passphrase"];
}
curl_setopt_array($curl, array(
- CURLOPT_URL => 'https://onetimesecret.com/api/v1/share',
+ CURLOPT_URL => 'https://'.$config->fields['server'].'/api/v1/share',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@@ -90,8 +91,7 @@ static function createSecret($params=[]) {
CURLOPT_HTTPHEADER => array(
- "Authorization: Basic " . base64_encode($config->fields["email"] . ":" . Toolbox::sodiumDecrypt($config->fields["apikey"])),
- 'Content-Type: application/x-www-form-urlencoded'
+ "Authorization: Basic " . base64_encode($config->fields["email"] . ":" . Toolbox::sodiumDecrypt($config->fields["apikey"]))
),
));
@@ -99,11 +99,11 @@ static function createSecret($params=[]) {
curl_close($curl);
- $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
+ $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
$data = json_decode($response,true);
- return "https://onetimesecret.com/secret/".$data["secret_key"];
+ return "https://".$config->fields["server"]."/secret/".$data["secret_key"];
}
static function hoursToSeconds($hours){
@@ -115,29 +115,7 @@ static function hoursToSeconds($hours){
static function addFollowup($params,$text='') {
global $DB, $CFG_GLPI;
- //Switch to the desired language
- $bak_language = $_SESSION["glpilanguage"];$bak_dropdowntranslations = (isset($_SESSION['glpi_dropdowntranslations']) ? $_SESSION['glpi_dropdowntranslations'] : null);
-
- $query = [
- 'FROM'=>Ticket_User::getTable(),
- 'WHERE'=> [
- 'tickets_id' => $params["tickets_id"],
- 'type' => 1
- ]
- ];
-
- foreach ($DB->request($query) as $ticket_user) {
- $user = new User();
- $user->getFromDB($ticket_user["users_id"]);
- $lang = $user->fields["language"];
- if($lang==null){
- $lang=$CFG_GLPI["language"];
- }
- }
- $_SESSION['glpi_dropdowntranslations'] = DropdownTranslation::getAvailableTranslations($lang);
- Session::loadLanguage($lang);
- $_SESSION["glpilanguage"] = $lang;
$query = [
'FROM'=>Ticket::getTable(),
@@ -162,13 +140,47 @@ static function addFollowup($params,$text='') {
$content .= "
".sprintf(__('This secret link will expire %1$s hours after its generation.','onetimesecret'),$params["lifetime"])."";
$content .= "
". __("Regards,",'onetimesecret');
-
- $input = [
- 'items_id'=>$params["tickets_id"],
- 'itemtype'=>Ticket::getType(),
- 'content'=>$content,
- 'users_id'=> Session::getLoginUserID()
+ //Switch to the desired language
+ $bak_language = $_SESSION["glpilanguage"];$bak_dropdowntranslations = (isset($_SESSION['glpi_dropdowntranslations']) ? $_SESSION['glpi_dropdowntranslations'] : null);
+
+ $query = [
+ 'FROM'=>Ticket_User::getTable(),
+ 'WHERE'=> [
+ 'tickets_id' => $params["tickets_id"],
+ 'type' => 1
+ ]
];
+ $input=[];
+ foreach ($DB->request($query) as $ticket_user) {
+ $user = new User();
+ $user->getFromDB($ticket_user["users_id"]);
+ $lang = $user->fields["language"];
+ if($lang==null){
+ $lang=$CFG_GLPI["language"];
+ }
+
+ if(Session::getLoginUserID()==$ticket_user["users_id"]){
+ $input = [
+ 'items_id'=>$params["tickets_id"],
+ 'itemtype'=>Ticket::getType(),
+ 'content'=>$content,
+ '_status'=>Ticket::ASSIGNED,
+ 'users_id'=> Session::getLoginUserID()
+ ];
+ }else{
+ $input = [
+ 'items_id'=>$params["tickets_id"],
+ 'itemtype'=>Ticket::getType(),
+ 'content'=>$content,
+ 'users_id'=> Session::getLoginUserID()
+ ];
+ }
+ }
+
+ $_SESSION['glpi_dropdowntranslations'] = DropdownTranslation::getAvailableTranslations($lang);
+ Session::loadLanguage($lang);
+ $_SESSION["glpilanguage"] = $lang;
+
$input=Toolbox::sanitize($input);
$fup->add($input);
diff --git a/locales/ar_SA.mo b/locales/ar_SA.mo
new file mode 100644
index 0000000..bb3292f
Binary files /dev/null and b/locales/ar_SA.mo differ
diff --git a/locales/ar_SA.po b/locales/ar_SA.po
new file mode 100644
index 0000000..edb9a72
--- /dev/null
+++ b/locales/ar_SA.po
@@ -0,0 +1,103 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: One-Time Secret-GLPI\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-01-13 10:04+0100\n"
+"Language: ar\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.0\n"
+"Plural-Forms: nplurals=6; plural=(n==0) ? 0 : (n==1) ? 1 : (n==2) ? 2 : (n"
+"%100>=3 && n%100<=10) ? 3 : (n%100>=11 && n%100<=99) ? 4 : 5;\n"
+"PO-Revision-Date: \n"
+"Last-Translator: \n"
+"Language-Team: \n"
+
+#: inc/config.class.php:57 inc/config.class.php:61 inc/config.class.php:92
+#: inc/link.class.php:39
+msgid "One-Time Secret"
+msgstr "سر لمرة واحدة"
+
+#: inc/config.class.php:92
+msgid "Configuration"
+msgstr "التكوين"
+
+#: inc/config.class.php:105
+msgid "API key"
+msgstr "مفتاح API"
+
+#: inc/config.class.php:109
+msgid "Lifetime"
+msgstr "أوقات الحياة"
+
+#: inc/config.class.php:110 inc/link.class.php:91
+msgid "Password lifetime (hours)"
+msgstr "كلمة المرور(ساعات)"
+
+#: inc/link.class.php:75
+msgid "Create a password"
+msgstr "قم بإنشاء كلمة مرور"
+
+#: inc/link.class.php:98
+msgid "Optional parameter"
+msgstr "معلمة اختيارية"
+
+#: inc/link.class.php:101
+msgid "Passphrase"
+msgstr "عبارة المرور"
+
+#: inc/profile.class.php:94
+msgid "Display OneTimeSecret button"
+msgstr "عرض زر سر مرة واحدة"
+
+#: inc/secret.class.php:153
+msgid "Hi,"
+msgstr "مرحبًا!"
+
+#: inc/secret.class.php:153
+msgid ""
+"As mentioned in our previous conversation, this message is meant to share "
+"sensitive information with you."
+msgstr "كما ذكرنا في محدثنا السابقة هده الرسالة ستنشر معك معلومة حساسة"
+
+#: inc/secret.class.php:154
+msgid ""
+"A secret link only works once and then disappears forever. Do "
+"not open it if you are not the intended recipient."
+msgstr ""
+"الرابط السري يعمل مرة واحدة فقط ثم يختفي إلى الأبد . لا "
+"تفتحه إذا لم تكن أنت المقصود متلقي"
+
+#: inc/secret.class.php:155
+msgid "Here you have"
+msgstr "هنا لديك"
+
+#: inc/secret.class.php:156
+msgid "your secret link"
+msgstr "رابطك السري"
+
+#: inc/secret.class.php:159
+msgid ""
+"I will send you the required passphrase to open it using an alternative "
+"method for security reasons."
+msgstr ""
+"ترجمة المصدر سأرسل لك عبارة المرور المطلوبة لفتحها باستخدام طريقة بديلة "
+"لأسباب أمنية."
+
+#: inc/secret.class.php:161
+msgid "Bear in mind:"
+msgstr "يأخذ بنظر الأعتبار:"
+
+#: inc/secret.class.php:161
+msgid "A secret link can only be opened once and will expire afterwards."
+msgstr "لا يمكن فتح الرابط السري إلا مرة واحدة وستنتهي صلاحيته بعد ذلك"
+
+#: inc/secret.class.php:162
+#, php-format
+msgid "This secret link will expire %1$s hours after its generation."
+msgstr "ستنتهي صلاحية هذا الارتباط السري بعد %1$s ساعة من إنشائه"
+
+#: inc/secret.class.php:163
+msgid "Regards,"
+msgstr "يعتبر"
diff --git a/locales/en_GB.mo b/locales/en_GB.mo
new file mode 100644
index 0000000..b8f3ec6
Binary files /dev/null and b/locales/en_GB.mo differ
diff --git a/locales/en_GB.po b/locales/en_GB.po
new file mode 100644
index 0000000..29eaa6e
--- /dev/null
+++ b/locales/en_GB.po
@@ -0,0 +1,66 @@
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Localazy (https://localazy.com)\n"
+"Project-Id-Version: One-Time Secret-GLPI\n"
+"Language: en_GB\n"
+"Plural-Forms: nplurals=2; plural=(n==1) ? 0 : 1;\n"
+
+msgid "API key"
+msgstr "API Key"
+
+msgid "A secret link only works once and then disappears forever. Do not open it if you are not the intended recipient."
+msgstr "A secret link only works once and then disappears forever. Do not open it if you are not the intended recipient."
+
+msgid "A secret link can only be opened once and will expire afterwards."
+msgstr "A secret link can only be opened once and will expire afterwards."
+
+msgid "As mentioned in our previous conversation, this message is meant to share sensitive information with you."
+msgstr "As mentioned in our previous conversation, this message is meant to share sensitive information with you."
+
+msgid "Bear in mind:"
+msgstr "Bear in mind:"
+
+msgid "Configuration"
+msgstr "Configuration"
+
+msgid "Create a password"
+msgstr "Create a password"
+
+msgid "Display OneTimeSecret button"
+msgstr "Display OneTimeSecret button"
+
+msgid "Here you have"
+msgstr "Here you have "
+
+msgid "Hi,"
+msgstr "Hi,"
+
+msgid "I will send you the required passphrase to open it using an alternative method for security reasons."
+msgstr "I will send you the required passphrase to open it using an alternative method for security reasons."
+
+msgid "Lifetime"
+msgstr "Lifetime"
+
+msgid "One-Time Secret"
+msgstr "One-Time Secret"
+
+msgid "Optional parameter"
+msgstr "Optional parameter"
+
+msgid "Passphrase"
+msgstr "Passphrase"
+
+msgid "Password lifetime (hours)"
+msgstr "Password lifetime (hours)"
+
+msgid "Regards,"
+msgstr "Regards,"
+
+msgid "This secret link will expire %1$s hours after its generation."
+msgstr "This secret link will expire %1$s hours after its generation."
+
+msgid "your secret link"
+msgstr "your secret link"
diff --git a/locales/es_ES.mo b/locales/es_ES.mo
index 1eb9f67..40a4b7e 100644
Binary files a/locales/es_ES.mo and b/locales/es_ES.mo differ
diff --git a/locales/es_ES.po b/locales/es_ES.po
index 96286fd..389eb69 100644
--- a/locales/es_ES.po
+++ b/locales/es_ES.po
@@ -1,121 +1,66 @@
msgid ""
msgstr ""
-"Project-Id-Version: One-Time Secret-GLPI\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-11-29 12:37+0100\n"
-"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Localazy (https://localazy.com)\n"
+"Project-Id-Version: One-Time Secret-GLPI\n"
+"Language: es_ES\n"
"Plural-Forms: nplurals=2; plural=(n==1) ? 0 : 1;\n"
-#: inc/config.class.php:57 inc/config.class.php:61 inc/config.class.php:92
-#: inc/link.class.php:39
-#, fuzzy
-msgid "One-Time Secret"
-msgstr "OneTimeSecret"
-
-#: inc/config.class.php:92
-msgid "Configuration"
-msgstr "Configuración"
-
-#: inc/config.class.php:105
msgid "API key"
msgstr "Clave API"
-#: inc/config.class.php:109
-msgid "Lifetime"
-msgstr "Vigencia"
+msgid "A secret link only works once and then disappears forever. Do not open it if you are not the intended recipient."
+msgstr "El enlace a un secret funciona una sola vez y después desaparece para siempre. No lo abras si no eres el destinatario."
-#: inc/config.class.php:110 inc/link.class.php:91
-msgid "Password lifetime (hours)"
-msgstr "Vigencia de la contraseña (horas)"
+msgid "A secret link can only be opened once and will expire afterwards."
+msgstr "Un enlace secreto solo se puede abrir una vez y caducará después."
-#: inc/link.class.php:75
-msgid "Create a password"
-msgstr "Crear contraseña"
+msgid "As mentioned in our previous conversation, this message is meant to share sensitive information with you."
+msgstr "Como se mencionó en nuestra conversación anterior, este mensaje está destinado a compartir información confidencial contigo."
-#: inc/link.class.php:98
-#, fuzzy
-msgid "Optional parameter"
-msgstr "Parámetros opcionales"
+msgid "Bear in mind:"
+msgstr "Ten en cuenta:"
-#: inc/link.class.php:101
-msgid "Passphrase"
-msgstr "Frase de contraseña"
+msgid "Configuration"
+msgstr "Configuración"
+
+msgid "Create a password"
+msgstr "Crear contraseña"
-#: inc/profile.class.php:94
msgid "Display OneTimeSecret button"
msgstr "Mostrar botón One-Time Secret"
-#: inc/secret.class.php:153
+msgid "Here you have"
+msgstr "Aquí tienes "
+
msgid "Hi,"
msgstr "Hola:"
-#: inc/secret.class.php:153
-msgid ""
-"As mentioned in our previous conversation, this message is meant to share "
-"sensitive information with you."
-msgstr ""
-"Como se mencionó en nuestra conversación anterior, este mensaje está "
-"destinado a compartir información confidencial contigo."
-
-#: inc/secret.class.php:154
-msgid ""
-"A secret link only works once and then disappears forever. Do "
-"not open it if you are not the intended recipient."
-msgstr ""
-"El enlace a un secret funciona una sola vez y "
-"después desaparece para siempre. No lo abras si no eres el "
-"destinatario."
-
-#: inc/secret.class.php:155
-msgid "Here you have"
-msgstr "Aquí tienes "
+msgid "I will send you the required passphrase to open it using an alternative method for security reasons."
+msgstr "Te enviaré la contraseña secreta requerida para abrirlo usando un método alternativo por razones de seguridad."
-#: inc/secret.class.php:156
-msgid "your secret link"
-msgstr "tu enlace secreto"
+msgid "Lifetime"
+msgstr "Vigencia"
-#: inc/secret.class.php:159
-msgid ""
-"I will send you the required passphrase to open it using an alternative "
-"method for security reasons."
-msgstr ""
-"Te enviaré la contraseña secreta requerida para abrirlo usando un método "
-"alternativo por razones de seguridad."
+msgid "One-Time Secret"
+msgstr "One-Time Secret"
-#: inc/secret.class.php:161
-msgid "Bear in mind:"
-msgstr "Ten en cuenta:"
+msgid "Optional parameter"
+msgstr "Parámetro opcional"
-#: inc/secret.class.php:161
-msgid "A secret link can only be opened once and will expire afterwards."
-msgstr "Un enlace secreto solo se puede abrir una vez y caducará después."
+msgid "Passphrase"
+msgstr "Frase de contraseña"
-#: inc/secret.class.php:162
-#, php-format
-msgid "This secret link will expire %1$s hours after its generation."
-msgstr "El enlace al secreto caducará %1$s horas después de su generación."
+msgid "Password lifetime (hours)"
+msgstr "Vigencia de la contraseña (horas)"
-#: inc/secret.class.php:163
msgid "Regards,"
msgstr "Saludos,"
-#~ msgid ""
-#~ "A secret link only works once and then disappears "
-#~ "forever. Do not open it if you are not the intended recipient."
-#~ msgstr ""
-#~ "El enlace secreto funciona una sola vez y "
-#~ "después desaparece para siempre. Por favor, no lo abras "
-#~ "si no eres el destinatario."
-
-#~ msgid "Email"
-#~ msgstr "Correo electrónico"
-
-#~ msgid "Here you have "
-#~ msgstr "Aquí tienes "
+msgid "This secret link will expire %1$s hours after its generation."
+msgstr "El enlace al secreto caducará %1$s horas después de su generación."
-#~ msgid "Server"
-#~ msgstr "Servidor"
+msgid "your secret link"
+msgstr "tu enlace secreto"
diff --git a/locales/fr_FR.mo b/locales/fr_FR.mo
new file mode 100644
index 0000000..7949fa6
Binary files /dev/null and b/locales/fr_FR.mo differ
diff --git a/locales/fr_FR.po b/locales/fr_FR.po
new file mode 100644
index 0000000..ab12e3f
--- /dev/null
+++ b/locales/fr_FR.po
@@ -0,0 +1,103 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: One-Time Secret-GLPI\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-01-12 17:21+0100\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Localazy (https://localazy.com)\n"
+"Plural-Forms: nplurals=2; plural=(n==0 || n==1) ? 0 : 1;\n"
+
+#: inc/config.class.php:57 inc/config.class.php:61 inc/config.class.php:92
+#: inc/link.class.php:39
+msgid "One-Time Secret"
+msgstr "One-Time Secret"
+
+#: inc/config.class.php:92
+msgid "Configuration"
+msgstr "Paramètres"
+
+#: inc/config.class.php:105
+msgid "API key"
+msgstr "Clé API"
+
+#: inc/config.class.php:109
+msgid "Lifetime"
+msgstr "Durée de vie"
+
+#: inc/config.class.php:110 inc/link.class.php:91
+msgid "Password lifetime (hours)"
+msgstr "Durée du mot de passe (heures)"
+
+#: inc/link.class.php:75
+msgid "Create a password"
+msgstr "Créer un mot de passe"
+
+#: inc/link.class.php:98
+msgid "Optional parameter"
+msgstr "Paramètre optionnel"
+
+#: inc/link.class.php:101
+msgid "Passphrase"
+msgstr "Phrase secrète"
+
+#: inc/profile.class.php:94
+msgid "Display OneTimeSecret button"
+msgstr "Afficher le bouton OneTimeSecret"
+
+#: inc/secret.class.php:153
+msgid "Hi,"
+msgstr "Salut"
+
+#: inc/secret.class.php:153
+msgid ""
+"As mentioned in our previous conversation, this message is meant to share "
+"sensitive information with you."
+msgstr ""
+"Comme nous l'avons mentionné dans notre conversation précédente, ce message "
+"est destiné à partager des informations sensibles avec vous."
+
+#: inc/secret.class.php:154
+msgid ""
+"A secret link only works once and then disappears forever. Do "
+"not open it if you are not the intended recipient."
+msgstr ""
+"Un lien secret ne fonctionne qu'une seule fois, puis disparaît "
+"pour toujours. Ne l'ouvrez pas si vous n'êtes pas le destinataire prévu."
+
+#: inc/secret.class.php:155
+msgid "Here you have"
+msgstr "Ici, vous avez"
+
+#: inc/secret.class.php:156
+msgid "your secret link"
+msgstr "votre lien secret"
+
+#: inc/secret.class.php:159
+msgid ""
+"I will send you the required passphrase to open it using an alternative "
+"method for security reasons."
+msgstr ""
+"Pour des raisons de sécurité, je vais vous envoyer le mot de passe "
+"nécessaire pour l'ouvrir en utilisant une autre méthode."
+
+#: inc/secret.class.php:161
+msgid "Bear in mind:"
+msgstr "Gardez à l'esprit :"
+
+#: inc/secret.class.php:161
+msgid "A secret link can only be opened once and will expire afterwards."
+msgstr ""
+"Un lien secret ne peut être ouvert qu'une seule fois et expirera par la "
+"suite."
+
+#: inc/secret.class.php:162
+#, php-format
+msgid "This secret link will expire %1$s hours after its generation."
+msgstr "Ce lien secret expirera %1$s heures après sa génération."
+
+#: inc/secret.class.php:163
+msgid "Regards,"
+msgstr "À bientôt,"
diff --git a/locales/gl_ES.mo b/locales/gl_ES.mo
index f15d424..95e23f5 100644
Binary files a/locales/gl_ES.mo and b/locales/gl_ES.mo differ
diff --git a/locales/gl_ES.po b/locales/gl_ES.po
index 530e6b4..1325f18 100644
--- a/locales/gl_ES.po
+++ b/locales/gl_ES.po
@@ -1,121 +1,66 @@
msgid ""
msgstr ""
-"Project-Id-Version: One-Time Secret-GLPI\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-11-29 12:37+0100\n"
-"Language: gl_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Localazy (https://localazy.com)\n"
+"Project-Id-Version: One-Time Secret-GLPI\n"
+"Language: gl_ES\n"
"Plural-Forms: nplurals=2; plural=(n==1) ? 0 : 1;\n"
-#: inc/config.class.php:57 inc/config.class.php:61 inc/config.class.php:92
-#: inc/link.class.php:39
-#, fuzzy
-msgid "One-Time Secret"
-msgstr "One-Time Secret"
-
-#: inc/config.class.php:92
-msgid "Configuration"
-msgstr "Configuración"
-
-#: inc/config.class.php:105
msgid "API key"
msgstr "API key"
-#: inc/config.class.php:109
-msgid "Lifetime"
-msgstr "Vida útil"
+msgid "A secret link only works once and then disappears forever. Do not open it if you are not the intended recipient."
+msgstr "Unha ligazón secreta só funciona unha vez e despois desaparece para sempre.. Por favor, non a abras se non és o destinatario."
-#: inc/config.class.php:110 inc/link.class.php:91
-msgid "Password lifetime (hours)"
-msgstr "Validez do contrasinal (horas)"
+msgid "A secret link can only be opened once and will expire afterwards."
+msgstr "Unha ligazón secreta só se pode abrir unha vez e caducará despois."
-#: inc/link.class.php:75
-msgid "Create a password"
-msgstr "Crear un contrasinal"
+msgid "As mentioned in our previous conversation, this message is meant to share sensitive information with you."
+msgstr "Como mencionamos na nosa conversa anterior, esta mensaxe está destinada a compartir información confidencial contigo."
-#: inc/link.class.php:98
-#, fuzzy
-msgid "Optional parameter"
-msgstr "Parámetros opcionais"
+msgid "Bear in mind:"
+msgstr "Ten en conta:"
-#: inc/link.class.php:101
-msgid "Passphrase"
-msgstr "Frase de contrasinal"
+msgid "Configuration"
+msgstr "Configuración"
+
+msgid "Create a password"
+msgstr "Crear un contrasinal"
-#: inc/profile.class.php:94
msgid "Display OneTimeSecret button"
msgstr "Mostra o botón One-Time Secret"
-#: inc/secret.class.php:153
+msgid "Here you have"
+msgstr "Aquí tes"
+
msgid "Hi,"
msgstr "Ola!"
-#: inc/secret.class.php:153
-msgid ""
-"As mentioned in our previous conversation, this message is meant to share "
-"sensitive information with you."
-msgstr ""
-"Como mencionamos na nosa conversa anterior, esta mensaxe está destinada a "
-"compartir información confidencial contigo."
-
-#: inc/secret.class.php:154
-msgid ""
-"A secret link only works once and then disappears forever. Do "
-"not open it if you are not the intended recipient."
-msgstr ""
-"Unha ligazón secreta só funciona unha vez e despois "
-"desaparece para sempre.. Por favor, non a abras se non és o "
-"destinatario."
-
-#: inc/secret.class.php:155
-msgid "Here you have"
-msgstr "Aquí tes"
+msgid "I will send you the required passphrase to open it using an alternative method for security reasons."
+msgstr "Enviareiche a frase de acceso necesaria para abrila mediante un método alternativo por motivos de seguridade."
-#: inc/secret.class.php:156
-msgid "your secret link"
-msgstr "a túa ligazón segreda"
+msgid "Lifetime"
+msgstr "Vida útil"
-#: inc/secret.class.php:159
-msgid ""
-"I will send you the required passphrase to open it using an alternative "
-"method for security reasons."
-msgstr ""
-"Enviareiche a frase de acceso necesaria para abrila mediante un método "
-"alternativo por motivos de seguridade."
+msgid "One-Time Secret"
+msgstr "One-Time Secret"
-#: inc/secret.class.php:161
-msgid "Bear in mind:"
-msgstr "Ten en conta:"
+msgid "Optional parameter"
+msgstr "Parámetro opcional"
-#: inc/secret.class.php:161
-msgid "A secret link can only be opened once and will expire afterwards."
-msgstr "Unha ligazón secreta só se pode abrir unha vez e caducará despois."
+msgid "Passphrase"
+msgstr "Frase de contrasinal"
-#: inc/secret.class.php:162
-#, php-format
-msgid "This secret link will expire %1$s hours after its generation."
-msgstr "Esta ligazón secreta caducará %1$s horas despois da súa xeración."
+msgid "Password lifetime (hours)"
+msgstr "Validez do contrasinal (horas)"
-#: inc/secret.class.php:163
msgid "Regards,"
msgstr "Saúdos,"
-#~ msgid ""
-#~ "A secret link only works once and then disappears "
-#~ "forever. Do not open it if you are not the intended recipient."
-#~ msgstr ""
-#~ "Unha ligazón secreta só funciona unha vez e "
-#~ "despois desaparece para sempre.. Por favor, non a abras "
-#~ "se non és o destinatario."
-
-#~ msgid "Email"
-#~ msgstr "Correo electrónico"
-
-#~ msgid "Here you have "
-#~ msgstr "Aquí tes"
+msgid "This secret link will expire %1$s hours after its generation."
+msgstr "Esta ligazón secreta caducará %1$s horas despois da súa xeración."
-#~ msgid "Server"
-#~ msgstr "Servidor"
+msgid "your secret link"
+msgstr "a túa ligazón segreda"
diff --git a/locales/localazy.json b/locales/localazy.json
index d837ea1..c97d3f8 100644
--- a/locales/localazy.json
+++ b/locales/localazy.json
@@ -7,6 +7,7 @@
},
"download": {
- "files": "${languageCode}_${regionCode}.po"
+ "files": "${languageCode}_${regionCode}.po",
+ "includeSourceLang": true
}
}
\ No newline at end of file
diff --git a/locales/onetimesecret.pot b/locales/onetimesecret.pot
index be74716..69fbec4 100644
--- a/locales/onetimesecret.pot
+++ b/locales/onetimesecret.pot
@@ -1,15 +1,15 @@
# ONETIMESECRET Glpi Plugin.
-# Copyright (C) 2021 TICgal
+# Copyright (C) 2021-2022 TICgal
# This file is distributed under the same license as the PACKAGE package.
-# TICgal, 2021
+# TICgal, 2021-2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-11-29 12:37+0100\n"
-"PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
+"POT-Creation-Date: 2022-01-13 10:09+0100\n"
+"PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"Language: \n"
diff --git a/locales/pt_BR.mo b/locales/pt_BR.mo
new file mode 100644
index 0000000..e00bb85
Binary files /dev/null and b/locales/pt_BR.mo differ
diff --git a/locales/pt_BR.po b/locales/pt_BR.po
new file mode 100644
index 0000000..4bbf907
--- /dev/null
+++ b/locales/pt_BR.po
@@ -0,0 +1,70 @@
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.0\n"
+"Project-Id-Version: One-Time Secret-GLPI\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n>=0 && n<=1) ? 0 : 1;\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Last-Translator: \n"
+"Language-Team: \n"
+
+msgid "API key"
+msgstr "Chave API"
+
+msgid "A secret link only works once and then disappears forever. Do not open it if you are not the intended recipient."
+msgstr "Um link secreto funciona apenas uma vez e então desaparece para sempre. Não o abra se você não é o destinatário correto."
+
+msgid "A secret link can only be opened once and will expire afterwards."
+msgstr "Um link secreto só pode ser aberto uma vez e expira em seguida."
+
+msgid "As mentioned in our previous conversation, this message is meant to share sensitive information with you."
+msgstr "Como mencionado em nossa conversa anterior, esta mensagem tem o objetivo de compartilhar informações confidenciais com você."
+
+msgid "Bear in mind:"
+msgstr "Tenha em mente:"
+
+msgid "Configuration"
+msgstr "Configuração"
+
+msgid "Create a password"
+msgstr "Criar uma senha"
+
+msgid "Display OneTimeSecret button"
+msgstr "Exibir botão OneTimeSecret"
+
+msgid "Here you have"
+msgstr "Aqui está"
+
+msgid "Hi,"
+msgstr "Oi,"
+
+msgid "I will send you the required passphrase to open it using an alternative method for security reasons."
+msgstr "Eu vou lhe encaminhar a chave necessária para abrir usando um método alternativo por razões de segurança."
+
+msgid "Lifetime"
+msgstr "Tempo de vida"
+
+msgid "One-Time Secret"
+msgstr "Segredo 'One-Time'"
+
+msgid "Optional parameter"
+msgstr "Parâmetro opcional"
+
+msgid "Passphrase"
+msgstr "Chave de segurança"
+
+msgid "Password lifetime (hours)"
+msgstr "Tempo de vida de senha (horas)"
+
+msgid "Regards,"
+msgstr "Saudações,"
+
+msgid "This secret link will expire %1$s hours after its generation."
+msgstr "O link secreto expira em %1$s horas após sua criação."
+
+msgid "your secret link"
+msgstr "seu link secreto"
diff --git a/setup.php b/setup.php
index 3ec45a2..0826a86 100644
--- a/setup.php
+++ b/setup.php
@@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
OneTimeSecret plugin for GLPI
- Copyright (C) 2021 by the TICgal Team.
+ Copyright (C) 2021-2022 by the TICgal Team.
https://www.tic.gal/
-------------------------------------------------------------------------
LICENSE
@@ -20,14 +20,14 @@
--------------------------------------------------------------------------
@package OneTimeSecret
@author the TICgal team
- @copyright Copyright (c) 2021 TICgal team
+ @copyright Copyright (c) 2021-2022 TICgal team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://www.tic.gal/
- @since 2021
+ @since 2021-2022
----------------------------------------------------------------------
*/
-define ('PLUGIN_ONETIMESECRET_VERSION','1.0.1');
+define ('PLUGIN_ONETIMESECRET_VERSION','1.1.1');
define ('PLUGIN_ONETIMESECRET_MIN_GLPI','9.5.0');
define ('PLUGIN_ONETIMESECRET_MAX_GLPI','9.6.0');
diff --git a/tools/make_release.sh b/tools/make_release.sh
index 42d2ded..355955d 100644
--- a/tools/make_release.sh
+++ b/tools/make_release.sh
@@ -78,7 +78,7 @@ rm -rf locales/localazy*
echo "Creating tarball"
cd ..
-tar czf "$PLUGINNAME-$RELEASE.tar.tgz" $PLUGINNAME
+tar czf "glpi-$PLUGINNAME-$RELEASE.tar.tgz" $PLUGINNAME
cd $INIT_PWD;