I am trying to shorten some words so they don't go on forever on my site. Where can I change the words under the stars from "Average" to "Avg" and "Your Rating:" to "you:"?
Thanks
I am trying to shorten some words so they don't go on forever on my site. Where can I change the words under the stars from "Average" to "Avg" and "Your Rating:" to "you:"?
Thanks
Comments
Comment #1
quicksketchCurrently it's not easy to do within Fivestar. I'd suggest trying out the String Overrides module.
Comment #2
sammyman commentedI don't think that changed any of the vocabulary that I was hoping it would change. Thanks for the suggestion. The only one it worked on was "None" -> "N/A", haha.
Comment #3
quicksketchI'm pretty sure it will work. You just have to look for the correct strings. For example it's "Average" not "Average:". String Overrides can replace any string that's wrapped in t() in the source code, and since Fivestar is fully translatable, it should find it just as the translated versions of Fivestar have.
Comment #4
sammyman commentedI tried "Average", "Average:", " average", "average" etc and nothing. Do I have to reset the cache or something?
Comment #5
quicksketchI don't *think* you have to clear the cache, but it's not going to hurt clicking "clear all caches" on admin/settings/performance.
Comment #6
sammyman commentedhmmm. still no luck. I have tried %Average and everything. Thanks for the help though.
Comment #7
dawehnerthe string is
If string overwrite does not work for you, you could enable the locale module and translate the ord into a custom english language, but using string overwrites should be much better
Comment #8
quicksketchComment #9
leelooch commentedwell, the problem is in line 257 of fivestar.theme.inc (v 7.x-2.0-alpha2) :
t('Average: !stars') can't be translated as it contains forbidden html and should be changed to :
Comment #10
leelooch commentedreopening the issue so we can solve the t() string problem
Comment #11
astutonetThe code in #9 works to me.
Comment #12
whiteph commentedDuplicate of Cannot translate Average: !stars. I've applied the patch there - it's in the latest 7.x-2.x-dev version.