Skip to content

Commit 55eb00b

Browse files
AntennipasiAntennipasi
authored andcommitted
Added more translations to monitor-module, still more to come.
1 parent 7361682 commit 55eb00b

File tree

6 files changed

+82
-22
lines changed

6 files changed

+82
-22
lines changed

interface/web/monitor/lib/lang/en.lng

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,33 @@ $wb['Show Clamav-Log'] = 'Show Clamav-Log';
4545
$wb['Show ISPConfig-Log'] = 'Show ISPConfig-Log';
4646
$wb['Show RKHunter-Log'] = 'Show RKHunter-Log';
4747
$wb['Show Jobqueue'] = 'Show Jobqueue';
48+
$wb['monitor_general_serverstate_txt'] = 'Server State';
49+
$wb['monitor_general_systemstate_txt'] = 'System State';
4850
$wb['monitor_diskusage_filesystem_txt'] = 'Filesystem';
4951
$wb['monitor_diskusage_type_txt'] = 'Type';
5052
$wb['monitor_diskusage_size_txt'] = 'Size';
5153
$wb['monitor_diskusage_used_txt'] = 'Used';
5254
$wb['monitor_diskusage_available_txt'] = 'Available';
5355
$wb['monitor_diskusage_usage_txt'] = 'Use%';
5456
$wb['monitor_diskusage_mounted_txt'] = 'Mounted on';
57+
$wb['monitor_logs_mail_txt'] = 'Mail - Log';
58+
$wb['monitor_logs_mailwarn_txt'] = 'Mail-Warn - Log';
59+
$wb['monitor_logs_mailerr_txt'] = 'Mail-Error - Log';
60+
$wb['monitor_logs_messages_txt'] = 'System Messages - Log';
61+
$wb['monitor_logs_ispccron_txt'] = 'ISPConfig Cron - Log';
62+
$wb['monitor_logs_freshclam_txt'] = 'Freshclam - Log';
63+
$wb['monitor_logs_clamav_txt'] = 'Clamav - Log';
64+
$wb['monitor_logs_ispc_txt'] = 'ISPConfig - Log';
5565
$wb['monitor_nomdadm_txt'] = 'mdadm is not installed or your Server has no supported RAID';
5666
$wb['monitor_norkhunter_txt'] = 'RKHunter is not installed, so there is no log data';
67+
$wb['monitor_serverstate_server_txt'] = 'Server';
68+
$wb['monitor_serverstate_state_txt'] = 'State';
69+
$wb['monitor_serverstate_unknown_txt'] = 'unknown';
70+
$wb['monitor_serverstate_info_txt'] = 'info';
71+
$wb['monitor_serverstate_warning_txt'] = 'warning';
72+
$wb['monitor_serverstate_critical_txt'] = 'critical';
73+
$wb['monitor_serverstate_error_txt'] = 'error';
74+
$wb['monitor_serverstate_moreinfo_txt'] = 'More information...';
5775
$wb['monitor_services_online_txt'] = 'Online';
5876
$wb['monitor_services_offline_txt'] = 'Offline';
5977
$wb['monitor_services_web_txt'] = 'Web-Server:';
@@ -65,6 +83,7 @@ $wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
6583
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
6684
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
6785
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
86+
$wb['monitor_settings_refreshsq_txt'] = 'Refresh sequence:';
6887
$wb['monitor_settings_server_txt'] = 'Server: ';
6988
$wb['monitor_title_updatestate_txt'] = 'Update State';
7089
$wb['monitor_title_mailq_txt'] = 'Mailqueue';

