From ac2087a3e88f6451f7a0a195d86fb57ec02d8cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 24 May 2010 11:18:25 +0200 Subject: [PATCH] Gettext usage. --- libraries/replication_gui.lib.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libraries/replication_gui.lib.php b/libraries/replication_gui.lib.php index 4e85e3270..db41b206f 100644 --- a/libraries/replication_gui.lib.php +++ b/libraries/replication_gui.lib.php @@ -38,7 +38,7 @@ function PMA_replication_db_multibox() /** * prints out code for changing master * - * @param String $submitname - submit button name + * @param String $submitname - submit button name */ function PMA_replication_gui_changemaster($submitname) { @@ -46,7 +46,7 @@ function PMA_replication_gui_changemaster($submitname) { list($username_length, $hostname_length) = PMA_replication_get_username_hostname_length(); echo '
'; - echo PMA_generate_common_hidden_inputs('', ''); + echo PMA_generate_common_hidden_inputs('', ''); echo '
'; echo ' ' . __('Slave configuration') . ' - ' . __('Change or reconfigure master server') . ''; echo __('Make sure, you have unique server-id in your configuration file (my.cnf). If not, please add the following line into [mysqld] section:') . '
'; @@ -99,7 +99,11 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru echo '
'; if ($title) { - echo '

' . ${"strReplicationStatus_{$type}"} . '

'; + if ($type == 'master') { + echo '

' . __('Master status') . '

'; + } else { + echo '

' . __('Slave status') . '

'; + } } else { echo '
'; } @@ -123,19 +127,19 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru // TODO change to regexp or something, to allow for negative match - if (isset(${"{$type}_variables_alerts"}[$variable]) + if (isset(${"{$type}_variables_alerts"}[$variable]) && ${"{$type}_variables_alerts"}[$variable] == ${"server_{$type}_replication"}[0][$variable] ) { echo ''; - } elseif (isset(${"{$type}_variables_oks"}[$variable]) + } elseif (isset(${"{$type}_variables_oks"}[$variable]) && ${"{$type}_variables_oks"}[$variable] == ${"server_{$type}_replication"}[0][$variable] ) { echo ''; } else { echo ''; } - echo ${"server_{$type}_replication"}[0][$variable]; + echo ${"server_{$type}_replication"}[0][$variable]; echo ''; echo ' '; @@ -159,7 +163,7 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru function PMA_replication_print_slaves_table($hidden = false) { // Fetch data - $data = PMA_DBI_fetch_result('SHOW SLAVE HOSTS', null, null); + $data = PMA_DBI_fetch_result('SHOW SLAVE HOSTS', null, null); echo '
'; echo '
';