This line:
$output = '<p>'. t("!someone currently !does_or_do not have any pending @buddy requests from other users.", array('!someone' => ($viewing_own_account ? t('You') : $account->name), '!does_or_do' => $viewing_own_account ? t('do') : t('does')) + buddylist_translation()) .'</p>';
seems wrong, especially that !does_or_do seems very specific to English grammar. Attached is a possible improvement.

Comments

john morahan’s picture

Status: Active » Needs review
dldege’s picture

That originial code is also some of the ugliest php code I've ever seen crammed into one line. I'll take a look at the patch today.

john morahan’s picture

StatusFileSize
new1.48 KB

Hmm... good point. Maybe it should be split up further?

dldege’s picture

I think its OK. I would like your ideas though on how to simplify the string handling in the module.

john morahan’s picture

Found some more strings with the same problem.

As far as the big-picture string handling thing goes... I don't know. The way it's done now (with @buddylist etc.) is theoretically wrong, but the "correct" alternative, leaving everything to the locale module, would likely have a performance impact on English-speaking sites using the module.

john morahan’s picture

I should mention, I also changed them to use theme('username') as you were doing in the other issue.

dldege’s picture

Cool, I'll apply this on Monday and fix the other items you mentioned in http://drupal.org/node/181113 and hopefully we can get both of these committed then.

Thanks for your help - much appreciated.

dldege’s picture

Status: Needs review » Postponed (maintainer needs more info)

I'm looking at this patch and http://drupal.org/node/178605 and there is some overlap. It might be easier to just output "None" like the other patch. http://drupal.org/node/178605 needs to be tweaked but has some good stuff? What do you think?