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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Needs review » Needs work

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.

quicksketch’s picture

Also, the patch you attached is an HTML document(?) If you could reroll that'd be great.

hailu’s picture

Status: Needs work » Needs review
FileSize
1.13 KB

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!

quicksketch’s picture

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.

quicksketch’s picture

Status: Needs review » Fixed
FileSize
1.81 KB

Fixed with this patch, committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

quicksketch’s picture

Title: Rating Labels weren't passed through t() » Omit < > characters from t()

Updating title for what was fixed.