Revert "[BUGFIX] Invalid fallback for non-localized labels"
authorXavier Perseguers <xavier@typo3.org>
Fri, 31 Aug 2012 09:11:43 +0000 (11:11 +0200)
committerXavier Perseguers <xavier@typo3.org>
Fri, 31 Aug 2012 09:16:05 +0000 (11:16 +0200)
This reverts commit 55ff38c77f143829ed078e0f7dda12b51d76254b

Real bug is in Extbase: #36905 and #39569

Change-Id: Ie6ff57312aeb359fe4cf359c917274c6b26cbe37
Fixes: #39814
Reviewed-on: http://review.typo3.org/13800
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/core/Classes/Localization/Parser/XliffParser.php

index 0b01470..e92cf56 100644 (file)
@@ -56,18 +56,10 @@ class XliffParser extends \TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser
                                                );
                                        } else {
                                                // @todo Support "approved" attribute
-                                               if (!empty($translationElement->target)) {
-                                                       $parsedData[(string) $translationElement['id']][0] = array(
-                                                               'source' => (string) $translationElement->source,
-                                                               'target' => (string) $translationElement->target
-                                                       );
-                                               } else {
-                                                       // No target element => not yet translated
-                                                       $parsedData[(string) $translationElement['id']][0] = array(
-                                                               'source' => (string) $translationElement->source,
-                                                               'target' => (string) $translationElement->source
-                                                       );
-                                               }
+                                               $parsedData[(string) $translationElement['id']][0] = array(
+                                                       'source' => (string) $translationElement->source,
+                                                       'target' => (string) $translationElement->target
+                                               );
                                        }
                                } elseif (($translationElement->getName() === 'group' && isset($translationElement['restype'])) && (string) $translationElement['restype'] === 'x-gettext-plurals') {
                                        // This is a translation with plural forms
@@ -84,18 +76,10 @@ class XliffParser extends \TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser
                                                                );
                                                        } else {
                                                                // @todo Support "approved" attribute
-                                                               if (!empty($translationPluralForm->target)) {
-                                                                       $parsedTranslationElement[(int) $formIndex] = array(
-                                                                               'source' => (string) $translationPluralForm->source,
-                                                                               'target' => (string) $translationPluralForm->target
-                                                                       );
-                                                               } else {
-                                                                       // No target element => not yet translated
-                                                                       $parsedTranslationElement[(int) $formIndex] = array(
-                                                                               'source' => (string) $translationPluralForm->source,
-                                                                               'target' => (string) $translationPluralForm->source
-                                                                       );
-                                                               }
+                                                               $parsedTranslationElement[(int) $formIndex] = array(
+                                                                       'source' => (string) $translationPluralForm->source,
+                                                                       'target' => (string) $translationPluralForm->target
+                                                               );
                                                        }
                                                }
                                        }