Closed (works as designed)
Project:
Drupal core
Version:
4.6.2
Component:
comment.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2005 at 11:02 UTC
Updated:
29 Aug 2005 at 05:38 UTC
Comment.module don't use localisation in comment_link(). My proposal is to fix this.
Code on line 195:
if ($all) {
$links[] = l(format_plural($all, '1 comment', '%count comments'), "node/$node->nid", array('title' => t('Jump to the first comment of this posting.')), NULL, 'comment');
if ($new) {
$links[] = l(format_plural($new, '1 new comment', '%count new comments'), "node/$node->nid", array('title' => t('Jump to the first new comment of this posting.')), NULL, 'new');
}
}
should be replaced with:
if ($all) {
$links[] = l(format_plural($all, t('1 comment'), t('%count comments')), "node/$node->nid", array('title' => t('Jump to the first comment of this posting.')), NULL, 'comment');
if ($new) {
$links[] = l(format_plural($new, t('1 new comment'), t('%count new comments')), "node/$node->nid", array('title' => t('Jump to the first new comment of this posting.')), NULL, 'new');
}
}
Comments
Comment #1
Uwe Hermann commentedThis is not a bug AFAICS.
format_plural()applies t() to its output itself, you _must not_ pass already localized strings to it...Comment #2
dandaka commentedMaybe it should apply. But it don't in my case.
When I replace that code with my example, everything started work as it should.