Project

General

Profile

Actions

Bug #34728

closed

llXmlAutoFilename will never find localized files in l10n path

Added by Thomas Layh about 12 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-03-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If the parameter $sameLocation in function llXmlAutoFileName is set to false, like it is as default, it will never return a file name.

$location is set to "typo3conf/l10n" and since there is a condition missing, $validatePrefix will never get a path and then the function will always return NULL.

Adding another condition that checks for the l10n path resolves the problem.

Pushing a patch to review in a minute.


Files

languagetest.zip (4.2 KB) languagetest.zip Alexander Stehlik, 2014-11-17 21:59

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #65273: Using XLIFF translation files located in non-extension folders does not workClosedMarkus Klein2015-02-24

Actions
Actions #1

Updated by Gerrit Code Review about 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9535

Actions #2

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9535

Actions #3

Updated by Thomas Layh about 12 years ago

Update: Kind of confused tonight. It has nothing to do with the parameter $sameLocation, the problem is, if the parameter $fileRef contains a path to typo3conf/l10n the function will always return NULL.

Actions #4

Updated by Xavier Perseguers about 12 years ago

Can you please describe your use case a bit further? When do you happen to have a file within typo3conf/l10n/ ?

Actions #5

Updated by Thomas Layh about 12 years ago

I am calling the following from inside my xliff translation tool to get the parsed data:

$xliffParser = t3lib_div::makeInstance('t3lib_l10n_parser_Xliff');
$data = $xliffParser->getParsedData($fileRef, $languageKey);

and getParsedData is calling the llXmlAutoFileName function then.

Perhaps I am using the function for something it is not supposed to do, but I don't see a reason why.

Actions #6

Updated by Gerrit Code Review about 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9535

Actions #7

Updated by Alexander Stehlik over 9 years ago

After trying to recap, why I watched this issue in the first place, I post some test instructions to make the issue clear.

Copy the files from the attached ZIP into a current master installation.

Then install the testext in the Extension Manager.

Now place the following code in a TypoScript template:

config.language = de
page = PAGE
page.10 = TEXT
page.10.data = LLL:EXT:testext/Resources/Private/Language/locallang.xlf:mylabel
page.20 = TEXT
page.20.data = LLL:fileadmin/translation/locallang.xlf:mylabel2

You will see that the first label ist translated correctly to German but the second example stays English.

I think you could do a simple cleanup in GeneralUtility::llXmlAutoFileName() to solve this issue.

Actions #8

Updated by Gerrit Code Review over 9 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34285

Actions #9

Updated by Markus Klein over 9 years ago

  • Is Regression set to No

Find an analysis of mine in #35093.

Actions #10

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34285

Actions #11

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34285

Actions #12

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34285

Actions #13

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34285

Actions #14

Updated by Gerrit Code Review about 9 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34285

Actions #15

Updated by Markus Klein about 9 years ago

Patch was reverted and will be repushed.

Actions #16

Updated by Gerrit Code Review about 9 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37167

Actions #17

Updated by Mathias Schreiber about 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #18

Updated by Markus Klein about 9 years ago

  • Status changed from Resolved to Under Review
Actions #19

Updated by Markus Klein about 9 years ago

  • Status changed from Under Review to Closed
  • % Done changed from 100 to 0

Closing this as duplicate/related to #65273.
Please continue any discussion there.

Actions

Also available in: Atom PDF