Hi Fridolyn,

 

as an easy fix you could change the javascript to    

 

currentText: _(“Today”),

 

But I think it would be a lot nicer if we could teach the translation scripts to use escape characters in the right places. In German we normally would use double quotes and not single quotes for quoting things in text, but at the moment I am always worried to break Javascript using them.

 

Katrin

 

From: koha-translate-bounces@lists.koha-community.org [mailto:koha-translate-bounces@lists.koha-community.org] On Behalf Of Fridolyn SOMERS
Sent: Wednesday, October 17, 2012 1:08 PM
To: koha-translate@lists.koha-community.org
Subject: [Koha-translate] Javascript escape char

 

Hie,

It appears translating into fr-FR brakes Javascript in calendar.inc.
Because (line 31) :
    currentText: _('Today'),
is translated
    currentText: _('Aujourd'hui'),
Additionnal quote brakes the Javascript.

What should we do : translate with escape char ("Aujourd\\'hui" in PO)  or should translation script handle it ?
If same text is used in both Javascript and HTML, escape char can not be used.

Best regards

--
Fridolyn SOMERS
Biblibre - Pôle Support
fridolyn.somers@biblibre.com