Bug with french localisation and javascript

Found a bug? Tell us!!
Post Reply
stoub
Regular
Posts: 7
Joined: Mon Oct 18, 2004 4:57 pm

Bug with french localisation and javascript

Post 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)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bug with french localisation and javascript

Post by garvinhicking »

Thanks a lot for reporting! I fixed that in our current CVS.

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CapriSkye
Regular
Posts: 119
Joined: Sun Oct 31, 2004 4:42 am
Location: Taiwan
Contact:

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post 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 :)
CapriSkye
Regular
Posts: 119
Joined: Sun Oct 31, 2004 4:42 am
Location: Taiwan
Contact:

Post by CapriSkye »

^ that's me :lol:
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post 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 :)
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
Guest

Post by Guest »

oh it's an easter egg? nice :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CapriSkye
Regular
Posts: 119
Joined: Sun Oct 31, 2004 4:42 am
Location: Taiwan
Contact:

Post by CapriSkye »

actually they were all 'escape' in entries.tpl
i changed to 'escapeall' and still didn't work
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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. :(
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CapriSkye
Regular
Posts: 119
Joined: Sun Oct 31, 2004 4:42 am
Location: Taiwan
Contact:

Post by CapriSkye »

that didn't work for 0.7.1 :(

but works for 0.8

thank you very much for the help again :)
Post Reply