[BUGFIX] htmlArea RTE: .titleText not localized to English
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 4 Aug 2011 16:00:47 +0000 (12:00 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 4 Aug 2011 16:05:01 +0000 (18:05 +0200)
classesAnchor.[id-string].titleText is not localized when the
language of the content element is English, English being an
alternate language.

Change-Id: I15bf95534c51bcd4f80b08e04ed2bcc9042f3656
Fixes: #28767
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/4111
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php

index 5d08d37..7f7b58b 100644 (file)
@@ -293,7 +293,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        if ($this->language=='default' || !$this->language)     {
                                $this->language='en';
                        }
-                       $this->contentTypo3Language = $this->language;
+                       $this->contentTypo3Language = ($this->language == 'en') ? 'default' : $this->language;
                        $this->contentISOLanguage = 'en';
                        $this->contentLanguageUid = ($row['sys_language_uid'] > 0) ? $row['sys_language_uid'] : 0;
                        if (t3lib_extMgm::isLoaded('static_info_tables')) {
@@ -309,7 +309,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                                        $res = $TYPO3_DB->exec_SELECTquery($selectFields, $tableAB, $whereClause);
                                        while($languageRow = $TYPO3_DB->sql_fetch_assoc($res)) {
                                                $this->contentISOLanguage = strtolower(trim($languageRow['lg_iso_2']).(trim($languageRow['lg_country_iso_2'])?'_'.trim($languageRow['lg_country_iso_2']):''));
-                                               $this->contentTypo3Language = strtolower(trim($languageRow['lg_typo3']));
+                                               $this->contentTypo3Language = trim($languageRow['lg_typo3']) ? strtolower(trim($languageRow['lg_typo3'])) : 'default';
                                        }
                                } else {
                                        $this->contentISOLanguage = trim($this->thisConfig['defaultContentLanguage']) ? trim($this->thisConfig['defaultContentLanguage']) : 'en';
@@ -318,7 +318,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                                        $whereClause = 'lg_iso_2 = ' . $TYPO3_DB->fullQuoteStr(strtoupper($this->contentISOLanguage), $tableAB);
                                        $res = $TYPO3_DB->exec_SELECTquery($selectFields, $tableAB, $whereClause);
                                        while($languageRow = $TYPO3_DB->sql_fetch_assoc($res)) {
-                                               $this->contentTypo3Language = strtolower(trim($languageRow['lg_typo3']));
+                                               $this->contentTypo3Language = trim($languageRow['lg_typo3']) ? strtolower(trim($languageRow['lg_typo3'])) : 'default';
                                        }
                                }
                        }