interface/web/monitor/lib/lang/fi.lng

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,33 @@ $wb['Show ISPConfig-Log'] = 'Näytä ISPConfig-Loki';
4545
$wb['Show ISPC Cron-Log'] = 'Näytä ISPC Cron-Loki';
4646
$wb['Show RKHunter-Log'] = 'Näytä RKHunter-Loki';
4747
$wb['Show Jobqueue'] = 'Näytä työjono';
48+
$wb['monitor_general_serverstate_txt'] = 'Palvelimen tila';
49+
$wb['monitor_general_systemstate_txt'] = 'Järjestelmän tila';
4850
$wb['monitor_diskusage_filesystem_txt'] = 'Levyosio';
4951
$wb['monitor_diskusage_type_txt'] = 'Tyyppi';
5052
$wb['monitor_diskusage_size_txt'] = 'Koko';
5153
$wb['monitor_diskusage_used_txt'] = 'Käytetty';
5254
$wb['monitor_diskusage_available_txt'] = 'Vapaana';
5355
$wb['monitor_diskusage_usage_txt'] = 'Käyttöaste';
5456
$wb['monitor_diskusage_mounted_txt'] = 'Liitospiste';
55-
$wb['monitor_nomdadm_txt'] = 'mdadm ei ole asennettuna tai palelimessasi ei ole tuettuja RAID-laitteita.';
57+
$wb['monitor_logs_mail_txt'] = 'Postipalvelimen pääloki';
58+
$wb['monitor_logs_mailwarn_txt'] = 'Postipalvelimen varoitusloki';
59+
$wb['monitor_logs_mailerr_txt'] = 'Postipalvelimen virheloki';
60+
$wb['monitor_logs_messages_txt'] = 'Järjestelmän viestiloki';
61+
$wb['monitor_logs_ispccron_txt'] = 'ISPConfig-ajastusloki';
62+
$wb['monitor_logs_freshclam_txt'] = 'Freshclam-päivitysloki';
63+
$wb['monitor_logs_clamav_txt'] = 'Clamav-päivitysloki';
64+
$wb['monitor_logs_ispc_txt'] = 'ISPConfig-pääloki';
65+
$wb['monitor_nomdadm_txt'] = 'mdadm ei ole asennettuna tai palvelimessasi ei ole tuettuja RAID-laitteita.';
5666
$wb['monitor_norkhunter_txt'] = 'RKHunter ei ole asennettuna, joten siitä ei ole tulostietoja.';
67+
$wb['monitor_serverstate_server_txt'] = 'Palvelin';
68+
$wb['monitor_serverstate_state_txt'] = 'Tila';
69+
$wb['monitor_serverstate_unknown_txt'] = 'tuntematonta';
70+
$wb['monitor_serverstate_info_txt'] = 'viestiä';
71+
$wb['monitor_serverstate_warning_txt'] = 'varoitusta';
72+
$wb['monitor_serverstate_critical_txt'] = 'kriittistä';
73+
$wb['monitor_serverstate_error_txt'] = 'virhettä';
74+
$wb['monitor_serverstate_moreinfo_txt'] = 'Lisätietoja...';
5775
$wb['monitor_services_online_txt'] = 'Käynnissä';
5876
$wb['monitor_services_offline_txt'] = 'Sammuksissa';
5977
$wb['monitor_services_web_txt'] = 'WWW-palvelin:';
@@ -65,6 +83,7 @@ $wb['monitor_services_mydns_txt'] = 'myDNS-palvelin:';
6583
$wb['monitor_services_mysql_txt'] = 'mySQL-palvelin:';
6684
$wb['monitor_settings_datetimeformat_txt'] = 'd.m.Y H:i';
6785
$wb['monitor_settings_datafromdate_txt'] = 'Tietojen päiväys: ';
86+
$wb['monitor_settings_refreshsq_txt'] = 'Päivitysväli:';
6887
$wb['monitor_settings_server_txt'] = 'Palvelin: ';
6988
$wb['monitor_title_updatestate_txt'] = 'Päivitysten tila';
7089
$wb['monitor_title_mailq_txt'] = 'Sähköpostijono';

interface/web/monitor/show_log.php

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,45 +44,59 @@
4444
$refresh = (isset($_GET["refresh"]))?intval($_GET["refresh"]):0;
4545
$logParam = $_GET["log"];
4646

