Summary: | img tags in xslt broken after automatic translation | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | I18N/L10N | Assignee: | Chris Cormack <chris> |
Status: | CLOSED FIXED | QA Contact: | Bugs List <koha-bugs> |
Severity: | major | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | cnighswonger, f.demians, fridolin.somers, gmcharlt |
Version: | rel_3_2 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | Proposed patch |
Description
Chris Cormack
2010-05-21 01:27:35 UTC
Patch sent. Created attachment 2248 [details] [review] Proposed patch I applied Chris' patch on my test installation with current master and recreated the German template files. Result and detail pages were displayed correctly. After that I tried for French and Spanish, but it did not work. The img tags in all files look right to me. I will try to retest this later, perhaps someone else can test too. Patch pushed - please test and advise if this fixess the problem. I can confirm that the problem with img tags is fixed now. --------- I investigated a bit more, why my tests with French and Spanish were not successful: French: The result list for French does not work, because the xml file can't handle " " in the translated text. The html entities were entered in pootle: Copies available for reference: Exemplaires disponibles sur place : The result page worked after I deleted all nbsp entities. [Fri Jun 18 10:48:38 2010] [error] [client 193.197.29.224] /home/koha/kohaclone/koha-tmpl/opac-tmpl/prog/fr-FR/xslt/MARC21slim2OPACResults.xsl:973: parser error : Entity 'nbsp' not defined, referer: http://193.197.29.146/cgi-bin/koha/opac-detail.pl?biblionumber=2 [Fri Jun 18 10:48:38 2010] [error] [client 193.197.29.224] Premature end of script headers: opac-search.pl, referer: http://193.197.29.146/cgi-bin/koha/opac-detail.pl?biblionumber=2 [Fri Jun 18 10:48:39 2010] [error] [client 193.197.29.224] [Fri Jun 18 10:48:39 2010] 500.pl: PARAM:LOOP:next_loop:hash pointer was expected but not found at /usr/lib/perl5/HTML/Template/Pro.pm line 191., referer: http://193.197.29.146/cgi-bin/koha/opac-detail.pl?biblionumber=2 --------- Spanish: It seems that the opac xslt files are not created. The old files with wrong image tags remained. I tried to delete the xslt files and run 'translate install es-ES'. No new files were created. There is one error for opac files in the process output: Creating /home/koha/kohaclone/koha-tmpl/opac-tmpl/prog/es-ES/modules/opac-sendbasket.tmpl... % l: Unknown or unsupported format specification Charset in/out: UTF-8 at /home/koha/kohaclone/misc/translator/tmpl_process3.pl line 265. Updating version as described in http://wiki.koha-community.org/wiki/General_IRC_Meeting,_7_July_2010 In French any English sentence like 'label:' is translated into 'french label :' because French typographic rules impose to have a white space before ':'. is an entity reference. It comes from PO files and is added in .tmpl and now in .xsl files. It works with .tmpl files. It doesn't with .xsl files. The .tmpl tokenizer hasn't been designed to handle properly xml files. I see three solutions: 1. It would work if in the .po files   was used rather thant So opac and intranet .po files should be modified and reload into Pootle. 2. XSL files are modified: an XML entity is added for nbsp. tmpl_process3.pl is modified to handle specifically <DOCTYPE> and <ENTITY> directives. 3. XSL files are tokenized independently than .tmpl files. This is the best solution for the long run. (In reply to comment #8) > Solution 2: > > http://lists.koha-community.org/pipermail/koha-patches/2010-July/012259.html Why not modify the po files with   where xslt occures ? (In reply to comment #8) > Solution 2: > > http://lists.koha-community.org/pipermail/koha-patches/2010-July/012259.html Why not modify the po files with   where xslt occures ?(In reply to comment #9) > (In reply to comment #8) > > Solution 2: > > > > http://lists.koha-community.org/pipermail/koha-patches/2010-July/012259.html > > Why not modify the po files with   where xslt occures ? More efficient : define a different po file for xslt files. > Why not modify the po files with   where xslt occures ? It could be a solution but I'm almost sure that are added automatically and blindly by whichever .po file editor is used by translators. > More efficient : define a different po file for xslt files. I agree. That's my point 3... http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4472#c7 It implies developing a new XSL file tokenizer and a new way to insert translated string into XSL files (translate install). This patch fixes this bug in Intranet detail page, for UNIMARC DB: http://lists.koha-community.org/pipermail/koha-patches/2010-October/012687.html (In reply to comment #12) > This patch fixes this bug in Intranet detail page, for UNIMARC DB: > > http://lists.koha-community.org/pipermail/koha-patches/2010-October/012687.html Patch pushed to HEAD for inclusion in 3.2. Changing bug priority and moving to 3.4, now that remaining nbsp fix is in place. Patch for MARC21 pushed also, please test and close This bug is mentioned in: Bug 4472 Fix how &nbsp; are injected into XSL files http://lists.koha-community.org/pipermail/koha-patches/2010-October/012640.html This bug has a patch presently committed to HEAD and 3.2.x. Please take the appropriate action to update the status of this bug. Remember, bugs which have been resolved should be tested and marked closed, preferably by the original reporter. This is still waiting on testing. Tested in 3.2.1: Intranet detail view with MARC21 in French is still broken. OPAC works fine. Follow up patch not pushed? This bug has a fix which was committed to the 3.2.x branch and released in 3.2.1. Please take time to update the status of this bug and mark it RESOLVED FIXED so that it may be closed. This bug is mentioned in: Bug 4472 Apply it to MARC21 http://lists.koha-community.org/pipermail/koha-patches/2010-November/012831.html Retested in current 3.2.1 and intranet detail view for MARC21 in French is still broken. OPAC works fine. Follow up patch not pushed? I think this patch is still missing in 3.2 - causing the problems with French/MARC21: http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=c616cb5081b4e96a586fae1e5601d5d495c8794d (In reply to comment #23) > I think this patch is still missing in 3.2 - causing the problems with > French/MARC21: > > http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=c616cb5081b4e96a586fae1e5601d5d495c8794d See the following 3.2.x commit: http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=b326530722895a1fd7fa4e0a97e001930ac49083 I will retest... perhaps the logs or something else will tell me what the problem is. Successfully tested fr-FR, XSLT ON, MARC21 on master and 3.2.x |