Skip to content
This repository has been archived by the owner on Apr 12, 2020. It is now read-only.

Commit

Permalink
Fix pluralisation
Browse files Browse the repository at this point in the history
(I feel like I'm missing something in HTML::Zoom, this should be
possible in an easier way...)
  • Loading branch information
dgl committed Jul 25, 2012
1 parent 138c6c1 commit 044830b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/WWW/CPANGrep.pm
Expand Up @@ -160,7 +160,7 @@ sub render_response {
->set_attribute(href => "/?q=$q+dist=$result->{distname}+file=$file->{file}");

if($file->{truncated} == 1) {
$_ = $_->select('.plural')->replace("");
$_ = $_->select('.file-plural')->replace("");
}
} else {
$_ = $_->select('.more-file')->replace("");
Expand All @@ -181,7 +181,7 @@ sub render_response {
->set_attribute(href => "/?q=$q+dist=$result->{distname}");

if($result->{truncated} == 1) {
$_ = $_->select('.plural')->replace("");
$_ = $_->select('.dist-plural')->replace("");
}
} else {
$_ = $_->select('.more-dist')->replace("");
Expand Down
4 changes: 2 additions & 2 deletions share/html/results.html
Expand Up @@ -49,11 +49,11 @@
52471 | asafoetida | | common name |
52473 | Astrantia epipactis | | synonym |</pre>
</span>
<a class="more-file" href=""><span class="file-number">1</span> more match<span class="plural">es</span> »<br /></a>
<a class="more-file" href=""><span class="file-number">1</span> more match<span class="file-plural">es</span> »<br /></a>
</span>
</span>
<a href="bleh" class="dist-link">MOTIF/Bio-LITE-Taxonomy-NCBI-0.04.tar.gz</a>
<span class="more-dist">&ndash; <a class="more-dist" href=""><span class="dist-number">1</span> more file<span class="plural">s</span> »</a></span>
<span class="more-dist">&ndash; <a class="more-dist" href=""><span class="dist-number">1</span> more file<span class="dist-plural">s</span> »</a></span>
</div>

</div>
Expand Down

0 comments on commit 044830b

Please sign in to comment.