Project

General

Profile

Actions

Bug #70867

open

Use or lack of xml:space="preserve" is not respected

Added by Xavier Perseguers over 8 years ago. Updated over 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Start date:
2015-10-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Xlf
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

Line breaks are not properly handled in XLIFF.

See https://msdn.microsoft.com/en-us/library/ms256097(v=vs.110).aspx for background.

Problem

Having a XLIFF like that:

<trans-unit id="settings.tika_jar_path">
    <source>Tika Application Path: Path to your Apache Tika application jar file (tika-app-x.x.jar). This
        path may be relative to the root of your website or absolute. Download the jar from:
        https://tika.apache.org/download.html
    </source>
</trans-unit>

A call to \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate does not return the expected string.

Expected string

Tika Application Path: Path to your Apache Tika application jar file (tika-app-x.x.jar). This path may be relative to the root of your website or absolute. Download the jar from: http://tika.apache.org/download.html

Actual string

Tika Application Path: Path to your Apache Tika application jar file (tika-app-x.x.jar). This
        path may be relative to the root of your website or absolute. Download the jar from:
        https://tika.apache.org/download.html

Additional information

Line breaks and blank spaces in XML should only be respected if the XLIFF is written as:

<trans-unit id="settings.tika_jar_path" xml:space="preserve">
    <source>Tika Application Path: Path to your Apache Tika application jar file (tika-app-x.x.jar). This
        path may be relative to the root of your website or absolute. Download the jar from:
        https://tika.apache.org/download.html
    </source>
</trans-unit>

Mind the xml:space="preserve" in trans-unit tag.


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #70864: Missing space after colon in Extension ManagerClosedXavier Perseguers2015-10-20

Actions
Related to TYPO3 Core - Task #89334: Unify retrieving strings from XLIFF filesAccepted2019-10-03

Actions
Actions #1

Updated by Xavier Perseguers over 8 years ago

  • Description updated (diff)
Actions #2

Updated by Xavier Perseguers over 8 years ago

  • Description updated (diff)
Actions #3

Updated by Xavier Perseguers over 8 years ago

  • Target version set to 8 LTS
Actions #4

Updated by Benni Mack about 7 years ago

  • Target version changed from 8 LTS to Candidate for patchlevel
Actions #5

Updated by Georg Ringer over 4 years ago

  • Tags set to Xlf
Actions #6

Updated by Georg Ringer over 4 years ago

  • Related to Task #89334: Unify retrieving strings from XLIFF files added
Actions

Also available in: Atom PDF