47+
/* Get some translations */
48+
$monTransDate = $app->lng("monitor_settings_datafromdate_txt");
49+
$monTransSrv = $app->lng("monitor_settings_server_txt");
50+
$monTransRefreshsq = $app->lng("monitor_settings_refreshsq_txt");
51+
4752
/*
4853
Setting the db-type and the caption
4954
*/
5055
switch($logParam) {
5156
case 'log_mail':
5257
$logId = 'log_mail';
53-
$title = 'Mail - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
58+
$title = $app->lng("monitor_logs_mail_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
59+
$description = '';
5460
break;
5561
case 'log_mail_warn':
5662
$logId = 'log_mail_warn';
57-
$title = 'Mail-Warn - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
63+
$title = $app->lng("monitor_logs_mailwarn_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
64+
$description = '';
5865
break;
5966
case 'log_mail_err':
6067
$logId = 'log_mail_err';
61-
$title = 'Mail-Error - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
68+
$title = $app->lng("monitor_logs_mailerr_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
69+
$description = '';
6270
break;
6371
case 'log_messages':
6472
$logId = 'log_messages';
65-
$title = 'System (Server: ' . $_SESSION['monitor']['server_name'] . ')';
73+
$title = $app->lng("monitor_logs_messages_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
74+
$description = '';
6675
break;
6776
case 'log_ispc_cron':
6877
$logId = 'log_ispc_cron';
69-
$title = 'System (Server: ' . $_SESSION['monitor']['server_name'] . ')';
78+
$title = $app->lng("monitor_logs_ispccron_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
79+
$description = '';
7080
break;
7181
case 'log_freshclam':
7282
$logId = 'log_freshclam';
73-
$title = 'Freshclam - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
83+
$title = $app->lng("monitor_logs_freshclam_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
84+
$description = '';
7485
break;
7586
case 'log_clamav':
7687
$logId = 'log_clamav';
77-
$title = 'Clamav - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
88+
$title = $app->lng("monitor_logs_clamav_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
89+
$description = '';
7890
break;
7991
case 'log_ispconfig':
8092
$logId = 'log_ispconfig';
81-
$title = 'ISP Config - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
93+
$title = $app->lng("monitor_logs_ispc_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
94+
$description = '';
8295
break;
8396
default:
8497
$logId = '???';
8598
$title = '???';
99+
$description = '';
86100
break;
87101
}
88102

@@ -119,7 +133,10 @@
119133

120134
$app->tpl->setVar("title", $title);
121135
$app->tpl->setVar("log_id",$logId);
136+
$app->tpl->setVar("description", $description);
122137
$app->tpl->setVar("time", getDataTime($logId));
138+
$app->tpl->setVar("monTransDate", $monTransDate);
139+
$app->tpl->setVar("monTransRefreshsq", $monTransRefreshsq);
123140

124141
$app->tpl_defaults();
125142
$app->tpl->pparse();

interface/web/monitor/show_sys_state.php

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,30 @@
4848
$app->tpl->newTemplate("form.tpl.htm");
4949
$app->tpl->setInclude('content_tpl','templates/show_sys_state.htm');
5050

51+
/* Get some translations */
52+
$monTransRefreshsq = $app->lng("monitor_settings_refreshsq_txt");
53+
5154
/*
5255
* setting the content
5356
*/
5457
if ($_GET['state'] == 'server')
5558
{
5659
$output = _getServerState($_SESSION['monitor']['server_id'], $_SESSION['monitor']['server_name'], true);
57-
$title = "Server State";
60+
$title = $app->lng("monitor_general_serverstate_txt");
5861
$stateType = 'server';
5962
}
6063
else
6164
{
6265
$output = _getSysState();
63-
$title = "System State";
66+
$title = $app->lng("monitor_general_systemstate_txt");
6467
$stateType = 'system';
6568
}
6669

6770
$app->tpl->setVar("state_data",$output);
6871
$app->tpl->setVar("state_type",$stateType);
6972
$app->tpl->setVar("title",$title);
7073
$app->tpl->setVar("description",$description);
74+
$app->tpl->setVar("monTransRefreshsq", $monTransRefreshsq);
7175

7276
/*
7377
Creating the array with the refresh intervals
@@ -142,15 +146,16 @@ function _getServerState($serverId, $serverName, $showAll)
142146
$res .= '<div class="systemmonitor-state state-'.$serverState.'">';
143147
$res .= '<div class="systemmonitor-device device-server">';
144148
$res .= '<div class="systemmonitor-content icons32 ico-'.$serverState.'">';
145-
$res .= 'Server: ' . $serverName . '<br />';
146-
$res .= 'State: ' . $serverState . '<br />';
149+
$res .= $app->lng("monitor_serverstate_server_txt") . ': ' . $serverName . '<br />';
150+
$res .= $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . '<br />';
147151
// $res .= sizeof($messages['ok']) . ' ok | ';
148-
$res .= sizeof($messages['unknown']) . ' unknown | ';
149-
$res .= sizeof($messages['info']) . ' info | ';
150-
$res .= sizeof($messages['warning']) . ' warning | ';
151-
$res .= sizeof($messages['critical']) . ' critical | ';
152-
$res .= sizeof($messages['error']) . ' error <br />';
152+
$res .= sizeof($messages['unknown']) . ' ' . $app->lng("monitor_serverstate_unknown_txt") . ' | ';
153+
$res .= sizeof($messages['info']) . ' ' . $app->lng("monitor_serverstate_info_txt") . ' | ';
154+
$res .= sizeof($messages['warning']) . ' ' . $app->lng("monitor_serverstate_warning_txt") . ' | ';
155+
$res .= sizeof($messages['critical']) . ' ' . $app->lng("monitor_serverstate_critical_txt") . ' | ';
156+
$res .= sizeof($messages['error']) . ' ' . $app->lng("monitor_serverstate_error_txt") . '<br />';
153157
$res .= '<br />';
158+
154159
if ($showAll){
155160
/*
156161
* if we have to show all, then we do it...
@@ -179,7 +184,7 @@ function _getServerState($serverId, $serverName, $showAll)
179184
/*
180185
* if not, we only show a link to the server...
181186
*/
182-
$res .= "<a href='#' onclick='loadContent(\"monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "\");'> More information...</a>";
187+
$res .= "<a href='#' onclick='loadContent(\"monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "\");'>" . $app->lng("monitor_serverstate_moreinfo_txt") . "</a>";
183188
}
184189
$res .= '</div>';
185190
$res .= '</div>';

interface/web/monitor/templates/show_log.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ <h2><tmpl_var name="title"></h2>
33
<div class="panel panel_logview">
44

55
<div class="pnl_toolsarea">
6-
<fieldset><legend>Tools</legend>
6+
<fieldset><legend><tmpl_var name="monTransRefreshsq"></legend>
77
<div class="buttons">
88
<select name="refreshinterval" id="refreshinterval" onChange="loadContentRefresh('monitor/show_log.php?log={tmpl_var name="log_id"}')">{tmpl_var name="refresh"}</select>
99
</div>
1010
</fieldset>
1111
</div>
1212

1313
<div class="pnl_formarea">
14-
<fieldset><legend>Data from: <tmpl_var name="time"></legend>
14+
<fieldset><legend><tmpl_var name="monTransDate"><tmpl_var name="time"></legend>
1515
<div class="codeview"><tmpl_var name="log_data"></div>
1616
</fieldset>
1717
</div>

interface/web/monitor/templates/show_sys_state.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ <h2><tmpl_var name="title"></h2>
33
<div class="panel">
44

55
<div class="pnl_toolsarea">
6-
<fieldset><legend>Tools</legend>
6+
<fieldset><legend><tmpl_var name="monTransRefreshsq"></legend>
77
<div class="buttons">
88
<select name="refreshinterval" id="refreshinterval" onChange="loadContentRefresh('monitor/show_sys_state.php?state={tmpl_var name="state_type"}')">{tmpl_var name="refresh"}</select>
99
</div>

0 commit comments

Comments
 (0)