#1932530: Activity stream not showing with Locale module enabled seems to be fixed in Commons 3.2, but the open question was how to translate the messages in the activity stream. Switching off the Locale module to modify the default strings (defined in the "und" language) and then switching on the Locale module again seemed too ugly.

I found a work-around:

  1. Copy the strings from the "und" language ("Language none") to your new language by going to admin/config/system/message/text-copy
  2. The default strings are now available (for the new language) in each of the message types located at admin/structure/messages and translation is straight forward.
  3. Upgrade to Entity 7.x-1.x-dev. The translated messages are now finally used in the activity stream. (It doesn't work with Entity 7.x-1.0 - this took me far too long to discover. Argh!)

OK, the "problem" with translating this way is that the message types are marked as modified. It should be possible to translate the messages without changing the definition which is stored in code. Or maybe this is the best we can do?

Anyway, IMHO Commons should require a newer version of Entity than 7.x-1.0 if we want to support translations. I'm sorry that I can't point at a specific patch for Entity.

Comments

Devin Carlson’s picture

Status: Active » Fixed

Entity 1.1 is now included with Commons and it's now possible to translate activity stream messages by using a module like Entity Translation.

Devin Carlson’s picture

For information on using Message module's built-in translation capabilities (when used in combination with locale) see #1962586: How can I translate messages?.

Status: Fixed » Closed (fixed)

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

guruslot’s picture

Issue summary: View changes

I'd like to re-open this issue because I'm not able to find a way to translate a node type name:

For example, a message when user likes a node is a following:

[message:user:name] liked the [message:field-target-nodes:0:type] [message:field-target-nodes:0:title_field]

[message:field-target-nodes:0:type] could be an 'article' or a 'forum'.

So, the problem is that after a translation [message:field-target-nodes:0:type] outputs the same English node type name, such as article, forum, etc.

Content type names are already translated and it seems that [message:field-target-nodes:0:type] has no relation to that names.

It looks like that [message:field-target-nodes:0:type] uses machine names instead of Content Type name.

guruslot’s picture

Status: Closed (fixed) » Active