redid refactor to pluralize output

This commit is contained in:
Robbt 2018-12-01 09:42:02 -05:00
parent 3d3391bea7
commit 641ba717cf
1 changed files with 7 additions and 14 deletions

View File

@ -4,22 +4,15 @@ $isSmartBlock = ($this->obj instanceof Application_Model_Block);
$isPlaylist = ($this->obj instanceof Application_Model_Playlist);
if ($this->poolCount) { ?>
<div class='sp_text_font sp_text_font_bold'>
<span id='sp_pool_count' class='sp_text_font sp_text_font_bold'>
<?php
if ($this->poolCount > 1) {
echo $this->poolCount;
?>
<?php echo _("files meet the criteria") ?>
</span>
<span id='sp_pool_count' class='sp_text_font sp_text_font_bold'>
<?php
if ($this->poolCount > 0) {
echo $this->poolCount;
echo ngettext(" file meets the criteria", " files meets the criteria", $this->poolCount);
?>
</span>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
<?php
} else if ($this->poolCount == 1) {
echo $this->poolCount;
?>
<?php echo _("file meets the criteria") ?>
</span>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
<?php
} else {
?>
0 <?php echo " " . _("files meet the criteria") ?>