|
48 | 48 | $app->tpl->newTemplate("form.tpl.htm"); |
49 | 49 | $app->tpl->setInclude('content_tpl','templates/show_sys_state.htm'); |
50 | 50 |
|
| 51 | +/* Get some translations */ |
| 52 | +$monTransRefreshsq = $app->lng("monitor_settings_refreshsq_txt"); |
| 53 | + |
51 | 54 | /* |
52 | 55 | * setting the content |
53 | 56 | */ |
54 | 57 | if ($_GET['state'] == 'server') |
55 | 58 | { |
56 | 59 | $output = _getServerState($_SESSION['monitor']['server_id'], $_SESSION['monitor']['server_name'], true); |
57 | | - $title = "Server State"; |
| 60 | + $title = $app->lng("monitor_general_serverstate_txt"); |
58 | 61 | $stateType = 'server'; |
59 | 62 | } |
60 | 63 | else |
61 | 64 | { |
62 | 65 | $output = _getSysState(); |
63 | | - $title = "System State"; |
| 66 | + $title = $app->lng("monitor_general_systemstate_txt"); |
64 | 67 | $stateType = 'system'; |
65 | 68 | } |
66 | 69 |
|
67 | 70 | $app->tpl->setVar("state_data",$output); |
68 | 71 | $app->tpl->setVar("state_type",$stateType); |
69 | 72 | $app->tpl->setVar("title",$title); |
70 | 73 | $app->tpl->setVar("description",$description); |
| 74 | +$app->tpl->setVar("monTransRefreshsq", $monTransRefreshsq); |
71 | 75 |
|
72 | 76 | /* |
73 | 77 | Creating the array with the refresh intervals |
@@ -142,15 +146,16 @@ function _getServerState($serverId, $serverName, $showAll) |
142 | 146 | $res .= '<div class="systemmonitor-state state-'.$serverState.'">'; |
143 | 147 | $res .= '<div class="systemmonitor-device device-server">'; |
144 | 148 | $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 />'; |
147 | 151 | // $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 />'; |
153 | 157 | $res .= '<br />'; |
| 158 | + |
154 | 159 | if ($showAll){ |
155 | 160 | /* |
156 | 161 | * if we have to show all, then we do it... |
@@ -179,7 +184,7 @@ function _getServerState($serverId, $serverName, $showAll) |
179 | 184 | /* |
180 | 185 | * if not, we only show a link to the server... |
181 | 186 | */ |
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>"; |
183 | 188 | } |
184 | 189 | $res .= '</div>'; |
185 | 190 | $res .= '</div>'; |
|
0 commit comments