I came across this Issue.
I have a content type, with an english name : Quiz Direction
I translated it to : Objet d'accompagnement
When navigato to the node add form, the title is html encoded : Créer 'Objet d'accompagnement'
I found out that Drupal's check_plain was executed 2 times on Objet d'accompagnement that prevent it from displaying correctly.
On line 521 of file i18n_node.module, there's a call to i18n_node_translate_type() which apply check_plain on the content type name and this call is wrapped in a t() and the placeholder '@name' execute another check_plain on the content type name.
I think the placeholder should not check anything since i18n_node_translate_type() seems to already have done that.
I made a patch that change the placeholder from '@name' to '!name', but it is also necessary to change the translation.
Comments
Comment #1
emman31 commentedActually, the same happens for node edit.
Comment #2
klausiPatch does not apply, see http://drupal.org/node/707484
Comment #3
emman31 commentedThanks for the help, here is one that should work.
Comment #4
jose reyero commentedThis may work though just taking out filtering -and adding 2 new strings to translate- doesn't look good to me. What we need to do is to use the $options['sanitize'] = FALSE parameter from i18n_string_translate()
Comment #5
gaëlgComment #6
jose reyero commentedPatch is ok. However I'm thinking why not for 'edit' too? And why not reusing the (your patch fixes it too) i18n_node_type_name() function?
Please give a try to this one.
Comment #7
guillaumeduveauPatch #06 is great.
We also have to do the same for the message displayed after a node submission, see interdiff and patch.
Comment #8
jose reyero commentedThis looks ok, committed latest patch by @guix
Thanks everybody.