Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Translation problem : how to translate Activity Story like $NewRoles or $RemovedRoles ??

ArachnosArachnos La Garenne Colombes
edited February 2011 in Vanilla 2.0 - 2.2
In the Activity panel (front-office), there is text like "Dummy 2 was added to the Administrator role." or "Dummy 2 was removed from the Administrator role.".

By searching, this text is in applications/dashboard/models/class.usermodel.php under the $NewRoles and $RemovedRoles variables.

Anyone as a solution to translate that ?


  • Write this in GitHub.

    Find necessary text, for example - 'My Text' and make it into T('My Text')
    After it you can add translation to locale.
  • ArachnosArachnos La Garenne Colombes
    it doesn't work when you insert it in locale file (I've inserted like this T('%1$s was added to the %2$s %3$s.') = T('%1$s a été ajouté à %2$s %3$s.');

    I got this error : Fatal error: Can't use function return value in write context in /Applications/MAMP/htdocs/forum/locales/French/captured.php on line 20

    Here's the string in class.usermodel.php : $Story = sprintf(T('%1$s was added to the %2$s %3$s.'), $User->Name, implode(', ', $NewRoles), Plural($NewCount, 'role', 'roles') );
  • T('%1$s was added to the %2$s %3$s.') = T('%1$s a été ajouté à %2$s %3$s.');

    Seems nuts. :-) How you want assign right to left? :-)
    You must use $Definition, as I remember.
  • ArachnosArachnos La Garenne Colombes
    Yes but I think I have to retrieve the right keywords in a form similar to

    because $Definition['%1$s was added to the %2$s %3$s.'] = '%1$s a été ajouté à %2$s %3$s.'; don't work
Sign In or Register to comment.