The title "View all %s comments" becomes "View all %s comment" when
adding plural support (which is needed for other languages that have
more than one plural form). Simply remove the comment count from the
message and add it in parentheses.

Suggested-by: Safa Alfulaij <[email protected]>
Suggested-by: Sebastian Wilzbach <[email protected]>
Suggested-by: kachelaqa <[email protected]>
Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/template/pkg_comments.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index 20521a0..d687cde 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -4,7 +4,7 @@ $count = pkgbase_comments_count($base_id);
 ?>
 <div id="news">
        <h3>
-               <a href="<?= htmlentities(get_pkgbase_uri($pkgbase_name), 
ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title="<?= __('View all %s 
comments' , $count) ?>"><?= __('Latest Comments') ?></a>
+               <a href="<?= htmlentities(get_pkgbase_uri($pkgbase_name), 
ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title="<?= __('View all comments' 
, $count) ?> (<?= $count ?>)"><?= __('Latest Comments') ?></a>
                <span class="arrow"></span>
        </h3>
 
@@ -47,7 +47,7 @@ $count = pkgbase_comments_count($base_id);
 <?php if ($count > 10 && !isset($_GET['comments'])): ?>
 <div id="news">
        <h3>
-               <a href="<?= htmlentities(get_pkgbase_uri($pkgbase_name), 
ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title="<?= __('View all %s 
comments', $count) ?>"><?= __('All comments', $count) ?></a>
+               <a href="<?= htmlentities(get_pkgbase_uri($pkgbase_name), 
ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title="<?= __('View all 
comments') ?> (<?= $count ?>)"><?= __('All comments', $count) ?></a>
        </h3>
 </div>
 <?php endif; ?>
-- 
2.0.2

Reply via email to