When I was importing translation to Drupal, I get this notice:
25 translation strings were skipped because they contain disallowed HTML.
Cheers
Wojtha
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | angle_brackets.patch | 4.05 KB | Island Usurper |
When I was importing translation to Drupal, I get this notice:
25 translation strings were skipped because they contain disallowed HTML.
Cheers
Wojtha
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | angle_brackets.patch | 4.05 KB | Island Usurper |
Comments
Comment #1
rszrama commentedInteresting... is there a difference between HTML and disallowed HTML? For example, I was under the impression that the proper use of t() when the strings contained a link was something like this:
Comment #2
Island Usurper commentedI bet it has something to do with locale_string_is_safe(). I hadn't heard of this function before this morning, when it was mentioned on the dev list.
I guess fixing this will involve going through all of the .pot files for the bad strings. :(
Comment #3
Island Usurper commentedBased on the idea that locale_string_is_safe() is causing that error, can you check some places where I think Ubercart wasn't translated?
Look in the Conditional Actions settings, and add a product weight condition. The select box that lists your products has an option called "<All products>" and it is also mentioned in the description of that field. If these aren't translated, I guess we'll have to figure out how Drupal got around it.
Just had a thought that it might have been the actual translations that were bad. I only found 10 places in the newly extracted strings that used angle brackets badly.
Comment #4
cha0s commentedYou could try "- All products -", like I think I've seen CCK do.
Comment #5
Island Usurper commentedYeah, taxonomy uses that format, too. I'll write up a quick patch to fix that.
Comment #6
Island Usurper commentedThere was also malformed HTML in uc_google_checkout.module, so this patch fixes it too.
Comment #7
Island Usurper commentedI'm going to go ahead and commit the patch from #6, but that doesn't mean it actually fixes the problem. I suspect it's the actual translations, even though they were probably just following the bad HTML in the templates.
Comment #8
rszrama commentedComment #9
cha0s commentedWell, I tried importing and I didn't get an error.
wojtha, what language did you import to get this error? I'd like to reproduce/fix it.
Comment #10
wojtha commentedHi cha0s,
It was Czech language pack created by translation server (I'm one of the translators...). I can try to generate a new one and upload here if you wish to try it.
Comment #11
cha0s commentedI greatly appreciate any file you can provide that will show this bug... I downloaded the czech file from the privnet server... However, all I got was:
Comment #12
Island Usurper commentedUnless we get some more input about something being wrong, I guess this issue is fixed. I noticed that I hadn't committed all of the changes in the patch in #6, but no one seemed to complain before. *shrug*