The string with the Tokens is not put to the t() function, so the replaced string will be equal for all languages. I suggest wrapping the $submitted variable in submitted_by_node_submitted() in the t() function.

So, change

if ($submitted) {
    return filter_xss_admin(token_replace($submitted, 'node', $node));
  }

To:

if ($submitted) {
    return filter_xss_admin(token_replace(t($submitted), 'node', $node));
  }

See the patch that does exactly this.

CommentFileSizeAuthor
submitted_by_t.patch502 bytesBarisW

Comments

BarisW’s picture

Assigned: Unassigned » BarisW
Status: Active » Needs review

Forgot to set the status

j0nathan’s picture

Hi,
Patch tested and working.
With this, no need to use i18n variables into settings.php, but translatable by the core Translate interface.

nancydru’s picture

Status: Needs review » Fixed

Committed to 6.x-1.x-dev. I could not test it because my PC with my test sites is dead.

Also committed to HEAD (7.x), but now that Tokens is in core, it will require more testing, and probably coding changes.

Status: Fixed » Closed (fixed)

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