in staff, the french version of cgi-bin/koha/tools/stage-marc-import.pl have this line into a javascript's function : alert(_('Echec de l'envoi du formulaire : ') + textStatus); (original text : alert(_('Failed to submit form: ') + textStatus);) the single quote isn't escaped
Created attachment 7103 [details] [review] fix 7433
to test : misc/translator$ ./translate install fr-FR select fr-FR on language syspref go to cgi-bin/koha/tools/stage-marc-import.pl import a file (clic on "Télécharger fichier") and clic on "traiter pour import" if it works, it's ok
Stephane, wouldn't another option be to fix the po file? So that the ' is escaped? If that isn't a possibility then let me know and I can test and sign off on this.
it is possible to escape the character but is more common to have a text containing ' rather than " so it seems more appropriate to apply this patch, rather than to escape the character '
I think it depends on the language. For example we don't use single quotes in German, but we would use "" for quoting of words. Perhaps a solution would be to fix the translation scripts. So when they find an ' or " in a _javascript_ string, the characters are escaped. Note: Translation of javascript is also problematic for concatenated strings (see bug 7327).