From 943c99d1f01cf375eec99cb2ca4f4c428d372201 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 4 Jul 2014 08:42:31 -0400 Subject: [PATCH] Improve translatability Signed-off-by: Marc Delisle --- libraries/Console.class.php | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/libraries/Console.class.php b/libraries/Console.class.php index 102441ae7f..d24e3126c5 100644 --- a/libraries/Console.class.php +++ b/libraries/Console.class.php @@ -98,13 +98,36 @@ class PMA_Console . '' . __('Database') . ': %s'; $bookmarks = PMA_Bookmark_getList(); - $output .= '
' - . (count($bookmarks) > 0 ? __('Total ') . count($bookmarks) . __(' bookmarks, ') - . '' . __('private') - . ' and ' . __('shared') - . '' . __(' bookmarks included.') - : __('No bookmarks')) - . '
'; + $output .= '
'; + $count_bookmarks = count($bookmarks); + if ($count_bookmarks > 0) { + $bookmarks_message = sprintf( + _ngettext( + 'Total %d bookmark', + 'Total %d bookmarks', + $count_bookmarks), + $count_bookmarks + ); + $private_message = sprintf( + '%1$s', + __('private') + ); + $shared_message = sprintf( + '%1$s', + __('shared') + ); + $output .= sprintf( + /* l10n: First parameter will be replaced with the translation for Total and the number of bookmarks, second one with the translation for private and the third one, with the translation for shared */ + __('%1$s, %2$s and %3$s bookmarks included'), + $bookmarks_message, + $private_message, + $shared_message + ); + } else { + $output .= __('No bookmarks'); + } + unset($count_bookmarks, $private_message, $shared_message); + $output .= '
'; foreach ($bookmarks as $key => $val) { $output .= '