Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Activities not applying text from definitions.php locale

These (below) are not being properly loaded...instead all I'm getting is "Yaga.HeadlineFormat.BadgeEarned". :(

// Activities
$Definition['Yaga.HeadlineFormat.BadgeEarned'] = '{ActivityUserID,You} earned the {Data.Name,text} badge.';
$Definition['Yaga.HeadlineFormat.Promoted'] = '{ActivityUserID,You} earned a promotion to {Data.Name,text}.';

I noticed that the definitions from the yaga application locale folder were not loading at all initially, to experiment I moved them into the vanilla applications locale and now I see most the definitions correctly.

I'm obviously missing something pretty basic here...can anyone unstick me?

Comments

  • Options

    I figured it out. I didn't delete the cache files before the activity was logged so it inserted into the DB with text as is instead of evaluating it using the definition.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Thanks for trying my addon and posting back with your solution!

    There is a known issue with application locales not applying correctly: https://github.com/vanilla/vanilla/issues/1779

    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.

  • Options

    np! I'm loving it. I appreciate all the work you did to get this going. I'm only a novice but I'm getting into it now and I'd like to help where I can :).

  • Options

    Hello, my forum is the same and can not find solution. As you can solve?

    http://www.lavazulada.com/foro/profile/1/Mario

  • Options
    hgtonighthgtonight ∞ · New Moderator

    You need to perform the last step of the readme

    README.md

    Finally, you need to delete the /cache/locale_map.ini file to force refresh the locale definitions.

    Note that once this happens, any existing activity items will not be updated. All future activity items will use the locale.

    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.

  • Options
    shumooshumoo New
    edited May 2014

    Check the readme files for instructions on how to locate and delete your cache files.
    Mine read as "Finally, you need to delete the /cache/locale_map.ini file to force refresh the locale definitions."

    While it only says to delete the locale_map.ini, I deleted all the files in the cache folder knowing they will be recreated. If you create a backup of them somewhere first you should be able to do this as well.

    After you delete the cache files, you will need to run an UPDATE SQL statement for the rows in the activity table where the text is not equal to the text from the definitions.php.

    I use mysql workbench and this is the query I wrote:
    UPDATE <<YOUR_DB>>.GDN_Activity SET HeadlineFormat = '<<YOUR DEFINITIONS.PHP TEXT HERE>>' WHERE ActivityID IN (1,2,3) OR HeadlineFormat = '<<TEXT YOU SEE ON YOUR FORUMS THAT DID NOT APPLY DEFINITIONS TEXT>>'

    Make sure to update this query for your own DB and change the where clause using only the fields you want to match on.

    That will correct the entries that were created in the DB already and once you delete the cache files you should not see the problem repeat any more.

Sign In or Register to comment.