Allow to translate master/slave strings too.

This commit is contained in:
Michal Čihař
2010-05-04 10:37:01 +02:00
parent c2260ccb41
commit 6940bed8fa

View File

@@ -283,7 +283,7 @@ if ($server_master_status) {
if ($server_slave_status) { if ($server_slave_status) {
$links['repl'][__('Show slave status')] = '#replication_slave'; $links['repl'][__('Show slave status')] = '#replication_slave';
} }
$links['repl']['doc'] = 'replication'; $links['repl']['doc'] = 'replication';
$links['qcache'][__('Flush query cache')] $links['qcache'][__('Flush query cache')]
@@ -354,19 +354,17 @@ echo sprintf(__('This MySQL server has been running for %s. It started up on %s.
</p> </p>
<?php <?php
if ($server_master_status || $server_slave_status) if ($server_master_status || $server_slave_status) {
{ echo '<p>';
$replicationOut = ""; if ($server_master_status && $server_slave_status) {
foreach ($replication_types as $type) echo __('This MySQL server works as <b>master</b> and <b>slave</b> in <b>replication</b> process.');
{ } elseif ($server_master_status) {
if (${"server_{$type}_status"}) echo __('This MySQL server works as <b>master</b> in <b>replication</b> process.');
{ } elseif ($server_slave_status) {
if ($replicationOut != "") echo __('This MySQL server works as <b>slave</b> in <b>replication</b> process.');
$replicationOut .= __('and') . ' ';
$replicationOut .= '<b>' . $type . '</b> ';
}
} }
echo sprintf('<p>' . __('This MySQL server works as %s in <b>replication</b> process. For further information about replication status on the server, please visit the <a href=#replication>replication section</a>.') . '</p>', $replicationOut); echo __('For further information about replication status on the server, please visit the <a href=#replication>replication section</a>.');
echo '</p>';
} }
?> ?>
@@ -712,7 +710,7 @@ if (! empty($section['title'])) {
} }
unset($section_name, $section, $sections, $server_status, $odd_row, $alerts); unset($section_name, $section, $sections, $server_status, $odd_row, $alerts);
?> ?>
</div> </div>
<?php <?php
/* if the server works as master or slave in replication process, display useful information */ /* if the server works as master or slave in replication process, display useful information */
if ($server_master_status || $server_slave_status) if ($server_master_status || $server_slave_status)
@@ -721,7 +719,7 @@ if ($server_master_status || $server_slave_status)
<hr class="clearfloat" /> <hr class="clearfloat" />
<h3><a name="replication"></a><?php echo __('Replication status'); ?></h3> <h3><a name="replication"></a><?php echo __('Replication status'); ?></h3>
<?php <?php
foreach ($replication_types as $type) foreach ($replication_types as $type)
{ {