Berdir,
Just noticed a typo in a user-facing message. The message appears when you try to send a message to someone who has blocked you. Here's the current message:
"[username] has chosen to not recieve any more messages from you."
Notice that the word "recieve" is misspelled. It should be "receive".
Also, since we're changing it anyway, "to not receive" is a little bit strange grammar. This might be better:
"[username] has chosen to block messages from you."
--Ben
P.S. Another option would be to make this message configurable by the site admin at admin/config/messaging/privatemsg/block. I'm not sure how difficult it would be to add this feature. If we did this, we would also want to make these messages configurable:
"Sorry, private messaging rules forbid sending messages to [username]."
"Disallowed to send message because all recipients are blocked" (this grammar could be improved, too)
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | text_changes5.patch | 16.73 KB | berdir |
| #23 | text_changes4.patch | 16.76 KB | berdir |
| #21 | text_changes3.patch | 16.22 KB | berdir |
| #9 | text_changes2.patch | 14.76 KB | berdir |
| #4 | text_changes.patch | 4.81 KB | berdir |
Comments
Comment #1
berdirThe main issue with configurable strings is translation. Having them configurable through the UI makes it more complex to translate them and let users translate them. If you want to change a string, you can always use http://drupal.org/project/stringoverrides.
Because of that, I'd say lets fix the typos grammar issues first. Please suggest a better wording for the other message and I'll make a patch.
Comment #2
BenK commentedAh, I see what you mean regarding translations. Here's my suggestions for improved versions of the user messages:
* "[username] has chosen to block messages from you."
* "Sorry, you are not permitted to send messages to [username]."
* "This message cannot be sent because all recipients are blocked."
--Ben
Comment #3
berdirAccidently made the patch for 6.x-2.x, I'm going to port this once it's commited, should be almost the same anyway.
I'm sure there are more strings that need work, especially in the validation function. You're welcome to provide better suggestions.
Comment #4
berdirWrong file.
What about making this into an issue to improve all those validation strings? Most of them should be converted from indirect to direct sentences. In german, we have the formal/informal problem and often avoid that with indirect strings but there is no point in doing that in english.
Comment #5
BenK commentedBerdir,
Sure, we might as well improve all of the validation strings at once. I've changed the issue name to reflect this. Do you an easy way to find all of them quickly? Or can you cut and paste them into a comment on this thread? I imagine we have some new ones in D7 since we added some features.
Then I can go through them one by one. As the author of a number of books (in English), I'm probably uniquely suitable for this task! ;-)
Also, I saw that Private Message has some RealName (http://drupal.org/project/realname) support, at least on a few issue threads I have found. Is there anything that needs to be done to the validations strings to allow RealName support in the strings, too? Will %name work in conjunction with RealName? The reason I ask is I might be interested in using RealName with the D7 version of the module at some point.
Finally, in the patch I noticed that in pm_block_user.module, you swapped "!name" with "[username]". Was that intentional? I thought you might have inadvertently cut and pasted the [username] from my comments when that was meant to be replaced by the actual username. But I could be wrong.
I haven't tried the patch yet because I figure we'll add more strings to it...
--Ben
Comment #6
berdirMost are probably part if this function: http://blog.worldempire.ch/de/api/function/_privatemsg_validate_message/1. So I'd suggest to go through the strings there for now.
- Yes, [username] is obviously wrong.
- We have to change them to use theme('username') instead of just $recipient->name, or whatever...
Comment #7
BenK commentedI took a look at the function you indicated and here are some more string changes. I went from top to bottom in the link you provided, so the following changes are listed in order:
A. 'User @user is not allowed to write messages'
>> Isn't this shown to the user himself? If so, should be 'You are not allowed to write messages.'
B. 'Disallowed to send a message without subject'
>> 'You must include a subject line with your message.'
C. 'Disallowed to send reply without a message.'
>> 'You must include a message in your reply.'
D. 'You are not allowed to use the specified input format.'
>> 'You are not allowed to use the specified format.'
E. 'Disallowed to send a message without at least one valid recipient'
>> 'You must include at least one valid recipient.'
F. 'Disallowed to send message because all recipients are blocked'
>> 'You are not allowed to send this message because all recipients are blocked.'
And I'm now assuming that we're using theme('username') when referring to a specific user so that RealName module can be supported. In future string changes, how should I write this?
Once you've added the changes, I can test the updated patch and we can commit!
Cheers,
Ben
Comment #8
BenK commentedOne more string to add... In the "new message indication" block, if a user has a new message, then following text is displayed:
'You have a new message, click here to read it'
To punctuate it properly, it should be this:
'You have a new message! Click here to read it.'
Or if there are multiple new messages then it currently displays:
'You have 2 new messages, click here to read them'
Instead, it should display:
'You have 2 new messages! Click here to read them.'
--Ben
Comment #9
berdirAh, now I remember why we're using indirect speech there :)
The function is not only used to validate messages sent through the form but also messages sent by the API (notifications, rules and so on). In these cases there is no user which can be addressed directly. Anyway, there are separate strings for form and api validation already, because api validation strings are returned so we can improve the user facing strings.
Attaching a patch, requires quite a few changes to the test strings too since they obviously must match.
Comment #11
BenK commentedAh, I see. For the API messages, would you like to alter the structure to provide complete sentences? Or is this unnecessary? For instance, we could change this:
'Disallowed to send a message without a subject.'
to this:
'Sending a message without a subject is not allowed.'
--Ben
Comment #12
berdirI guess we can change them too while we're working on it.
Comment #13
BenK commented#9: text_changes2.patch queued for re-testing.
Comment #15
BenK commentedI guess maybe the patch needs a re-roll?
--Ben
Comment #16
berdirYes. Can you propose better strings for the API validation strings, as proposed in #11? :)
Comment #17
BenK commentedI can do that, but where can I find all of the API validation strings? Can you point me to where all of them are in the code?
--Ben
Comment #18
berdirSame function, same strings actually, except of one exception.
It is always like this:
The only difference is the one with the input format currently.
Comment #19
BenK commentedWill do the API strings later today....
Comment #20
BenK commentedHere are the API strings. The current strings are shown, then the replacements:
A. 'User @user is not allowed to write messages'
>> '@user is not allowed to write messages.'
B. 'Disallowed to send a message without subject'
>> 'A subject line must be included with your message.'
C. 'Disallowed to send reply without a message.'
>> 'A message must be included in your reply.'
D. 'You are not allowed to use the specified input format.'
>> '@user is not allowed to use the specified input format.'
E. 'Disallowed to send a message without at least one valid recipient'
>> 'At least one valid recipient must be included with your message.'
F. 'Disallowed to send message because all recipients are blocked'
>> 'This message cannot be sent because all recipients are blocked.'
--Ben
Comment #21
berdirThanks, updated the patch with a few modifications.
Comment #22
BenK commentedHey Berdir,
I haven't tested this yet, but in scanning the code I noticed that in pm_block_user.module, it is still showing "[username]" in the string. Did you want to fix this first before I test...and also so that it supports theme('username')?
--Ben
Comment #23
berdirFixed [username]....
Comment #25
BenK commentedWill manually test as soon as this passes automated testing...
--Ben
Comment #26
berdirThis should pass...
Comment #27
BenK commentedHey Berdir,
The latest patch applies nicely and the new strings look good. This is ready to be committed and then ported to D7! :-)
--Ben
Comment #28
berdirCommited to 6.x-2.x and 7.x-1.x!