[BUGFIX] Numeric translation keys aren't translated right in XML files 11/18211/2
authorReinhard Führicht <rf@typoheads.at>
Mon, 21 Jan 2013 08:52:35 +0000 (09:52 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 13 Mar 2013 23:16:48 +0000 (00:16 +0100)
commit746bac83951fcaeacfdbddad98a6623e2de0620e
tree3f7f1341b173c3d84d32a7f68312ebb105d05e99
parent082208cd5a1085661d37b1640923af169c47ef17
[BUGFIX] Numeric translation keys aren't translated right in XML files

When working with the "old" XML based translation files,
numeric keys aren't translated properly.
The reason is, that LocallangXmlParser uses array_merge to combine the
translation arrays of the default language and the current language.
array_merge renumbers numeric keys. Therefore, numeric key in
translation files result in wrong translations in Frontend.

Fixes: #44626
Releases: 6.0, 6.1
Change-Id: I8fdff385f681428b4cb5a3e994828a4a29305c98
Reviewed-on: https://review.typo3.org/18211
Reviewed-by: Reinhard Führicht
Tested-by: Reinhard Führicht
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php
typo3/sysext/core/Tests/Unit/Localization/Parser/Fixtures/locallangNumericKeys.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Localization/Parser/LocallangXmlParserTest.php