Reported problem
The string Average: <span !microdata>!stars</span> cannot be translated to another language; a translation like Mitjana: <span !microdata>!stars</span> is rejected with the following message: The submitted string contains disallowed HTML: Mitjana: <span !microdata>!stars</span>.
Implemented solution
The string was replaced with 'Average: !stars'.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1835476-5.patch | 844 bytes | roderik |
Comments
Comment #1
mzwyssig commentedFollowing.
Comment #2
salihcenap commentedFollowing.
Comment #3
torotil commentedThis seems to be a bug in the fivestar module. A shor grep for "microdata" reveals:
includes/fivestar.theme.inc:262: $output .= '<span class="average-rating">'. t('Average: <span !microdata>!stars</span>', array('!stars' => $average_stars, '!microdata' => $average_rating_microdata)) .'</span>';Comment #4
hass commentedWe could see this as a duplicate of #1445944: Missing properties (e.g. ratingCount) on microdata
Comment #5
roderikLuckily,
...so it's not hard to change.
Comment #6
hass commentedLooks codewise good.
Comment #7
imoreno commentedWorked for me. Now i can translate the string.
Comment #8
whiteph commentedComment #9
NStorm commentedWhy is this still not in main branch?
After updating to 7.x-2.0-alpha3 I still had to manually fix that issue with patch supplied in this ticket.
Please merge this to next main branch release.
Comment #10
hass commentedComment #11
whiteph commentedThanks @hass.
@NStorm, 7.x-2.x-dev is the main branch. 7.x-2.0-alpha3 was a tag that I applied on Feb 1st this year after I became a co-maintainer. It contains just five fixes that been on the dev branch since May 2012. So alpha3 is alpha2 + those five fixes. The current dev version contains 19 fixes applied since alpha3, most of those fixes having been available as patches on Drupal.org for quite some time. I'll be creating a new tag (alpha4 or beta1) soon.
Comment #13
dercheffeThis problem appears still in in my D7 installation where I use version 2.1. I think it's not comitted into version 2.1 or am I wrong?
Comment #14
dercheffeComment #15
roderikIt is committed to version 2.1. Your includes/fivestar.theme.inc file should contain the green lines, not the red lines, from this link.
This means you should be able to translate the string 'Average: !stars' now.
(And the string in the subject of this page should not be present anymore, or at least it's not used.)
In case you're upgrading from an old version -where the old string is already in your translation system- I can see the confusion, so I added something to the issue summary.