[TASK] Remove locallang.php handling from Configuration 43/33943/3
authorBenjamin Mack <benni@typo3.org>
Mon, 10 Nov 2014 12:28:01 +0000 (13:28 +0100)
committerBenjamin Mack <benni@typo3.org>
Mon, 10 Nov 2014 13:46:16 +0000 (14:46 +0100)
The locallang.php handling was deprecated
with the introduction of xlf files in TYPO3 CMS 4.6.

However, it is still used as fallback, although
not used in the TYPO3 Core.

For CMS 7, the option is disabled by default
and the needed class is deprecated.

Resolves: #62819
Releases: master
Change-Id: Idc4ee10925c0c4d6480f99e7ed5c40961f621eef
Reviewed-on: http://review.typo3.org/33943
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Classes/Localization/Parser/LocallangArrayParser.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-62819-LocalizationWithPHPFiles.rst [new file with mode: 0644]

index 34bb148..3a9f2a5 100644 (file)
@@ -19,6 +19,9 @@ namespace TYPO3\CMS\Core\Localization\Parser;
  *
  * @author Dominique Feyer <dfeyer@reelpeek.net>
  * @author Dmitry Dulepov <dmitry.dulepov@gmail.com>
+ *
+ * @deprecated since TYPO3 CMS 7, the class + file will be removed in CMS 8. Please use XLF files for
+ * translation handling. Also note that the extension "extdeveval" has a converter from PHP and XML to XLF.
  */
 class LocallangArrayParser implements LocalizationParserInterface {
 
@@ -50,9 +53,11 @@ class LocallangArrayParser implements LocalizationParserInterface {
        /**
         * Initializes the parser.
         *
+        * @deprecated since TYPO3 CMS 7, will be removed in CMS 8. Use xlf format for parsing translations
         * @return void
         */
        public function __construct() {
+               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
                $this->createCsConvObject();
        }
 
index 540cb4b..57298f7 100644 (file)
@@ -48,10 +48,9 @@ return array(
                // System related concerning both frontend and backend.
                'lang' => array(
                        'format' => array(
-                               'priority' => 'xlf,xml,php'
+                               'priority' => 'xlf,xml'
                        ),
                        'parser' => array(
-                               'php' => 'TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangArrayParser',
                                'xml' => 'TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangXmlParser',
                                'xlf' => 'TYPO3\\CMS\\Core\\Localization\\Parser\\XliffParser'
                        )
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-62819-LocalizationWithPHPFiles.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-62819-LocalizationWithPHPFiles.rst
new file mode 100644 (file)
index 0000000..9a1971c
--- /dev/null
@@ -0,0 +1,38 @@
+==================================================
+Breaking: #62819 - Remove php Localization Support
+==================================================
+
+Description
+===========
+
+The support for php files in localization, e.g. locallang.php files was deprecated with TYPO3 CMS 4.6. All translations
+are done with XLF in the core, XML files are still supported.
+
+The parsing of PHP localization files is now disabled by default, the parsing class is now deprecated.
+
+
+Impact
+======
+
+Extensions using locallang.php files for translation will not show labels anymore.
+
+
+Affected installations
+======================
+
+All installations with third-party extensions using locallang.php translation files.
+
+
+Migration
+=========
+
+Third-party extensions should migrate their translation files to the XLIFF format (XLF file extension). The extension
+development extension (Extension Key "extdeveval") can be used to transform locallang.php files to according XLF files.
+
+Until this is done, it is possible to enable this option again by adding the following lines to
+typo3conf/AdditionalConfiguration.php:
+
+.. code-block:: php
+
+       $GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['format']['priority'] = 'xlf,xml,php';
+       $GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['format']['parser']['php'] = 'TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangArrayParser';