[aur-dev] [PATCH 1/2] Drop comment count from translatable message

Lukas Fleischer archlinux at cryptocrack.de
Wed Jul 23 05:18:13 EDT 2014


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 at gmail.com>
Suggested-by: Sebastian Wilzbach <sebi at wilzbach.me>
Suggested-by: kachelaqa <kachelaqa at gmail.com>
Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
 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


More information about the aur-dev mailing list