#91301Wrong encoding for "displayResults"
Description
As some values in locallang.xlf file contain entities for angle brackets these have to be decoded before frontend rendering in partial Search.html
F. e.
<is:pageBrowsingResults numberOfResults="{result.count}" currentPage="{searchParams.pointer}" resultsPerPage="{searchParams.numberOfResults}" />
should be wrapped with format.htmlentitiesDecode ViewHelper
<f:format.htmlentitiesDecode><is:pageBrowsingResults numberOfResults="{result.count}" currentPage="{searchParams.pointer}" resultsPerPage="{searchParams.numberOfResults}" /></f:format.htmlentitiesDecode>Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 1
History 9
-
Benni Mack commented and changed attached Screen Shot 2020-05-12 at 15.28.55.png status
NewNeeds Feedback 05/12/20, 15:30 -
Gerhard Rupp commented 05/12/20, 22:19
Error still exists in 9.5.17 but seems to be caused by the already encoded value in the German language file.
locallang.xlf
<trans-unit id="displayResults" resname="displayResults"> <source><![CDATA[Displaying results <strong>%1$s to %2$s</strong> out of <strong>%3$s</strong>]]></source> </trans-unit>
de.locallang.xlf
<trans-unit id="displayResults" resname="displayResults" approved="yes"> <source><![CDATA[Displaying results <strong>%1$s to %2$s</strong> out of <strong>%3$s</strong>]]></source> <target state="final"><![CDATA[Anzeige der Ergebnisse <strong>%1$s bis %2$s</strong> von insgesamt <strong>%3$s</strong>]]></target> </trans-unit>
-
Georg Ringer commented 05/13/20, 09:15
this is a problem during the crowdin migration. detailed report
Original file having cdata + tags ```<source><![CDATA[Displaying results <strong>%1$s to %2$s</strong> out of <strong>%3$s</strong>]]></source>``` the export I did from pootle had this ```<trans-unit id="displayResults" resname="displayResults" approved="yes"> <source>Displaying results <strong>%1$s to %2$s</strong> out of <strong>%3$s</strong></source> <target state="translated">Anzeige der Ergebnisse <strong>%1$s bis %2$s</strong> von insgesamt <strong>%3$s</strong></target> </trans-unit>``` so no cdata for the source and no cdata on the target + using `<` instead of `<`. I uploaded those files to crowdin and now there seems to be some magic happening. I *guess* you match now the source of the file also to the real source language provided previously. However, now the source contains cdata + proper tags which is fine *but* the translations now contain cdata as well but still the original translation which is now escaped and wrong ```<trans-unit id="displayResults" resname="displayResults" approved="yes"> <source><![CDATA[Displaying results <strong>%1$s to %2$s</strong> out of <strong>%3$s</strong>]]></source> <target state="final"><![CDATA[Anzeige der Ergebnisse <strong>%1$s bis %2$s</strong> von insgesamt <strong>%3$s</strong>]]></target> </trans-unit>``` From my side it is wrong to add cdata automatically to the target but leave the content as it is. Is it correct that I need to fix that myself, also e.g. using the mass replace tool -
Georg Ringer changed Duplicated by #91386 05/13/20, 21:11
-
Georg Ringer changed category status
Needs FeedbackAccepted assigned to Georg Ringer 05/13/20, 21:12 -
Andreas Krämer commented 08/20/21, 07:25
The DE translation is working in TYPO3 10.4.20.
But the ES translation is still wrong:<trans-unit id="displayResults" resname="displayResults" approved="yes"> <source><![CDATA[Displaying results <strong>%1$s to %2$s</strong> out of <strong>%3$s</strong>]]></source> <target state="final"><![CDATA[Mostrando resultados <strong>%1$s a %2$s</strong> de <strong>%3$s</strong>]]></target> </trans-unit>I just fetched it from Crowdin. FR translation is working, too.
For now I “fixed” it this way for ES:
plugin.tx_indexedsearch._LOCAL_LANG.es.displayResults = Mostrando resultados <strong>%1$s a %2$s</strong> de <strong>%3$s</strong> -
Mathias Schreiber changed Sprint Focus Remote Sprint 03/08/22, 12:09
-
Georg Ringer commented 06/03/24, 19:56
this has been IMO fixed on crowdin, therefore closing this issue. if still valid, please contact me on slack or open a new issue and reference this one
-
Georg Ringer changed status
AcceptedClosed 06/07/24, 00:15
Hey Gerhard,
I tried to reproduce this issue with TYPO3 v10.4.1 – but without success.. maybe the change in issue #90484 already solves your issue. Can you try again with TYPO3 v9.5.17 ?