aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-09-09 21:28:01 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-09-09 21:31:34 +0200
commitd9f36ae7e1e6bf6aeb69f2491234ce0903a6543d (patch)
tree53c1738b41259c479c476e6afc10911e96cedb70
parent12398d65fd52b1cec93d5aaccf933a9ba3eb93a0 (diff)
downloadforums-d9f36ae7e1e6bf6aeb69f2491234ce0903a6543d.tar
forums-d9f36ae7e1e6bf6aeb69f2491234ce0903a6543d.tar.gz
forums-d9f36ae7e1e6bf6aeb69f2491234ce0903a6543d.tar.bz2
forums-d9f36ae7e1e6bf6aeb69f2491234ce0903a6543d.tar.xz
forums-d9f36ae7e1e6bf6aeb69f2491234ce0903a6543d.zip
[ticket/12976] Correctly use plurals for attachment count in UCP navigation
PHPBB3-12976
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php1
-rw-r--r--phpBB/language/en/common.php4
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_attachments.html2
4 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index aab45339c5..42724209aa 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -182,6 +182,7 @@ class ucp_attachments
$template->assign_vars(array(
'TOTAL_ATTACHMENTS' => $num_attachments,
+ 'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', $num_attachments),
'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index c27086fd38..83e1f4eaa1 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -518,6 +518,10 @@ $lang = array_merge($lang, array(
'NO_USER_SPECIFIED' => 'No username was specified.',
// Nullar/Singular/Plural language entry. The key numbers define the number range in which a certain grammatical expression is valid.
+ 'NUM_ATTACHMENTS' => array(
+ 1 => '%d attachment',
+ 2 => '%d attachments',
+ ),
'NUM_POSTS_IN_QUEUE' => array(
0 => 'No posts in queue', // 0
1 => '1 post in queue', // 1
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
index ddbf892dee..1d4963273c 100644
--- a/phpBB/styles/prosilver/template/ucp_attachments.html
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -12,7 +12,7 @@
<!-- IF .attachrow -->
<div class="action-bar top">
<div class="pagination">
- {TOTAL_ATTACHMENTS} {L_TITLE}
+ {NUM_ATTACHMENTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
diff --git a/phpBB/styles/subsilver2/template/ucp_attachments.html b/phpBB/styles/subsilver2/template/ucp_attachments.html
index 0f6101aac7..c513f933c0 100644
--- a/phpBB/styles/subsilver2/template/ucp_attachments.html
+++ b/phpBB/styles/subsilver2/template/ucp_attachments.html
@@ -17,7 +17,7 @@
<table width="100%" cellspacing="1">
<tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
- <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_ATTACHMENTS} ]&nbsp;</td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {NUM_ATTACHMENTS} ]&nbsp;</td>
<td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
</tr>
</table>