diff options
author | plegall <plg@piwigo.org> | 2012-05-14 22:28:45 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2012-05-14 22:28:45 +0000 |
commit | 03a2eece52f6b3199aae89b927da337a45f17380 (patch) | |
tree | 944a9adcb87e0d765f487dcd7927e704d0032a6c /themes/default | |
parent | 4cac242866461f1307c3f0de01efa04a08d867c8 (diff) |
bug fixed: move $lang['%d rate'] from admin.lang.php to common.inc.php to display "1 rate" on picture.php when relevant
adapt picture.tpl to display "1 rate" if only 1 rate, instead of "1 rates".
git-svn-id: http://piwigo.org/svn/trunk@14978 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | themes/default/template/picture.tpl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index cddabf26e..8795d0bc1 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -217,7 +217,12 @@ y.callService( <dt>{'Rating score'|@translate}</dt> <dd> {if $rate_summary.count} - <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span> + {if $rate_summary.count == 1} + {assign var='rate_text' value='%d rate'|@translate} + {else} + {assign var='rate_text' value='%d rates'|@translate} + {/if} + <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$pwg->sprintf($rate_text, $rate_summary.count)})</span> {else} <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> {/if} @@ -251,7 +256,14 @@ y.callService( e = document.getElementById("ratingScore"); if (e) e.innerHTML = rating.score; e = document.getElementById("ratingCount"); - if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); + if (e) {ldelim} + if (rating.count == 1) {ldelim} + e.innerHTML = "({'%d rate'|@translate|@escape:'javascript'})".replace( "%d", rating.count); + {rdelim} + else {ldelim} + e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); + {rdelim} + {rdelim} {rdelim}{rdelim} ); {/footer_script} {/strip} |