I've replaced the "up/down" icons with thumbs up/down, and would like to replace "points" with "thumbs" accordingly. For example, where it reads "0 points" by default it would read "0 thumbs." String overrides wouldn't work so I fished around in the .module file and found a few places where I could make the label change, but it only worked for certain instances (e.g 1 point become 1 thumb, but couldn't change -1 point into 1 thumb for some reason). Any advice on how to make sure I'm changing all the labels in the .module file?

Comments

dtarc’s picture

String Overrides module worked for me, i set a replacement for "point" and "points".

skizzo’s picture

see also http://drupal.org/node/339312
maybe all format_plural's in Vote Up/Down needs t() ?

fumbling’s picture

String overrides didn't work for me, at least not on "[n] points" label that attaches itself to each comment. Any other thoughts? ("i'm not sure I follow the other reply below, but I'm not much a php guy yet). Thanks again for any help.

dtarc’s picture

You don't need to override "[n] points", just "points" and "point". The number and the label are displayed in different divs.

fumbling’s picture

Thanks. Yeah, I was just just the "[n]" to point out that I'm trying to override the place where it displays the number of points beside a posts, but I don't actually enter "[n]" into the string overrides field. Neither "point" or "points" string overrides works for that instance for some reason for me.

dtarc’s picture

drupal 6.9
Vote Up/Down 6.x-1.x-dev (2009-Feb-28)
String Overrides 6.x-1.7

I'm able to replace "point" and "points" with String Overrides. I haven't made any customizations that would change anything.

parrottvision’s picture

I think in the latest dev for vote up/down point and points is no longer printed in a t() meaning it won't work to override it with String Overrides. I might be wrong but I can't see it and it doesn't work for me.

It should be built into the module to overide the description like userpoints module does, IMO.

fitzed’s picture

I agree with parrottvision, this should be incorporated into the module itself as an option under the "General" tab.

ingo86’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Assigned: Unassigned » lut4rp
Category: support » feature

Moved under the new branch, 2.x.
No new features for 1.x branch.

totaldrupal’s picture

subscribing

marvil07’s picture

I saw the same request on og module any times, and it seems like a bad idea to Moshe: #252836: Allow the ability to rename "groups" / assign labels to groups, so maybe here we also do not want to do it

kevinquillen’s picture

Why is it a bad idea? You should be able to change 'points' to whatever you'd like it to say, for example instead of '2 points' I want to say '2 people liked this'.

marvil07’s picture

Copying from t()(please see the full page also, I'm copying only the conclusion):

However tempting it is, custom data from user input or other non-code sources should not be passed through t(). Doing so leads to the following problems and errors:

  • The t() system doesn't support updates to existing strings. When user data is updated, the next time it's passed through t() a new record is created instead of an update. The database bloats over time and any existing translations are orphaned with each update.
  • The t() system assumes any data it receives is in English. User data may be in another language, producing translation errors.
  • The "Built-in interface" text group in the locale system is used to produce translations for storage in .po files. When non-code strings are passed through t(), they are added to this text group, which is rendered inaccurate since it is a mix of actual interface strings and various user input strings of uncertain origin.
  • Another solution for this problem can be context in translation, but sadly it's included in D7 only.

    kevinquillen’s picture

    I changed it in the code.

    CarbonPig’s picture

    Version: 6.x-2.x-dev » 6.x-1.0-beta6

    Changed in code on lines 735 or 736 depending on what patched you've done like follows:

    $variables['points_labelled'] = format_plural($vote_result, '1 poinasdft', '@count poiasdfnts');

    I just added a bunch of garbled asdkft type text to show where to change.

    http://carbonpig.com

    marvil07’s picture

    Assigned: lut4rp » Unassigned
    Status: Active » Closed (won't fix)

    Since I see not more arguments here, I mark this as won't fix.

    Please feel free to reopen this if you have any solid arguments which are not against official documentation I mentioned.