diff --git a/src/lang/bg_BG.lang.php b/src/lang/bg_BG.lang.php
index 62c05361..26ffbbc0 100644
--- a/src/lang/bg_BG.lang.php
+++ b/src/lang/bg_BG.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Потребител',
'sms_gateway_password' => 'Парола',
'sms_from' => 'Номер на изпращача',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Изберете кога желаете да получавате известия
',
'alert_type_description' => 'Промяна на сатуса:
'.
'Ще получавате известие когато има промяна със връзката на даден някой от описаните сървър или сайт. От Онлайн -> Офлайн и от Офлайн -> Онлайн.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Да се пази ли лог на изпратените SMS съобщения от системата',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'Настройките са обновени успешно.',
- 'nochanges' => 'Не бяха направени промени!',
'tab_email' => 'Имейл',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Тест',
'test_email' => 'Ще бъде изпратенo тестово съобщение до имейл адреса, който сте задали в профила си.',
'test_sms' => 'Ще бъде изпратен тестово SMS съобщение до телефонния номер, който сте задали в профила си.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Изпрати',
+ 'test_subject' => 'Test',
'test_message' => 'Тестово съобщение',
'email_sent' => 'Тестовия имейл е изпратен успешно.',
'email_error' => 'Възникна грешка при изпращането на тесовия имейл',
'sms_sent' => 'Тестовото SMS съобщение е изпратеното успешно.',
'sms_error' => 'Възникна грешка при изпращането на тестовия SMS',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// За нов ред в имейл съобщението, моля използвайте тага
'notifications' => array(
diff --git a/src/lang/da_DK.lang.php b/src/lang/da_DK.lang.php
index a07c2dfc..4400b182 100644
--- a/src/lang/da_DK.lang.php
+++ b/src/lang/da_DK.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Gateway brugernavn/apikey',
'sms_gateway_password' => 'Gateway adgangskode',
'sms_from' => 'Afsenders navn.',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Vælg hvornår du vil modtage besked.
',
'alert_type_description' => 'Status ændring: '.
'Du vil modtage en notifcation når en server har en ændring i status. Fra online -> offline eller offline -> online.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Log SMS sendt af systemet',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'Indstillingerne er blevet opdateret.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'En email vil blive sendt til den adresse, der er angivet i din brugerprofil.',
'test_sms' => 'En SMS vil blive sendt til det nummer, der er angivet i din brugerprofil.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test besked',
'email_sent' => 'Email sendt',
'email_error' => 'Fejl ved afsendelse af email',
'sms_sent' => 'Sms sendt',
'sms_error' => 'Fejl ved afsendelse af SMS',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/de_DE.lang.php b/src/lang/de_DE.lang.php
index 565fdf97..6023083e 100644
--- a/src/lang/de_DE.lang.php
+++ b/src/lang/de_DE.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Gateway Benutzername',
'sms_gateway_password' => 'Gateway Passwort',
'sms_from' => 'SMS Sendernummer',
- 'pushover_status' => 'Pushover Nachricht senden erlauben?',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Wann möchten Sie benachrichtig werden?
',
'alert_type_description' => 'Status geändert: '.
'... wenn sich der Status ändert
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'SMS Log per Script senden?',
'log_pushover' => 'Pushover Log per Script senden?',
'updated' => 'Die Einstellungen wurden gespeichert.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'An email will be sent to the address specified in your user profile.',
'test_sms' => 'An SMS will be sent to the phone number specified in your user profile.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test message',
'email_sent' => 'Email sent',
'email_error' => 'Error in email sending',
'sms_sent' => 'Sms sent',
'sms_error' => 'Error in sms sending',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/en_US.lang.php b/src/lang/en_US.lang.php
index 2b615a4b..397dc898 100644
--- a/src/lang/en_US.lang.php
+++ b/src/lang/en_US.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Gateway username',
'sms_gateway_password' => 'Gateway password',
'sms_from' => 'Sender\'s phone number',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Select when you\'d like to be notified.
',
'alert_type_description' => 'Status change: '.
'You will receive a notifcation when a server has a change in status. So from online -> offline or offline -> online.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Log text messages sent by the script',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'The configuration has been updated.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'An email will be sent to the address specified in your user profile.',
'test_sms' => 'An SMS will be sent to the phone number specified in your user profile.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test message',
'email_sent' => 'Email sent',
'email_error' => 'Error in email sending',
'sms_sent' => 'Sms sent',
'sms_error' => 'Error in sms sending',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/es_ES.lang.php b/src/lang/es_ES.lang.php
index 8d4dbe75..a33dbf72 100644
--- a/src/lang/es_ES.lang.php
+++ b/src/lang/es_ES.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Gateway username',
'sms_gateway_password' => 'Gateway password',
'sms_from' => 'Número origen del SMS',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Cuando desea recibir notificaciones ?
',
'alert_type_description' => '... Al cambiar el estado: '.
'p.ej. online -> offline o offline -> online.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Enviar Log via SMS ?',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'Configuración guardada.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'An email will be sent to the address specified in your user profile.',
'test_sms' => 'An SMS will be sent to the phone number specified in your user profile.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test message',
'email_sent' => 'Email sent',
'email_error' => 'Error in email sending',
'sms_sent' => 'Sms sent',
'sms_error' => 'Error in sms sending',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/fr_FR.lang.php b/src/lang/fr_FR.lang.php
index 744e2bce..041851e9 100644
--- a/src/lang/fr_FR.lang.php
+++ b/src/lang/fr_FR.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Nom utilisateur de la passerelle',
'sms_gateway_password' => 'Mot de passe de la passerelle',
'sms_from' => 'SMS de l\'expéditeur',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Choisissez quand vous souhaitez être notifié.
',
'alert_type_description' => 'Changement d\'état : '.
'Vous recevez une notification chaque fois que le serveur change d\'état. C\'est-à-dire passe de l\'état OK à HORS SERVICE ou de HORS SERVICE à OK.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Enregistrer tout les SMS envoyés',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'La configuration a été mise à jour.',
- 'nochanges' => 'La configuration n\'a pas été modifiée.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Tester',
'test_email' => 'Un email va vous être envoyé à l\'adresse définie dans votre profil utilisateur.',
'test_sms' => 'Un SMS va vous être envoyé au numéro défini dans votre profil utilisateur.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Envoyer',
+ 'test_subject' => 'Test',
'test_message' => 'Message de test',
'email_sent' => 'Email envoyé',
'email_error' => 'Erreur lors de l\'envoie de l\'email',
'sms_sent' => 'Sms envoyé',
'sms_error' => 'Erreur lors de l\'envoie du sms',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/it_IT.lang.php b/src/lang/it_IT.lang.php
index fc8c003a..60b2b5be 100644
--- a/src/lang/it_IT.lang.php
+++ b/src/lang/it_IT.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Nome Utente Gateway',
'sms_gateway_password' => 'Password Gateway',
'sms_from' => 'Numero di telefono del mittente',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Seleziona quando vuoi essere notificato.
',
'alert_type_description' => 'Cambio di Stato: '.
'Riceverai una notifica solo quando un server cambierà stato. Quindi da online -> offline oppure da offline -> online.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Registra SMS inviati dallo script.',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'La configurazione è stato aggiornata.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'An email will be sent to the address specified in your user profile.',
'test_sms' => 'An SMS will be sent to the phone number specified in your user profile.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test message',
'email_sent' => 'Email sent',
'email_error' => 'Error in email sending',
'sms_sent' => 'Sms sent',
'sms_error' => 'Error in sms sending',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/ko_KR.lang.php b/src/lang/ko_KR.lang.php
index 659de7dc..284ee09f 100644
--- a/src/lang/ko_KR.lang.php
+++ b/src/lang/ko_KR.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Gateway username',
'sms_gateway_password' => 'Gateway password',
'sms_from' => 'Sender\'s phone number',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => '알림을 원하면 다음과 같이 변경하십시오..
',
'alert_type_description' => '상태 변경:
'.
'서버 상태가 변경이되면 알림을 받습니다. online -> offline -> online.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'SMS로 로그를 전송하시겠습니까?',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => '설정이 수정되었습니다.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'An email will be sent to the address specified in your user profile.',
'test_sms' => 'An SMS will be sent to the phone number specified in your user profile.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test message',
'email_sent' => 'Email sent',
'email_error' => 'Error in email sending',
'sms_sent' => 'Sms sent',
'sms_error' => 'Error in sms sending',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/nl_NL.lang.php b/src/lang/nl_NL.lang.php
index 4de06bd1..c9ac5707 100644
--- a/src/lang/nl_NL.lang.php
+++ b/src/lang/nl_NL.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Gateway gebruikersnaam',
'sms_gateway_password' => 'Gateway wachtwoord',
'sms_from' => 'Telefoonnummer afzender',
- 'pushover_status' => 'Sta Pushover berichten toe?',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Selecteer wanneer je een notificatie wilt.
',
'alert_type_description' => 'Status change: '.
'Je ontvangt alleen bericht wanneer een server van status verandert. Dus van online -> offline of offline -> online.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Log sms berichten verstuurd bij het script?',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'De configuratie is gewijzigd.',
- 'nochanges' => 'De configuratie is ongewijzigd.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'Er zal een email verstuurd worden naar het email adres in je profiel.',
'test_sms' => 'Er zal een SMS verstuurd worden naar het telefoonnummer in je profiel.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Verstuur',
+ 'test_subject' => 'Test',
'test_message' => 'Test bericht',
'email_sent' => 'Email verzonden',
'email_error' => 'Er is een fout opgetreden tijdens het verzenden',
'sms_sent' => 'SMS verzonden',
'sms_error' => 'Er is een fout opgetreden tijdens het verzenden',
'sms_error_nomobile' => 'Kan test SMS niet verzenden: er is geen telefoonnummer ingevuld in je profiel.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/pt_BR.lang.php b/src/lang/pt_BR.lang.php
index 3fa1936b..71b930e9 100644
--- a/src/lang/pt_BR.lang.php
+++ b/src/lang/pt_BR.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Usuário do Gateway',
'sms_gateway_password' => 'Senha do Gateway',
'sms_from' => 'Número de telefone de envio',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Selecione como você gostaria de ser notificado.
',
'alert_type_description' => 'Mudança de Status: '.
'Você receberá uma notificação quando o seridor tive uma mudança de status. De online -> offline ou offline -> online.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Registrar no Log os envios de mensagens de texto feitos pelo script?',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'A configuração foi atualizada.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => 'Email',
'tab_sms' => 'Texto',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'An email will be sent to the address specified in your user profile.',
'test_sms' => 'An SMS will be sent to the phone number specified in your user profile.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test message',
'email_sent' => 'Email sent',
'email_error' => 'Error in email sending',
'sms_sent' => 'Sms sent',
'sms_error' => 'Error in sms sending',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/lang/ru_RU.lang.php b/src/lang/ru_RU.lang.php
index 2d9a7d04..892b894f 100644
--- a/src/lang/ru_RU.lang.php
+++ b/src/lang/ru_RU.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'Пользователь',
'sms_gateway_password' => 'Пароль',
'sms_from' => 'Номер отправителя',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => 'Выбирите, какие вы хотите получать уведомления
',
'alert_type_description' => 'Изменение статуса : '.
'Вы получите уведомление об изменение статуса. Для онлайн -> оффлайн или офлайн -> онлайн.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => 'Уведомления отправленые по Email',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => 'Параметры были успешно применены.',
- 'nochanges' => 'Параметры не изменились.',
'tab_email' => 'Email',
'tab_sms' => 'SMS',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Тест',
'test_email' => 'Сообщение будет отправлено на адрес указаный в профиле пользователя.',
'test_sms' => 'Сообщение будет отправлено на номер телефона указаный в профиле пользователя.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Отправить',
+ 'test_subject' => 'Test',
'test_message' => 'Тестовое сообщение',
'email_sent' => 'Email отправлен',
'email_error' => 'Ошибка при отправке email',
'sms_sent' => 'Sms отправлено',
'sms_error' => 'Ошибка при отправке sms',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
@@ -278,4 +285,8 @@ $sm_lang = array(
'success_password_forgot' => 'Вам был отправлен email, с описанием сброса пароля.',
'success_password_reset' => 'Ваш пароль был сброшен. Пожалуйста авторизуйтесь.',
),
+ 'error' => array(
+ '401_unauthorized' => 'Unauthorized',
+ '401_unauthorized_description' => 'You do not have the privileges to view this page.',
+ ),
);
diff --git a/src/lang/zh_CN.lang.php b/src/lang/zh_CN.lang.php
index 457fc6f3..fa617062 100644
--- a/src/lang/zh_CN.lang.php
+++ b/src/lang/zh_CN.lang.php
@@ -195,8 +195,10 @@ $sm_lang = array(
'sms_gateway_username' => 'SMS网关用户名',
'sms_gateway_password' => 'SMS网关密码',
'sms_from' => '发信人电话号',
- 'pushover_status' => 'Allow sending pushover messages',
+ 'pushover_status' => 'Allow sending Pushover messages',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_api_token' => 'Pushover App API Token',
+ 'pushover_api_token_description' => 'Before you can use Pushover, you need to register an App at their website and enter the App API Token here.',
'alert_type' => '如果想要收到提醒请选中此项.
',
'alert_type_description' => '状态变化: '.
'服务器 online -> offline 或 offline -> online 的状态变化将会收到提醒.
'.
@@ -215,7 +217,6 @@ $sm_lang = array(
'log_sms' => '记录脚本所发短信SMS?',
'log_pushover' => 'Log pushover messages sent by the script',
'updated' => '设置已更新.',
- 'nochanges' => 'The configuration didn\'t change.',
'tab_email' => '邮件发送设置',
'tab_sms' => '短信发送设置',
'tab_pushover' => 'Pushover',
@@ -234,13 +235,19 @@ $sm_lang = array(
'test' => 'Test',
'test_email' => 'An email will be sent to the address specified in your user profile.',
'test_sms' => 'An SMS will be sent to the phone number specified in your user profile.',
+ 'test_pushover' => 'A Pushover notification will be sent to the user key/device specified in your user profile.',
'send' => 'Send',
+ 'test_subject' => 'Test',
'test_message' => 'Test message',
'email_sent' => 'Email sent',
'email_error' => 'Error in email sending',
'sms_sent' => 'Sms sent',
'sms_error' => 'Error in sms sending',
'sms_error_nomobile' => 'Unable to send test SMS: no valid phone number found in your profile.',
+ 'pushover_sent' => 'Pushover notification sent',
+ 'pushover_error' => 'An error has occurred while sending the Pushover notification: %s',
+ 'pushover_error_noapp' => 'Unable to send test notification: no Pushover App API token found in the global configuration.',
+ 'pushover_error_nokey' => 'Unable to send test notification: no Pushover key found in your profile.',
),
// for newlines in the email messages use
'notifications' => array(
diff --git a/src/psm/Module/Config/Controller/ConfigController.class.php b/src/psm/Module/Config/Controller/ConfigController.class.php
index 337cc5af..bb954b8f 100644
--- a/src/psm/Module/Config/Controller/ConfigController.class.php
+++ b/src/psm/Module/Config/Controller/ConfigController.class.php
@@ -124,17 +124,14 @@ class ConfigController extends AbstractController {
$tpl_data[$this->default_tab . '_active'] = 'active';
- $modal = new \psm\Util\Module\Modal($this->tpl, 'testEmail', \psm\Util\Module\Modal::MODAL_TYPE_OKCANCEL);
- $this->addModal($modal);
- $modal->setTitle(psm_get_lang('servers', 'send_email'));
- $modal->setMessage(psm_get_lang('config', 'test_email'));
- $modal->setOKButtonLabel(psm_get_lang('config', 'send'));
-
- $modal = new \psm\Util\Module\Modal($this->tpl, 'testSMS', \psm\Util\Module\Modal::MODAL_TYPE_OKCANCEL);
- $this->addModal($modal);
- $modal->setTitle(psm_get_lang('servers', 'send_sms'));
- $modal->setMessage(psm_get_lang('config', 'test_sms'));
- $modal->setOKButtonLabel(psm_get_lang('config', 'send'));
+ $testmodals = array('email', 'sms', 'pushover');
+ foreach($testmodals as $modal_id) {
+ $modal = new \psm\Util\Module\Modal($this->tpl, 'test' . ucfirst($modal_id), \psm\Util\Module\Modal::MODAL_TYPE_OKCANCEL);
+ $this->addModal($modal);
+ $modal->setTitle(psm_get_lang('servers', 'send_' . $modal_id));
+ $modal->setMessage(psm_get_lang('config', 'test_' . $modal_id));
+ $modal->setOKButtonLabel(psm_get_lang('config', 'send'));
+ }
$this->tpl->addTemplateData($this->getTemplateId(), $tpl_data);
}
@@ -160,73 +157,21 @@ class ConfigController extends AbstractController {
$clean[$input_key] = $_POST[$input_key];
}
}
-
- // save all values to the database
- $changed = false;
+ $language_refresh = ($clean['language'] != psm_get_conf('language'));
foreach($clean as $key => $value) {
- // check if key already exists, otherwise add it
- $old_value = psm_get_conf($key);
- if($old_value === null) {
- // not yet set, add it
- $this->db->save(
- PSM_DB_PREFIX . 'config',
- array(
- 'key' => $key,
- 'value' => $value,
- )
- );
- $changed = true;
- } else if($value != $old_value) {
- // update
- $this->db->save(
- PSM_DB_PREFIX . 'config',
- array('value' => $value),
- array('key' => $key)
- );
- $changed = true;
- }
- }
-
- if($changed) {
- $this->addMessage(psm_get_lang('config', 'updated'), 'success');
- } else {
- $this->addMessage(psm_get_lang('config', 'nochanges'));
+ psm_update_conf($key, $value);
}
+ $this->addMessage(psm_get_lang('config', 'updated'), 'success');
if(!empty($_POST['test_email'])) {
- // build mail object
- $mail = psm_build_mail();
- $message = psm_get_lang('config', 'test_message');
- $mail->Subject = $message;
- $mail->Priority = 1;
- $mail->Body = $message;
- $mail->AltBody = str_replace('
', "\n", $message);
- $user = $this->user->getUser();
- $mail->AddAddress($user->email, $user->name);
- if($mail->Send()) {
- $this->addMessage(psm_get_lang('config', 'email_sent'), 'success');
- } else {
- $this->addMessage(psm_get_lang('config', 'email_error') . ': ' . $mail->ErrorInfo, 'error');
- }
+ $this->testEmail();
} elseif(!empty($_POST['test_sms'])) {
- // build sms object
- $sms = psm_build_sms();
- if($sms) {
- $user = $this->user->getUser();
- if(empty($user->mobile)) {
- $this->addMessage(psm_get_lang('config', 'sms_error_nomobile'), 'error');
- } else {
- $sms->addRecipients($user->mobile);
- if($sms->sendSMS(psm_get_lang('config', 'test_message'))) {
- $this->addMessage(psm_get_lang('config', 'sms_sent'), 'success');
- } else {
- $this->addMessage(psm_get_lang('config', 'sms_error'), 'error');
- }
- }
- }
+ $this->testSMS();
+ } elseif(!empty($_POST['test_pushover'])) {
+ $this->testPushover();
}
- if($clean['language'] != psm_get_conf('language')) {
+ if($language_refresh) {
header('Location: ' . psm_build_url(array('mod' => 'config'), true, false));
die();
}
@@ -237,13 +182,94 @@ class ConfigController extends AbstractController {
$this->default_tab = 'email';
} elseif(isset($_POST['sms_submit']) || !empty($_POST['test_sms'])) {
$this->default_tab = 'sms';
- } elseif(isset($_POST['pushover_submit'])) {
+ } elseif(isset($_POST['pushover_submit']) || !empty($_POST['test_pushover'])) {
$this->default_tab = 'pushover';
}
}
$this->initializeAction('index');
}
+ /**
+ * Execute email test
+ *
+ * @todo move test to separate class
+ */
+ protected function testEmail() {
+ $mail = psm_build_mail();
+ $message = psm_get_lang('config', 'test_message');
+ $mail->Subject = psm_get_lang('config', 'test_subject');
+ $mail->Priority = 1;
+ $mail->Body = $message;
+ $mail->AltBody = str_replace('
', "\n", $message);
+ $user = $this->user->getUser();
+ $mail->AddAddress($user->email, $user->name);
+ if($mail->Send()) {
+ $this->addMessage(psm_get_lang('config', 'email_sent'), 'success');
+ } else {
+ $this->addMessage(psm_get_lang('config', 'email_error') . ': ' . $mail->ErrorInfo, 'error');
+ }
+ }
+
+ /**
+ * Execute SMS test
+ *
+ * @todo move test to separate class
+ */
+ protected function testSMS() {
+ $sms = psm_build_sms();
+ if($sms) {
+ $user = $this->user->getUser();
+ if(empty($user->mobile)) {
+ $this->addMessage(psm_get_lang('config', 'sms_error_nomobile'), 'error');
+ } else {
+ $sms->addRecipients($user->mobile);
+ if($sms->sendSMS(psm_get_lang('config', 'test_message'))) {
+ $this->addMessage(psm_get_lang('config', 'sms_sent'), 'success');
+ } else {
+ $this->addMessage(psm_get_lang('config', 'sms_error'), 'error');
+ }
+ }
+ }
+ }
+
+ /**
+ * Execute pushover test
+ *
+ * @todo move test to separate class
+ */
+ protected function testPushover() {
+ $pushover = psm_build_pushover();
+ $pushover->setDebug(true);
+ $user = $this->user->getUser();
+ $api_token = psm_get_conf('pushover_api_token');
+
+ if(empty($api_token)) {
+ $this->addMessage(psm_get_lang('config', 'pushover_error_noapp'), 'error');
+ } elseif(empty($user->pushover_key)) {
+ $this->addMessage(psm_get_lang('config', 'pushover_error_nokey'), 'error');
+ } else {
+ $pushover->setPriority(0);
+ $pushover->setTitle(psm_get_lang('config', 'test_subject'));
+ $pushover->setMessage(psm_get_lang('config', 'test_message'));
+ $pushover->setUser($user->pushover_key);
+ if($user->pushover_device != '') {
+ $pushover->setDevice($user->pushover_device);
+ }
+ $result = $pushover->send();
+
+ if(isset($result['output']->status) && $result['output']->status == 1) {
+ $this->addMessage(psm_get_lang('config', 'pushover_sent'), 'success');
+ } else {
+ if(isset($result['output']->errors->error)) {
+ $error = $result['output']->errors->error;
+ } else {
+ $error = 'Unknown';
+ }
+ $this->addMessage(sprintf(psm_get_lang('config', 'pushover_error'), $error), 'error');
+ }
+ }
+ }
+
// override parent::createHTMLLabels()
protected function createHTMLLabels() {
$this->tpl->addTemplateData(
@@ -283,8 +309,10 @@ class ConfigController extends AbstractController {
'label_sms_gateway_username' => psm_get_lang('config', 'sms_gateway_username'),
'label_sms_gateway_password' => psm_get_lang('config', 'sms_gateway_password'),
'label_sms_from' => psm_get_lang('config', 'sms_from'),
+ 'label_pushover_description' => psm_get_lang('config', 'pushover_description'),
'label_pushover_status' => psm_get_lang('config', 'pushover_status'),
'label_pushover_api_token' => psm_get_lang('config', 'pushover_api_token'),
+ 'label_pushover_api_token_description' => psm_get_lang('config', 'pushover_api_token_description'),
'label_alert_type' => psm_get_lang('config', 'alert_type'),
'label_alert_type_description' => psm_get_lang('config', 'alert_type_description'),
'label_alert_type_status' => psm_get_lang('config', 'alert_type_status'),
diff --git a/src/psm/Util/Updater/StatusNotifier.class.php b/src/psm/Util/Updater/StatusNotifier.class.php
index 7968c86d..225659a2 100644
--- a/src/psm/Util/Updater/StatusNotifier.class.php
+++ b/src/psm/Util/Updater/StatusNotifier.class.php
@@ -241,8 +241,6 @@ class StatusNotifier {
$pushover->setRetry(300); //Used with Priority = 2; Pushover will resend the notification every 60 seconds until the user accepts.
$pushover->setExpire(3600); //Used with Priority = 2; Pushover will resend the notification every 60 seconds for 3600 seconds. After that point, it stops sending notifications.
}
- $pushover->setTimestamp(time());
-
$message = psm_parse_msg($this->status_new, 'pushover_message', $this->server);
$pushover->setTitle(psm_parse_msg($this->status_new, 'pushover_title', $this->server));
diff --git a/src/templates/config/config.tpl.html b/src/templates/config/config.tpl.html
index 9aff176f..d9f3b1d5 100644
--- a/src/templates/config/config.tpl.html
+++ b/src/templates/config/config.tpl.html
@@ -169,7 +169,7 @@
{label_pushover_description}
{label_pushover_api_token_description}