Page 1 of 1

Bug with french localisation and javascript

Posted: Wed Nov 03, 2004 9:56 am
by stoub
There is a bug in the javascript of the trackback, in the french localisation. There are ' in the text, which makes internet explorer print a javascript error :

serendipity_lang_fr.inc.php line 494 :

Code: Select all

@define('TRACKBACK_SPECIFIC_ON_CLICK', 'Ce lien n\'est pas fait pour être cliqué. Il contient le lien de traçage pour ce billet. Vous pouvez utiliser ce lien pour envoyer un ping ou faire un traçage sur ce billet à partir de votre blog. Pour copier le lien, faites un clic droit sur le lien, et sélectionnez \'Copier le lien\' dans Internet Explorer ou \'Copier le lien\' dans Mozilla.');
should be :

Code: Select all

@define('TRACKBACK_SPECIFIC_ON_CLICK', 'Ce lien n est pas fait pour être cliqué. Il contient le lien de traçage pour ce billet. Vous pouvez utiliser ce lien pour envoyer un ping ou faire un traçage sur ce billet à partir de votre blog. Pour copier le lien, faites un clic droit sur le lien, et sélectionnez Copier le lien dans Internet Explorer ou Copier le lien dans Mozilla.');
With this change, I no longer have a javascript error on IE (with mozilla no error but the onclick doesnt work)

Re: Bug with french localisation and javascript

Posted: Wed Nov 03, 2004 11:06 am
by garvinhicking
Thanks a lot for reporting! I fixed that in our current CVS.

Regards,
Garvin.

Posted: Thu Dec 23, 2004 9:18 pm
by CapriSkye
sorry another problem with utf-8 encoding. the onclick for trackback works under firefox, but it doesn't show the text correctly, just some garbage. is there a way to use the correct encoding for the onclick?

so right now to fix it i have to turn on popup windows option. thanks

Posted: Tue Dec 28, 2004 2:10 pm
by garvinhicking
Hm, can you specify in depth what doesn't work? I'm not a chinese/japanese/UTF-8 guru and don't really know what works and what not, and what specifically you mean :)

Regards,
Garvin

Posted: Tue Dec 28, 2004 5:48 pm
by Guest
you know the link that shows the warning message about trackback link isn't for clicking?
if you go here,
http://www.open.38.com/s9y/archives/8-e ... trackbacks
and click on the link with URI in it, it's a chinese site, then you'll see what i'm talking about. it doesn't show the correct encoding.

if i enable popup windows, it gets rid of that warning.
but when i click on the trackback link, for example this one,
http://www.open.38.com/s9y/comment.php? ... entry_id=8
it's not in the right encoding, shouldn't it be utf-8 since the blog is in utf-8?
also is that Danger Will Robinson message suppose to mean something? thank you for the help :)

Posted: Tue Dec 28, 2004 5:53 pm
by CapriSkye
^ that's me :lol:

Posted: Tue Dec 28, 2004 6:07 pm
by tomsommer
Anonymous wrote:also is that Danger Will Robinson message suppose to mean something? thank you for the help :)
That will never ever ever ever be changed. It's so cool, like a small easter egg :)

Posted: Tue Dec 28, 2004 8:00 pm
by Guest
oh it's an easter egg? nice :)

Posted: Wed Dec 29, 2004 4:05 pm
by garvinhicking
About your trackback problem, please edit your templates/default/entries.tpl file and there search for 'escapeall'. Change that to read 'escape' only and tell if it works.

Tom, do you know why we use escapeall instead of escape only?

And the ISO-8859-1 header is okay because the Trackback-Stuff really only outputs basic messages.

(The "Danger"-message, BTW, is a in-reference to "Lost in Space" :-)

Regards,
Garvin

Posted: Wed Dec 29, 2004 9:20 pm
by CapriSkye
actually they were all 'escape' in entries.tpl
i changed to 'escapeall' and still didn't work

Posted: Thu Dec 30, 2004 11:05 am
by garvinhicking
I am stupid and didn't tell you the right thing.

Change this:

Code: Select all

onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape:htmlall}');
to this:

Code: Select all

onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}');
Sorry for being unclear. :(

Posted: Thu Dec 30, 2004 3:40 pm
by CapriSkye
that didn't work for 0.7.1 :(

but works for 0.8

thank you very much for the help again :)