I am using this module together with Appbar. The default message for new status comments is:

!user commented on your !message.

If I translate it e.g.

!user hat Ihre Kurzmitteilung kommentiert: !message

The result in appbar is:

admin hat Ihre Kurzmitteilung kommentiert: message

I don't know how to translate the word (link) message

Comments

icecreamyou’s picture

Status: Active » Fixed

The word "message" is translated separately. It has to be done this way because it's part of a link. In other words the code looks similar to this:

$status_link = l(t('message'), 'statuses/'. $sid);
t('!user commented on your !message.', array('!user' => $user_link, '!message' => $status_link))

The details aren't important, but basically the text in the parentheses of the t() function is what you can translate, !user and !message are tokens that get replaced. So in the message !user commented on your !message, !message gets replaced with a link that contains the word message which you also have to translate, but separately.

Does that make sense? Is that enough information?

baff’s picture

Thanks! But not easy to find on admin/build/translate/search, because message is a very frequent word ... or do I understand it wrong?

icecreamyou’s picture

Yeah, that's right, unfortunately. I'm certainly open to suggestions if you have any for how to make this better.

icecreamyou’s picture

Category: support » bug
Priority: Normal » Minor
Status: Fixed » Active

Actually I just remembered that there is a coding standard recommendation to do this a different way that will be easier to translate. So this is actually a bug.

icecreamyou’s picture

Status: Active » Fixed

Okay, just committed a fix. The string you need to translate is now this:

!user commented on your <a href="!message">message</a>.

...so you no longer need to separately translate the word "message."

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.