Drop comment count from translatable message

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 <safa1996alfulaij@gmail.com>
Suggested-by: Sebastian Wilzbach <sebi@wilzbach.me>
Suggested-by: kachelaqa <kachelaqa@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-07-23 10:58:00 +02:00
parent 9048030da7
commit 088aab44ea

View file

@ -4,7 +4,7 @@ $count = pkgbase_comments_count($base_id);
?> ?>
<div id="news"> <div id="news">
<h3> <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> <span class="arrow"></span>
</h3> </h3>
@ -47,7 +47,7 @@ $count = pkgbase_comments_count($base_id);
<?php if ($count > 10 && !isset($_GET['comments'])): ?> <?php if ($count > 10 && !isset($_GET['comments'])): ?>
<div id="news"> <div id="news">
<h3> <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> </h3>
</div> </div>
<?php endif; ?> <?php endif; ?>