Project

General

Profile

Actions

Bug #44626

closed

Numeric translation keys aren't translated right in XML files

Added by Reinhard Führicht over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
Start date:
2013-01-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When working with the "old" XML based translation files, numeric keys aren't translated properly.

Example:

<languageKey index="default" type="array">
    <label index="1">1</label>
    <label index="2">2</label>
    <label index="3">3</label>

    <label index="11">11</label>
    <label index="22">22</label>
    <label index="33">33</label>
</languageKey>

Output:

2
3
11

33

I investigated this issue and found out that "LocallangXmlParser" in typo3/sysext/core/Classes/Localization/Parser uses array_merge to combine the translation arrays of the default language and the current language.

Problem

array_merge renumbers numeric keys. Therefore, numeric key in translation files result in wrong translations in Frontend.

Actions #1

Updated by Gerrit Code Review over 11 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 https://review.typo3.org/17615

Actions #2

Updated by Gerrit Code Review about 11 years ago

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

Actions #3

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/17615

Actions #4

Updated by Gerrit Code Review about 11 years ago

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

Actions #5

Updated by Gerrit Code Review about 11 years ago

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

Actions #6

Updated by Reinhard Führicht about 11 years ago

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

Updated by Gerrit Code Review about 11 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18211

Actions #8

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch master_new has been pushed to the review server.
It is available at https://review.typo3.org/18637

Actions #9

Updated by Christian Kuhn about 11 years ago

  • Status changed from Under Review to Resolved
Actions #10

Updated by Oliver Hader about 11 years ago

  • Target version changed from 6.1.0 to 6.1.0-alpha1
Actions #11

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF