Bug 7433 - french translation add a bad single quote into js function
Summary: french translation add a bad single quote into js function
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: 3.6
Hardware: All All
: PATCH-Sent (DO NOT USE) minor
Assignee: Stéphane Delaune
QA Contact: Ian Walls
URL: cgi-bin/koha/tools/stage-marc-import.pl
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 14:00 UTC by Stéphane Delaune
Modified: 2012-10-26 00:51 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
fix 7433 (1.03 KB, patch)
2012-01-10 14:17 UTC, Stéphane Delaune
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Delaune 2012-01-10 14:00:47 UTC
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
Comment 1 Stéphane Delaune 2012-01-10 14:17:33 UTC
Created attachment 7103 [details] [review]
fix 7433
Comment 2 Stéphane Delaune 2012-01-10 14:22:28 UTC
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
Comment 3 Chris Cormack 2012-01-13 06:53:14 UTC
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.
Comment 4 Stéphane Delaune 2012-01-18 10:03:19 UTC
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 '
Comment 5 Katrin Fischer 2012-01-18 10:23:58 UTC
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).