Posted by hailu on September 18, 2008 at 5:43pm
3 followers
| Project: | Fivestar |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
There were a few labels for ratings which weren't passed through locale, so they'd never get translated on an i18n site.
This patch should correct this.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| fivestari18nfixes.patch | 7.83 KB | Ignored: Check issue status. | None | None |
Comments
#1
This is intentional as t() is meant to be used for non-dynamic, hard-coded values (not user-inputed values). However, I won't argue that Fivestar is unable to translate the custom star labels.
#2
Also, the patch you attached is an HTML document(?) If you could reroll that'd be great.
#3
That's really funny, i have no idea how i got that to be HTML!
I've re-rolled this patch to contain only first hunk, so that the default labels are wrapped in t()'s.
I see your point about dynamic values and t() not really seeing eye to eye.
For dynamic values, tt() might be a good alternative.
I hope this helps!
#4
Ah, okay I see what you're recommending now. This location is actually intentionally left without the t() also, though again, I'm not positive it's the best approach. If Fivestar were to wrap the labels in t() or tt() on output, you'd want the initial setup of the labels to be in English, so the t() is omitted to keep the labels in English by default.
#5
Fixed with this patch, committed.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.
#7
Updating title for what was fixed.