Needs review
Project:
Advanced Forum
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Jan 2011 at 22:57 UTC
Updated:
28 Mar 2012 at 18:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
michelleWhoops, that definitely needs to get fixed. Thanks for reporting!
Michelle
Comment #2
__Sander__ commentedAnd here
$variables['total_posts_count'] = format_plural($posts, '1 post', '@count posts');
in includes/theme.inc
Comment #3
michelle#2 is intentional. You don't send translated strings to format_plural.
Michelle
Comment #4
__Sander__ commentedGot your point.
But looks like it makes impossible to use translations for this...
What if you have it in the form
9 total / 3 new
?
But of course I can edit the code manually
Comment #5
michelleThe translation system is meant for translating to other languages. While it can be used for changing to a completely different English word, that's not the design. In this case, yeah, you would have to edit the template because you're not going to want to translate post/posts to total. That's not an AF issue, though, just a limitation of the translation system that translates words across the board.
Michelle
Comment #6
michelleOk, t() added around forum tools menu items in D6. Bumping this up to D7 for porting.
Michelle
Comment #7
__Sander__ commentedSorry, but the patch file is missing...
Comment #8
troky commentedTry this
Already ported to D7.
Comment #9
__Sander__ commentedConfirming that it's been fixed in the latest dev.
And I've learned finally how to handle the translation of plural forms - one searches for @count[2] posts
Thanks!
Comment #11
Ingumsky commentedSame for the line 913:
$number_new = t("(!new new)", array('!new' => $number_new_comments));shouldn't it be like:
$number_new = format_plural($number_new_comments, '(1 new)', '(@count new)');to be translated properly?
Comment #12
michelleWell, either way will translate so it's not missing but, yeah, format_plural makes more sense. I may not have known about the function when that line was written. :)
I'm basing my response purely on #11. I haven't looked at the code to see if there's a reason why it was done that way but I can't think of any off the top of my head.
Comment #13
Ingumsky commentedYeah. It is definitely not 'missing' because I can translate it :) I haven't noticed this subject updated by me wasn't anywhere near the real issue :)
Comment #14
Ingumsky commentedText for the links to the new comments in the Posts column (Topics list) cannot be translated at the moment and it should be changed too. Current version of Views module (6.x-2.16 in my case) does support translations including plural forms for translatable strings. To make it working you just need to replace this:
advanced_forum_active_topics.view: 312
with this:
And it will work as it should.
Comment #15
Ingumsky commentedAnd here's the patch... You should place it to /includes/views and then apply.
Comment #16
mcdruid commentedAssigning issues you've worked on to you Ingumsky, so I can see which ones you haven't.