Download & Extend

Translatable text looks like HTML but isn't

Project:Fivestar
Version:6.x-1.13
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When importing the fr.po translation for this module, I get:
2 translation strings were skipped because they contain disallowed HTML.

The issue seems similar to the one there:
http://drupal.org/node/362647

The two translatable strings used by fivestart that look like HTML tags are '' and ''. I *think* a good solution would be to use '<none>' instead, but maybe someone more knowledgeable on this will know better.

Comments

#1

Looks like your text got parsed out by the HTML filter, wrap in <code> tags to keep them in place.

Quoted with code tags:

The two translatable strings used by fivestart that look like HTML tags are '<none>' and '<Hidden>'. I *think* a good solution would be to use '&lt;none&gt;' instead, but maybe someone more knowledgeable on this will know better.

#2

Also, thanks for the report. :)

Perhaps what we should do is translate the inside of the the brackets?

<?php
$none
= '<' . t('none') .'>';
?>

We don't need to URL encode these strings since they are encoded for us when we put them into a select list. I've never heard of the error you described, but then again I don't work on many translated websites.

#3

Yes, your solution does make sense. In all languages the < and > should be there, so only the text inside has to be translated.

#4

Status:active» fixed

Fixed with the attached patch, which has been committed to CVS.

AttachmentSizeStatusTest resultOperations
fivestar_t_brackets.patch1.81 KBIgnored: Check issue status.NoneNone

#5

Status:fixed» closed (fixed)

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

nobody click here