http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8942
--- Comment #16 from Fridolyn SOMERS <[email protected]> --- After reflexion, I think it is no good idea to have an automatic quote escape. For example, if you have a single quote in a double quote string (or opposite) : _("Aujourd'hui") will become _("Aujourd\'hui"), the backslash will be displayed. Also, like Marcel example, there might be problems with HTML added in JS. For example : $("#id").html("<span title=\"" + _("Dangerous") + "\" />") will generate <span title="Dangerous" /> In this case, the translation must not contain a double quotes, even escaped: $("#id").html("<span title=\"" + _("\"Danger\"") + "\" />") will generate <span title=""Danger"" />, bad HTML. I've looked at http://wiki.koha-community.org/wiki/Coding_Guidelines. In JavaScript section, double quotes are always used : _("xxx"). Looking at code, double quotes are used 2629 time and single quotes only 143 times. So if we always use double quotes, single quotes are not a problem anymore and it was the main problem (it is often used in French). I've looked at French PO, double quotes are actually never used in JavaScript translation ; it can be managed one by one. I've looked at old version of calendar, it used double quotes, that's why there was no problem with Today => Aujourd'hui. I will propose a patch for that. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
