Bug #28280
closed
Line breaks in XLF translation causes JS error
Added by Björn Pedersen over 13 years ago.
Updated over 9 years ago.
Description
The xlf files for workspace contain some line breaks (livePreviewDetail). This causes a JS error.
unterminated string literal
livePreviewDetail: 'Click this elem...rsion and see the live version of the
The generated JS:
TYPO3.LLL.Workspaces = {
visualPreview: 'Visual preview',
listView: 'List view',
livePreview: 'Live',
livePreviewDetail: 'Click this element to hide the workspace version and see the live version of the
page.
',
...
- Status changed from New to Closed
Closed as duplicate (and already fixed in workspace trunk)
In my opinion the fix in WS is only partial: it relies on the formatting of the file.
A better fix would be in the XLIFF part to remove linebreaks outside of [!CDATA[... ]] parts in general.
I'll have another look later today, especially at how it was done in the pre-xlf century ;)
- Subject changed from Line breaks in xlf trasnslation casue js error to Line breaks in XLF translation causes JS error
- Status changed from Closed to New
Re-openend for more discussion.
@Susanne - good chance this only showed up because of the workaround of the workspaces preview-module which is required because we open a module outside of the normally surrounding backend panels.
I have to update my comment even more:
line breaks are not allowed in JS strings, so line breaks from the xlf-files and xml-files should never propagate unescaped to the javascript.
Testing some of the multi line strings in locallang_core.xlf, it seems this one has been fixed (git master as of today).
- Status changed from New to Needs Feedback
- Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.7)?
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Also available in: Atom
PDF