Hi!

There is a text private-message as name for message type on message list.
This text can't be translated, and it then is missunderstood for our users.
If it is name of node type which can't be translated, can you use some text "private message" or another which can be translated
(or which can be changed in private message settings page)?

Thanks
Igor
http://www.somvprahe.sk

Comments

igorik’s picture

I found that it is line 2247 from privatemsg.module
I changed it from drupal_render($form[$key]['type']), to 'private message' until it will be done.
I suppose that for now there are no more private message types as "private-message". I found no other one.

Igor

jaydub’s picture

It would seem that if you wrapped the above variable with a t() that you would be able to
customize display right?

so:

drupal_render(t($form[$key]['type']));

jaydub’s picture

Status: Active » Needs review

Ok I have a better and actually working solution...

see attached patch

igorik’s picture

Hi Jaydub, thanks for your patch, but are you sure you attached it? I see no patch here.

Igorik

jaydub’s picture

StatusFileSize
new500 bytes

oops!

jaydub’s picture

StatusFileSize
new810 bytes

patch updated to include one more location where the string occurs.

yngens’s picture

i installed last version and the problem is still there. will this patch be ever applied to the module, please.

yngens’s picture

i wonder do wee need that column at all? every message in private messages is of private message type, isn't it? or some other types of documents also possible to send via private messages? if yes, i could not figure out how.

jaydub’s picture

there is a privatemsg API for sending messages. These
could potentially be called something other than private
messages. For example on a site in development with
classified ads, we are using privatemsg as part of an ad
reply system. So the classified ad replies are sent with
privatemsg type of 'ad-reply' which is different than
regular private messages of type 'private-message'

recidive’s picture

Status: Needs review » Needs work

We usually don't use t() to wrap variables or functions. This will make the pot extractor script to trigger errors. In sum, you can only use t() to wrap a plain string.

An consistent way to fix that is introducing a hook_privatemsg_types() so modules could add information for the message types they implement. E.g.:

function hook_privatemsg_types() {
  $types = array();
  $types['my-type'] = array(
    'title' => t('My type'),
    'description' => t('My type description'),
  );
  return $types;
}
recidive’s picture

Status: Needs work » Needs review
StatusFileSize
new2.74 KB

Patch implementing hook_privatemsg_types() attached.

yngens’s picture

i would love to see this issue is resolved in this or other way and applied to the official release. other wise i am not sure which patch to apply to.

berdir’s picture

Status: Needs review » Closed (won't fix)

Sorry for pinging the participants, I am closing old issues.

This version of Privatemsg is not supported anymore, maybe it is already implemented in Privatemsg for Drupal 6 and if not, you are welcome to open a new issue for it.