Closed (fixed)
Project:
Buddylist
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2007 at 16:30 UTC
Updated:
22 Oct 2007 at 20:02 UTC
Jump to comment: Most recent file
Since the username display can be themed buddylist should use that instead of $account->name in messages, confirmations, etc. This is done in some places but not others.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | buddylist-theme_username.patch | 8.43 KB | john morahan |
| #5 | buddylist_theme_username_181113_1.patch | 8.5 KB | dldege |
| #3 | buddylist_theme_username_181113_0.patch | 5.73 KB | dldege |
| #1 | buddylist_theme_username_181113.patch | 5.62 KB | dldege |
Comments
Comment #1
dldege commentedPlease review - this RTBC otherwise.
Comment #2
john morahan commentedIn buddylist_deletebuddy_submit():
+ drupal_set_message(t('!username has been removed from your @buddylist', array('!username' => theme('username', $removeuser)) + buddylist_translation()));$removeuser does not exist in this context.
Comment #3
dldege commentedoops, yeah, I moved that up from another location in the code - nice catch.
Comment #4
john morahan commentedLooks good, it'll be great to be able to theme these. Two more things I noticed while testing:
1. In theme_add_to_buddylist_link():
+ return l(t('Add'), 'buddy/add/' . $buddyuser->uid, array('title' => 'Accept'), drupal_get_destination(), NULL, FALSE, TRUE);'Accept' doesn't really make sense as a title here. This link appears on a user profile page, where you can either directly add the user as a buddy, or make a request to add them. Accepting a request happens elsewhere.
2. You missed one in buddylist_addbuddy_submit():
drupal_set_message(t('%name will be be notified the next time s/he logs in.', array('%name' => $form_values['name'])));(also, notice the repeated word "be" in that sentence).
There are two more, in buddylist_cancel_add() and buddylist_cancel_remove(), but those functions seem to be dead code AFAICT.
Comment #5
dldege commented3rd times a charm, hopefully.
I removed 'user' form the action links so its consistent with the others. I also fixed the titles and wrapped them in t()
removed the dead code - I looked a ways back in the history and they haven't been used for a long time.
The next thing we'll need to look at is the mail replacements - we should probably use theme('username'...) there as well but we can do that in a separate issue so we can get this one checked in and the other one regarding translations.
Comment #6
dldege commentedComment #7
john morahan commentedThis one looks good. I fixed that "will be be notified" and a second instance of the same thing - otherwise this patch is identical to your last one.
I'm not sure about the mails though - theme('username') normally generates HTML output, which you might not want in a mail.
Comment #8
dldege commenteddoh, forgot about the 'be be' - thanks.
fixed in version 1.68.2.34.
Comment #9
(not verified) commented