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

Translate "{USER} joined." on activity wall?

phreakphreak VanillaAPP - Your white label app for Vanillaforums MVP
edited April 2015 in Localization

Hi all,

How can i translate "joined." in "USERxyz joined." on the activity page under 2.1.
Can't find it in the locales. Hardcoded?

Thanx
phreak

Comments

  • hgtonighthgtonight ∞ · New Moderator
    edited April 2015

    Should be using the locale definition of HeadlineFormat.Registration with the default being {ActivityUserID,You} joined..

    This might also be pulling from the Activity Type table in the db, but I doubt it. If the previous thing doesn't fix it, try updating the FullHeadline and ProfileHeadline for the 'Join' activity type.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    phreak
  • phreakphreak VanillaAPP - Your white label app for Vanillaforums MVP

    @hgtonight: Thanx for the help. But none of my tries seem to work.

    Wether this
    $Definition['HeadlineFormat.Registration'] = '{ActivityUserID,You} joined2.';

    Nor that:
    $Definition['%1$s joined.'] = '%1$s joined2.';

    Anyone has an idea?

  • ShadowdareShadowdare π Moderator

    $Definition['HeadlineFormat.Registration'] should work, but it will only be applied to new activity postings since the headline is stored in the database. See: https://github.com/vanilla/vanilla/blob/2.1/applications/dashboard/models/class.usermodel.php#L1585

    Add Pages to Vanilla with the Basic Pages app | Publish articles with the Articles app

    phreakhgtonight
  • phreakphreak VanillaAPP - Your white label app for Vanillaforums MVP

    OK, thanx guys. Sorry, i could've thought bout that.

  • ShadowdareShadowdare π Moderator
    edited April 2015

    You can update past user joined activity headlines by running this SQL command:

    UPDATE GDN_Activity SET HeadlineFormat = "{ActivityUserID,You} joined2." WHERE HeadlineFormat = "{ActivityUserID,You} joined.";
    

    Add Pages to Vanilla with the Basic Pages app | Publish articles with the Articles app

    hgtonight
  • phreakphreak VanillaAPP - Your white label app for Vanillaforums MVP

    Thanx, done it before but very valuable info for others coming after me. :)

    hgtonight
  • kopnakopna Coimbra Portugal ☯

    Hi, I suppose, if you delete a gdn_activity these lines: HeadlineFormat.Registration {ActivityUserID, You} joined.';
     
    for instance translation: ** $ Definition ['HeadlineFormat.Registration'] = '{ActivityUserID, You} joined.'; ** Will be displayed correctly -

    $ Definition ['HeadlineFormat.Registration'] = '{ActivityUserID, Você juntar-se à comunidade}.'; Is it possible to make these lines are not automatically created in the table?

    Thank you

  • @kopna said:
    Hi, I suppose, if you delete a gdn_activity these lines: HeadlineFormat.Registration {ActivityUserID, You} joined.';
     
    for instance translation: ** $ Definition ['HeadlineFormat.Registration'] = '{ActivityUserID, You} joined.'; ** Will be displayed correctly -

    $ Definition ['HeadlineFormat.Registration'] = '{ActivityUserID, Você juntar-se à comunidade}.'; Is it possible to make these lines are not automatically created in the table?

    Thank you

    Is it possible to make these lines are not automatically created in the table?

    if your goal is to preserve anonymity for newly joined users on the activity page.

    you could change the definition to

    $Definition ['HeadlineFormat.Registration'] = "";

    then the name wouldn't appear. just the welcome aboard.

    otherwise you would need to write a plugin. for ideas you could look at the code in the activity model save method and use a trigger to either delete the info after saving or possibly changing error count to invalidate on before save. it would require experimentation on your part though.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • kopnakopna Coimbra Portugal ☯

    peregrine,
    the problem is that the definition such as etc.. $Definition['Activity.ConversationMessage.FullHeadline'] = '%1$s bla-bla %8$s.'; unfortunately not translated.
    Such untranslatable, $Definition['TagHint'] = 'bla-bla...';
    $Definition['You'] = 'bla-bla...';
    $Definition['Administrator'] = 'bla-bla...'; and many other things that determine database.

    The aim is to help authors Vanilla to simplify translation simple users who choose to use this СMS. That is where and what to look for and properly prescribe. For example, I look tired cat alone in a dark room and black soup :-)

Sign In or Register to comment.