HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to rename "karma" into something else

Hi guys,
Thank you to the developer for this fantastic add-on, really appreciate that.

My query is about changing the name (localizing if you wish) the "Karma" concept. For a forum site we operate which is about a community site, we want to use another word than karma, like "Vote" or "Reputation". How can we do it?
Best of the best regards

Comments

  • hgtonighthgtonight ∞ · New Moderator
    edited July 2013

    Welcome to the community!

    What version of Vanilla are you running?

    You are probably looking for Locales.

    The following definitions are all I found in a cursory grep through the source code of 0.9.6.6b:

    • "%01.2f Karma"
    • "%01.2f"
    • 'Balance'
    • 'Date'
    • 'Date.DefaultFormat'
    • 'Date.DefaultTimeFormat'
    • 'Disabled'
    • 'Enabled'
    • 'Karma Bank Settings'
    • 'Karma Bank'
    • 'Karma'
    • 'Make transaction of'
    • 'Meta'
    • 'Remove'
    • 'Reward / Tax'
    • 'Settings/Rules'
    • 'Show Balance with Comment Author Meta'
    • 'Transaction'
    • 'You do not have any Karma yet.'

    EDIT - Formatting.

    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.

  • Hi,
    Thanks for the response.

    My version is 2.0.18.8 and as you said, I've already done all customizations through thişs method. However, "Karma" is sooo generic that I couldn't dare to touch any of them in a fear to crack the code!

    So, a specific line or class in locale.php would be perfect.

  • hgtonighthgtonight ∞ · New Moderator
    edited July 2013

    I listed all translate-able strings in use in version 0.9.6.6b. Pick out all the ones you want changed and put the definitions in your conf/locale.php file.

    E.g.

    $Definition['Have no fear.'] = 'Changing locale definitions won\'t break anything!';
    

    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.

  • The problem is 'Karma' string is generic and I've changed all possible of them without any luck - so probably it is hard coded somewhere

  • post an image of what you see and circle want you to change, we can't guess.
    Actually we could guess, but then we would be guessing, instead of helping you.

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

  • hgtonighthgtonight ∞ · New Moderator
    edited July 2013

    Do you have all of these definitions set?

    $Definition['Karma Bank Settings'] = 'Reputation Bank Settings';
    $Definition['Karma Bank'] = 'Reputation Bank';
    $Definition['Karma'] = 'Reputation';
    $Definition['You do not have any Karma yet.'] = 'You don\'t have a reputation yet.';
    

    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.

  • delete your ini files in /cache if your definitions don't update properly.

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

  • x00x00 MVP
    edited July 2013

    The locale is actually namespaced now. Default values:

    • KaramBank.Status -> Status
    • KarmaBank.Enabled -> Enabled
    • KarmaBank.Disabled -> Disabled
    • KarmaBank.StartingBalance -> Starting Balance:
    • KarmaBank.Set -> Set
    • KarmaBank.DisplayOptions -> Display Options
    • KarmaBank.ShowBalanceWithComments -> Show Balance with Comment Author Meta
    • KarmaBank.DisplayRules -> Karma Rules:
    • KarmaBank.Meta -> Meta
    • KarmaBank.MakeTransactionOf -> Make transaction of
    • KarmaBank.Remove -> Remove
    • KarmaBank.AddRule -> Add Rule
    • KarmaBank.MetaDescription -> Meta Description:
    • KarmaBank.OperationsDescription -> Operations Description:
    • KarmaBank.Transaction -> Transaction
    • KarmaBank.Date -> Date
    • KarmaBank.DateDefaultFormat -> Date.DefaultFormat
    • KarmaBank.DateDefaultTimeFormat -> Date.DefaultTimeFormat
    • KarmaBank.NumberFormat -> %01.2f
    • KarmaBank.Balance -> Balance
    • KarmaBank.NumberFormat -> %01.2f
    • KarmaBank.NumberFormatKarma -> %01.2f Karma
    • KarmaBank.NoKarmaYet -> You do not have any Karma yet.
    • KarmaBank.KarmaBankSettings -> Karma Bank Settings
    • KarmaBank.SettingsRules -> Settings/Rules
    • KarmaBank.KarmaBank -> Karma Bank
    • KarmaBank.RewardTax -> Reward / Tax
    • KarmaBank.Amount -> Amount
    • KarmaBank.RewardTaxReason -> Reason
    • KarmaBank.Karma -> Karma
    • KarmaBank.Date -> Date
    • KarmaBank.Transaction -> Transaction
    • KarmaBank.Remove -> Remove
    • KarmaBank.AddRule -> Add Rule

    grep is your friend.

  • Hi guys,
    1. I have included above definitions into locale.php
    2. Uncached Firefox
    3. Deleted all ini at cache

    Still, "Karma" name is there - see attached

  • did you use the definition above?

    you need to translate

    KarmaBank.NumberFormatKarma -> %01.2f Something

    grep is your friend.

  • Great! It worked! Thank you very much :))))
    Love you!

  • Feel bad bringing back a post from 2013 back to life, but I can't find locale.php

  • @Excl said:
    Feel bad bringing back a post from 2013 back to life, but I can't find locale.php

    The folder is http://www.yoursite.com/locales/, you simply create a new PHP file xxxx.php in that folder and enable it in the dashboard. :)

Sign In or Register to comment.