Bug #34728
closedllXmlAutoFilename will never find localized files in l10n path
0%
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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Thomas Layh over 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.
Updated by Xavier Perseguers over 12 years ago
Can you please describe your use case a bit further? When do you happen to have a file within typo3conf/l10n/ ?
Updated by Thomas Layh over 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.
Updated by Gerrit Code Review over 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
Updated by Alexander Stehlik about 10 years ago
- File languagetest.zip languagetest.zip added
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.
Updated by Gerrit Code Review about 10 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
Updated by Markus Klein about 10 years ago
- Is Regression set to No
Find an analysis of mine in #35093.
Updated by Gerrit Code Review about 10 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
Updated by Gerrit Code Review about 10 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
Updated by Gerrit Code Review about 10 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
Updated by Gerrit Code Review almost 10 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
Updated by Gerrit Code Review over 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
Updated by Markus Klein over 9 years ago
Patch was reverted and will be repushed.
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/37167
Updated by Mathias Schreiber over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 81ec05a3fc39845426f302412d53ef6480fc7c3a.
Updated by Markus Klein over 9 years ago
- Status changed from Resolved to Under Review
Updated by Markus Klein over 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.