diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php
index 1be0093d..505247bb 100755
--- a/src/includes/functions.inc.php
+++ b/src/includes/functions.inc.php
@@ -63,10 +63,20 @@ function psm_load_lang($lang) {
$lang_file = PSM_PATH_LANG . $lang . '.lang.php';
if(!file_exists($lang_file)) {
- die('unable to load language file: ' . $lang_file);
+ // If the file have been removed, we use the english one
+ $en_file = PSM_PATH_LANG . 'en.lang.php';
+ if(!file_exists($en_file)) {
+ // OK, nothing we can do
+ die('unable to load language file: ' . $lang_file);
+ }
+ $lang_file = $en_file;
}
require $lang_file;
+ if(isset($sm_lang['locale']))
+ {
+ setlocale(LC_TIME, $sm_lang['locale']);
+ }
$GLOBALS['sm_lang'] = $sm_lang;
}
@@ -83,7 +93,21 @@ function psm_get_langs() {
$langs = array();
foreach($lang_files as $file) {
- $langs[] = str_replace($fn_ext, '', basename($file));
+ $key = str_replace($fn_ext, '', basename($file));
+ $sm_lang = array();
+ if(file_exists($file)) {
+ require $file;
+ }
+ if(isset($sm_lang['name']))
+ {
+ $name = $sm_lang['name'];
+ }
+ else
+ {
+ $name = $key;
+ }
+ $langs[$key] = $name;
+ unset($sm_lang);
}
return $langs;
}
@@ -254,28 +278,24 @@ function psm_curl_get($href, $header = false, $body = true, $timeout = 10, $add_
*/
function psm_timespan($time) {
if(empty($time) || $time == '0000-00-00 00:00:00')
- return 'never';
+ return psm_get_lang(system, 'never');
if ($time !== intval($time)) { $time = strtotime($time); }
- $d = time() - $time;
if ($time < strtotime(date('Y-m-d 00:00:00')) - 60*60*24*3) {
- $format = 'F j';
- if (date('Y') !== date('Y', $time)) {
- $format .= ", Y";
- }
- return date($format, $time);
+ $format = psm_get_lang('system', (date('Y') !== date('Y', $time)) ? 'long_day_format' : 'short_day_format');
+ return strftime($format, $time);
}
+ $d = time() - $time;
if ($d >= 60*60*24) {
- $day = 'Yesterday';
- if (date('l', time() - 60*60*24) !== date('l', $time)) { $day = date('l', $time); }
- return $day . " at " . date('g:ia', $time);
+ $format = psm_get_lang('system', (date('l', time() - 60*60*24) == date('l', $time)) ? 'yesterday_format' : 'other_day_format');
+ return strftime($format, $time);
}
- if ($d >= 60*60*2) { return intval($d / (60*60)) . " hours ago"; }
- if ($d >= 60*60) { return "about an hour ago"; }
- if ($d >= 60*2) { return intval($d / 60) . " minutes ago"; }
- if ($d >= 60) { return "about a minute ago"; }
- if ($d >= 2) { return intval($d) . " seconds ago"; }
+ if ($d >= 60*60*2) { return sprintf(psm_get_lang('system', 'hours_ago'), intval($d / (60*60))); }
+ if ($d >= 60*60) { return psm_get_lang('system', 'an_hour_ago'); }
+ if ($d >= 60*2) { return sprintf(psm_get_lang('system', 'minutes_ago'), intval($d / 60)); }
+ if ($d >= 60) { return psm_get_lang('system', 'a_minute_ago'); }
+ if ($d >= 2) { return sprintf(psm_get_lang('system', 'seconds_ago'), intval($d));intval($d); }
- return "a few seconds ago";
+ return psm_get_lang('system', 'a_second_ago');
}
/**
@@ -287,7 +307,7 @@ function psm_timespan($time) {
function psm_date($time)
{
if(empty($time) || $time == '0000-00-00 00:00:00')
- return 'never';
+ return psm_get_lang(system, 'never');
return date(psm_get_lang('system', 'date_time_format'), strtotime($time));
}
diff --git a/src/lang/bg.lang.php b/src/lang/bg.lang.php
index 4ba14ded..1696b202 100755
--- a/src/lang/bg.lang.php
+++ b/src/lang/bg.lang.php
@@ -26,6 +26,8 @@
**/
$sm_lang = array(
+ 'name' => 'Български',
+ 'locale' => 'bg_BG', // Language code (ISO 639-1) + Contry code (ISO_3166-1)
'system' => array(
'title' => 'Server Monitor',
'install' => 'Инсталация',
@@ -46,6 +48,18 @@ $sm_lang = array(
'go_back' => 'Go back',
'date_time_format' => 'd.m.Y H:i:s', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+
+ 'short_day_format' => '%B %e', // date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
+ 'long_day_format' => '%B %e, %Y',
+ 'yesterday_format' => 'Yesterday at %l:%Ma',
+ 'other_day_format' => '%A at g:ia',
+ 'never' => 'Never',
+ 'hours_ago' => '%d hours ago',
+ 'an_hour_ago' => 'about an hour ago',
+ 'minutes_ago' => '%d minutes ago',
+ 'a_minute_ago' => 'about a minute ago',
+ 'seconds_ago' => '%d seconds ago',
+ 'a_second_ago' => 'a second ago',
),
'menu' => array(
'config' => 'Настройки',
@@ -97,6 +111,8 @@ $sm_lang = array(
'domain' => 'Хост',
'port' => 'Порт',
'type' => 'Тип',
+ 'type_website' => 'Website',
+ 'type_service' => 'Service',
'pattern' => 'Търсене на образец/схема',
'pattern_description' => 'If this pattern is not found on the website, the server will be marked offline. Regular expressions are allowed.',
'last_check' => 'Последна проверка',
@@ -122,13 +138,6 @@ $sm_lang = array(
'config' => array(
'general' => 'Основни настройки',
'language' => 'Език',
- 'language_en' => 'English',
- 'language_bg' => 'Български',
- 'language_nl' => 'Dutch',
- 'language_fr' => 'French',
- 'language_de' => 'German',
- 'language_kr' => 'Korean',
- 'language_br' => 'Portuguese - Brazilian',
'show_update' => 'Да проверява ли за нова версия всяка седмица?',
'email_status' => 'Да се изпращат ли имейли?',
'email_from_email' => 'Имейл, от който да се изпращат съобщенията',
diff --git a/src/lang/br.lang.php b/src/lang/br.lang.php
index d79adca9..d1b00502 100755
--- a/src/lang/br.lang.php
+++ b/src/lang/br.lang.php
@@ -26,6 +26,8 @@
**/
$sm_lang = array(
+ 'name' => 'Portugês - Brasil',
+ 'locale' => 'pt_BR', // Language code (ISO 639-1) + Contry code (ISO_3166-1)
'system' => array(
'title' => 'Server Monitor',
'install' => 'Install',
@@ -46,6 +48,18 @@ $sm_lang = array(
'go_back' => 'Go back',
'date_time_format' => 'd/m/Y H:i:s', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+
+ 'short_day_format' => '%B %e', // date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
+ 'long_day_format' => '%B %e, %Y',
+ 'yesterday_format' => 'Yesterday at %l:%Ma',
+ 'other_day_format' => '%A at g:ia',
+ 'never' => 'Never',
+ 'hours_ago' => '%d hours ago',
+ 'an_hour_ago' => 'about an hour ago',
+ 'minutes_ago' => '%d minutes ago',
+ 'a_minute_ago' => 'about a minute ago',
+ 'seconds_ago' => '%d seconds ago',
+ 'a_second_ago' => 'a second ago',
),
'menu' => array(
'config' => 'Configuração',
@@ -97,6 +111,8 @@ $sm_lang = array(
'domain' => 'Domínio/IP',
'port' => 'Porta',
'type' => 'Tipo',
+ 'type_website' => 'Website',
+ 'type_service' => 'Service',
'pattern' => 'Search string/pattern',
'pattern_description' => 'If this pattern is not found on the website, the server will be marked offline. Regular expressions are allowed.',
'last_check' => 'Última verificação',
@@ -122,13 +138,6 @@ $sm_lang = array(
'config' => array(
'general' => 'Geral',
'language' => 'Idioma',
- 'language_en' => 'Inglês',
- 'language_bg' => 'Bulgarian',
- 'language_nl' => 'Holandês',
- 'language_fr' => 'Francês',
- 'language_de' => 'Alemão',
- 'language_kr' => 'Koreano',
- 'language_br' => 'Portugês - Brasil',
'show_update' => 'verificar atualizações semanalmente?',
'email_status' => 'Habilitar envio de email?',
'email_from_email' => 'Endereço do envio de email',
diff --git a/src/lang/de.lang.php b/src/lang/de.lang.php
index e8ac0bd1..e451a1f3 100755
--- a/src/lang/de.lang.php
+++ b/src/lang/de.lang.php
@@ -26,6 +26,8 @@
**/
$sm_lang = array(
+ 'name' => 'Dutch',
+ 'locale' => 'de_DE', // Language code (ISO 639-1) + Contry code (ISO_3166-1)
'system' => array(
'title' => 'Server Monitor',
'install' => 'Install',
@@ -46,6 +48,18 @@ $sm_lang = array(
'go_back' => 'Go back',
'date_time_format' => 'd.m.Y H:i:s', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+
+ 'short_day_format' => '%B %e', // date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
+ 'long_day_format' => '%B %e, %Y',
+ 'yesterday_format' => 'Yesterday at %l:%Ma',
+ 'other_day_format' => '%A at g:ia',
+ 'never' => 'Never',
+ 'hours_ago' => '%d hours ago',
+ 'an_hour_ago' => 'about an hour ago',
+ 'minutes_ago' => '%d minutes ago',
+ 'a_minute_ago' => 'about a minute ago',
+ 'seconds_ago' => '%d seconds ago',
+ 'a_second_ago' => 'a second ago',
),
'menu' => array(
'config' => 'Einstellungen',
@@ -97,6 +111,8 @@ $sm_lang = array(
'domain' => 'Domain/IP',
'port' => 'Port',
'type' => 'Type',
+ 'type_website' => 'Website',
+ 'type_service' => 'Service',
'pattern' => 'Search string/pattern',
'pattern_description' => 'If this pattern is not found on the website, the server will be marked offline. Regular expressions are allowed.',
'last_check' => 'Letzter Check',
@@ -122,13 +138,6 @@ $sm_lang = array(
'config' => array(
'general' => 'General',
'language' => 'Sprache',
- 'language_en' => 'English',
- 'language_bg' => 'Bulgarian',
- 'language_nl' => 'Dutch',
- 'language_fr' => 'French',
- 'language_de' => 'German',
- 'language_kr' => 'Korean',
- 'language_br' => 'Portuguese - Brazilian',
'show_update' => 'Updats wöchentlich prüfen?',
'email_status' => 'Email senden erlauben?',
'email_from_email' => 'Email from address',
diff --git a/src/lang/en.lang.php b/src/lang/en.lang.php
index 337d8872..889dd134 100755
--- a/src/lang/en.lang.php
+++ b/src/lang/en.lang.php
@@ -26,6 +26,8 @@
**/
$sm_lang = array(
+ 'name' => 'English',
+ 'locale' => 'en_US', // Language code (ISO 639-1) + Contry code (ISO_3166-1)
'system' => array(
'title' => 'Server Monitor',
'install' => 'Install',
@@ -45,7 +47,19 @@ $sm_lang = array(
'back_to_top' => 'Back to top',
'go_back' => 'Go back',
- 'date_time_format' => 'Y-m-d H:i:s', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+ 'date_time_format' => 'Y-m-d g:i:sa', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+
+ 'short_day_format' => '%B %e', // date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
+ 'long_day_format' => '%B %e, %Y',
+ 'yesterday_format' => 'Yesterday at %l:%Ma',
+ 'other_day_format' => '%A at g:ia',
+ 'never' => 'Never',
+ 'hours_ago' => '%d hours ago',
+ 'an_hour_ago' => 'about an hour ago',
+ 'minutes_ago' => '%d minutes ago',
+ 'a_minute_ago' => 'about a minute ago',
+ 'seconds_ago' => '%d seconds ago',
+ 'a_second_ago' => 'a second ago',
),
'menu' => array(
'config' => 'Config',
@@ -97,6 +111,8 @@ $sm_lang = array(
'domain' => 'Domain/IP',
'port' => 'Port',
'type' => 'Type',
+ 'type_website' => 'Website',
+ 'type_service' => 'Service',
'pattern' => 'Search string/pattern',
'pattern_description' => 'If this pattern is not found on the website, the server will be marked offline. Regular expressions are allowed.',
'last_check' => 'Last check',
@@ -122,13 +138,6 @@ $sm_lang = array(
'config' => array(
'general' => 'General',
'language' => 'Language',
- 'language_en' => 'English',
- 'language_bg' => 'Bulgarian',
- 'language_nl' => 'Dutch',
- 'language_fr' => 'French',
- 'language_de' => 'German',
- 'language_kr' => 'Korean',
- 'language_br' => 'Portuguese - Brazilian',
'show_update' => 'Check for new updates weekly?',
'email_status' => 'Allow sending email?',
'email_from_email' => 'Email from address',
diff --git a/src/lang/fr.lang.php b/src/lang/fr.lang.php
index 40299325..346f435e 100755
--- a/src/lang/fr.lang.php
+++ b/src/lang/fr.lang.php
@@ -26,6 +26,8 @@
**/
$sm_lang = array(
+ 'name' => 'Français',
+ 'locale' => 'fr_FR', // Language code (ISO 639-1) + Contry code (ISO_3166-1)
'system' => array(
'title' => 'Server Monitor',
'install' => 'Installer',
@@ -46,6 +48,18 @@ $sm_lang = array(
'go_back' => 'Retour',
'date_time_format' => 'd/m/Y H:i:s', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+
+ 'short_day_format' => 'Le %e %B', // date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
+ 'long_day_format' => 'Le %e %B %Y',
+ 'yesterday_format' => 'Hier à %kh%M',
+ 'other_day_format' => '%A à %kh%M',
+ 'never' => 'Jamais',
+ 'hours_ago' => 'Il y a %d heures',
+ 'an_hour_ago' => 'Il y a une heure',
+ 'minutes_ago' => 'Il y a %d minutes',
+ 'a_minute_ago' => 'Il y a une minute',
+ 'seconds_ago' => 'Il y a %d secondes',
+ 'a_second_ago' => 'Il y a une seconde',
),
'menu' => array(
'config' => 'Configuration',
@@ -67,7 +81,7 @@ $sm_lang = array(
'level' => 'Niveau',
'level_10' => 'Administrateur',
'level_20' => 'Utilisateur',
- 'level_description' => 'Administrators have full access: they can manage servers, users and edit the global configuration.
Users can only view and run the updater for the servers that have been assigned to them.',
+ 'level_description' => 'Les Administrateurs ont un accès total. Ils peuvent gérer les serveurs, les utilisateurs et éditer la configuration globale.
Les Utilisateurs ne peuvent que voir et mettre à jour les serveurs qui leur ont été assignés.',
'mobile' => 'Numéro de téléphone',
'email' => 'Email',
'updated' => 'Utilisateur mis à jour.',
@@ -97,8 +111,10 @@ $sm_lang = array(
'domain' => 'Domaine/IP',
'port' => 'Port',
'type' => 'Type',
+ 'type_website' => 'Site Web',
+ 'type_service' => 'Service',
'pattern' => 'Rechercher un texte/motif',
- 'pattern_description' => 'If this pattern is not found on the website, the server will be marked offline. Regular expressions are allowed.',
+ 'pattern_description' => 'Si ce texte n\'est par retrouvé sur le site web, le serveur est marqué hors-service. Les expressions réguliaires sont autorisées.',
'last_check' => 'Dernière vérification',
'last_online' => 'Dernière fois OK',
'monitoring' => 'Serveillé',
@@ -111,8 +127,8 @@ $sm_lang = array(
'week' => 'Semaine',
'day' => 'Jour',
'hour' => 'Heure',
- 'warning_threshold' => 'Warning threshold',
- 'warning_threshold_description' => 'Number of failed checks required before it is marked offline.',
+ 'warning_threshold' => 'Seuil d\'alerte',
+ 'warning_threshold_description' => 'Nombre d\'échecs de connexion avant que le serveur soit marqué hors-service.',
// Charts date format according jqPlot date format http://www.jqplot.com/docs/files/plugins/jqplot-dateAxisRenderer-js.html
'chart_long_date_format' => '%d/%m/%Y %H:%M:%S',
@@ -122,13 +138,6 @@ $sm_lang = array(
'config' => array(
'general' => 'Général',
'language' => 'Langue',
- 'language_en' => 'English',
- 'language_bg' => 'Bulgarian',
- 'language_nl' => 'Dutch',
- 'language_fr' => 'Français',
- 'language_de' => 'German',
- 'language_kr' => 'Korean',
- 'language_br' => 'Portuguese - Brazilian',
'show_update' => 'Vérifier les nouvelles mise à jour chaque semaines',
'email_status' => 'Autoriser l\'envoi de mail',
'email_from_email' => 'Adresse de l\'expéditeur',
@@ -180,7 +189,7 @@ $sm_lang = array(
'notifications' => array(
'off_sms' => 'Le Serveur \'%LABEL%\' est HORS SERVICE: IP=%IP%, Port=%PORT%. Erreur=%ERROR%',
'off_email_subject' => 'IMPORTANT: Le Serveur \'%LABEL%\' est HORS SERVICE',
- 'off_email_body' => "Impossible de vérifier le serveur suivant:
Serveur: %LABEL%
IP: %IP%
Port: %PORT%
Erreur: %ERROR%
Date: %DATE%",
+ 'off_email_body' => "Impossible de se connecter au serveur suivant:
Serveur: %LABEL%
IP: %IP%
Port: %PORT%
Erreur: %ERROR%
Date: %DATE%",
'on_sms' => 'Le Serveur \'%LABEL%\' est OK: IP=%IP%, Port=%PORT%',
'on_email_subject' => 'IMPORTANT: Le Serveur \'%LABEL%\' est OK',
'on_email_body' => "Le Serveur '%LABEL%' est de nouveau OK:
Serveur: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%",
diff --git a/src/lang/kr.lang.php b/src/lang/kr.lang.php
index e60399c5..4ed6e44f 100755
--- a/src/lang/kr.lang.php
+++ b/src/lang/kr.lang.php
@@ -26,6 +26,8 @@
**/
$sm_lang = array(
+ 'name' => '한국',
+ 'locale' => 'ko_KR', // Language code (ISO 639-1) + Contry code (ISO_3166-1)
'system' => array(
'title' => 'Server Monitor',
'install' => 'Install',
@@ -46,6 +48,18 @@ $sm_lang = array(
'go_back' => 'Go back',
'date_time_format' => 'Y-m-d H:i:s', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+
+ 'short_day_format' => '%B %e', // date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
+ 'long_day_format' => '%B %e, %Y',
+ 'yesterday_format' => 'Yesterday at %l:%Ma',
+ 'other_day_format' => '%A at g:ia',
+ 'never' => 'Never',
+ 'hours_ago' => '%d hours ago',
+ 'an_hour_ago' => 'about an hour ago',
+ 'minutes_ago' => '%d minutes ago',
+ 'a_minute_ago' => 'about a minute ago',
+ 'seconds_ago' => '%d seconds ago',
+ 'a_second_ago' => 'a second ago',
),
'menu' => array(
'config' => '설정',
@@ -97,6 +111,8 @@ $sm_lang = array(
'domain' => 'Domain/IP',
'port' => 'Port',
'type' => 'Type',
+ 'type_website' => 'Website',
+ 'type_service' => 'Service',
'pattern' => 'Search string/regex',
'pattern_description' => 'If this pattern is not found on the website, the server will be marked offline. Regular expressions are allowed.',
'last_check' => '최근체크',
@@ -122,13 +138,6 @@ $sm_lang = array(
'config' => array(
'general' => '일반',
'language' => '언어',
- 'language_en' => '미국',
- 'language_bg' => 'Bulgarian',
- 'language_nl' => '네덜란드',
- 'language_fr' => '프랑스',
- 'language_de' => '독일',
- 'language_kr' => '한국',
- 'language_br' => 'Portuguese - Brazilian',
'show_update' => '매주 업데이트를 확인하시겠습니까?',
'email_status' => '메일전송 허용',
'email_from_email' => 'Email 주소',
diff --git a/src/lang/nl.lang.php b/src/lang/nl.lang.php
index 849904c3..4d44e03f 100755
--- a/src/lang/nl.lang.php
+++ b/src/lang/nl.lang.php
@@ -26,6 +26,8 @@
**/
$sm_lang = array(
+ 'name' => 'Nederlands',
+ 'locale' => 'nl_NL', // Language code (ISO 639-1) + Contry code (ISO_3166-1)
'system' => array(
'title' => 'Server Monitor',
'install' => 'Install',
@@ -46,6 +48,18 @@ $sm_lang = array(
'go_back' => 'Terug',
'date_time_format' => 'd-m-Y H:i:s', // date/time format according the date php function format parameter http://php.net/manual/function.date.php
+
+ 'short_day_format' => '%B %e', // date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
+ 'long_day_format' => '%B %e, %Y',
+ 'yesterday_format' => 'Yesterday at %l:%Ma',
+ 'other_day_format' => '%A at g:ia',
+ 'never' => 'Never',
+ 'hours_ago' => '%d hours ago',
+ 'an_hour_ago' => 'about an hour ago',
+ 'minutes_ago' => '%d minutes ago',
+ 'a_minute_ago' => 'about a minute ago',
+ 'seconds_ago' => '%d seconds ago',
+ 'a_second_ago' => 'a second ago',
),
'menu' => array(
'config' => 'Config',
@@ -97,6 +111,8 @@ $sm_lang = array(
'domain' => 'Domein/IP',
'port' => 'Poort',
'type' => 'Type',
+ 'type_website' => 'Website',
+ 'type_service' => 'Service',
'pattern' => 'Zoek voor tekst/regex',
'pattern_description' => 'If this pattern is not found on the website, the server will be marked offline. Regular expressions are allowed.',
'last_check' => 'Laatst gecontroleerd',
@@ -122,13 +138,6 @@ $sm_lang = array(
'config' => array(
'general' => 'Algemeen',
'language' => 'Taal',
- 'language_en' => 'Engels',
- 'language_bg' => 'Bulgarian',
- 'language_nl' => 'Nederlands',
- 'language_fr' => 'Frans',
- 'language_de' => 'Duits',
- 'language_kr' => 'Koreaans',
- 'language_br' => 'Portugees - Braziliaans',
'show_update' => 'Check for new updates weekly?',
'email_status' => 'Sta email berichten toe?',
'email_from_email' => 'Email van adres',
diff --git a/src/psm/Module/Config/Controller/ConfigController.class.php b/src/psm/Module/Config/Controller/ConfigController.class.php
index 2b447f21..6d531e1e 100644
--- a/src/psm/Module/Config/Controller/ConfigController.class.php
+++ b/src/psm/Module/Config/Controller/ConfigController.class.php
@@ -92,13 +92,7 @@ class ConfigController extends AbstractController {
// generate language array
$lang_keys = psm_get_langs();
$languages = array();
- foreach($lang_keys as $key) {
- $label = psm_get_lang('config', 'language_' . $key);
- // if we don't have a proper label, just show the key..
- // better something than nothing huh
- if($label == null) {
- $label = $key;
- }
+ foreach($lang_keys as $key => $label) {
$languages[] = array(
'value' => $key,
'label' => $label,
diff --git a/src/psm/Module/Server/Controller/ServerController.class.php b/src/psm/Module/Server/Controller/ServerController.class.php
index bbd36b80..842865b8 100755
--- a/src/psm/Module/Server/Controller/ServerController.class.php
+++ b/src/psm/Module/Server/Controller/ServerController.class.php
@@ -81,6 +81,9 @@ class ServerController extends AbstractServerController {
$servers[$x]['rtime'] = round((float) $servers[$x]['rtime'], 4);
$servers[$x]['last_online'] = psm_date($servers[$x]['last_online']);
$servers[$x]['last_check'] = psm_date($servers[$x]['last_check']);
+ $servers[$x]['active'] = psm_get_lang('system', $servers[$x]['active']);
+ $servers[$x]['email'] = psm_get_lang('system', $servers[$x]['email']);
+ $servers[$x]['sms'] = psm_get_lang('system', $servers[$x]['sms']);
if($servers[$x]['type'] == 'website') {
// add link to label
@@ -90,6 +93,8 @@ class ServerController extends AbstractServerController {
if($servers[$x]['status'] == 'on' && $servers[$x]['warning_threshold_counter'] > 0) {
$servers[$x]['status'] = 'warning';
}
+
+ $servers[$x]['type'] = psm_get_lang('servers', 'type_' . $servers[$x]['type']);
}
// add servers to template
$this->tpl->addTemplateDataRepeat($this->getTemplateId(), 'servers', $servers);
@@ -224,6 +229,9 @@ class ServerController extends AbstractServerController {
'label_domain' => psm_get_lang('servers', 'domain'),
'label_port' => psm_get_lang('servers', 'port'),
'label_type' => psm_get_lang('servers', 'type'),
+ 'label_website' => psm_get_lang('servers', 'type_website'),
+ 'label_service' => psm_get_lang('servers', 'type_service'),
+ 'label_type' => psm_get_lang('servers', 'type'),
'label_pattern' => psm_get_lang('servers', 'pattern'),
'label_pattern_description' => psm_get_lang('servers', 'pattern_description'),
'label_last_check' => psm_get_lang('servers', 'last_check'),
diff --git a/src/templates/servers.tpl.html b/src/templates/servers.tpl.html
index da5278c7..58363a0d 100755
--- a/src/templates/servers.tpl.html
+++ b/src/templates/servers.tpl.html
@@ -84,8 +84,8 @@