[TASK] EXT:tstemplate Uniform extension directory structure 81/41781/3
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 21 Jul 2015 15:04:32 +0000 (17:04 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 21 Jul 2015 16:45:40 +0000 (18:45 +0200)
Moved the code from the ts directory to the Modules/TsTemplate/ directory.
Move language files to Resources/Private/Language/

Resolves: #68431
Releases: master
Change-Id: I384a976d34a0b5d835b23492b2001d3dd3e64102
Reviewed-on: http://review.typo3.org/41781
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Modules/TsTemplate/index.php [new file with mode: 0644]
typo3/sysext/tstemplate/Resources/Private/Language/locallang.xlf [new file with mode: 0644]
typo3/sysext/tstemplate/Resources/Private/Language/locallang_mod.xlf [new file with mode: 0644]
typo3/sysext/tstemplate/ext_tables.php
typo3/sysext/tstemplate/ts/clear.gif [deleted file]
typo3/sysext/tstemplate/ts/index.php [deleted file]
typo3/sysext/tstemplate/ts/locallang.xlf [deleted file]
typo3/sysext/tstemplate/ts/locallang_mod.xlf [deleted file]

index a17fea5..6dd8c8e 100755 (executable)
@@ -95,7 +95,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass {
         * Constructor
         */
        public function __construct() {
-               $this->getLanguageService()->includeLLFile('EXT:tstemplate/ts/locallang.xlf');
+               $this->getLanguageService()->includeLLFile('EXT:tstemplate/Resources/Private/Language/locallang.xlf');
 
                $this->MCONF = array(
                        'name' => $this->moduleName
diff --git a/typo3/sysext/tstemplate/Modules/TsTemplate/index.php b/typo3/sysext/tstemplate/Modules/TsTemplate/index.php
new file mode 100644 (file)
index 0000000..4215698
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+$GLOBALS['SOBE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class);
+$GLOBALS['SOBE']->init();
+
+// Checking for first level external objects
+$GLOBALS['SOBE']->checkExtObj();
+$GLOBALS['SOBE']->clearCache();
+$GLOBALS['SOBE']->main();
+$GLOBALS['SOBE']->printContent();
diff --git a/typo3/sysext/tstemplate/Resources/Private/Language/locallang.xlf b/typo3/sysext/tstemplate/Resources/Private/Language/locallang.xlf
new file mode 100644 (file)
index 0000000..4d8c23b
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415815007" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="tstemplate">
+               <header/>
+               <body>
+                       <trans-unit id="moduleTitle">
+                               <source>Template tools</source>
+                       </trans-unit>
+                       <trans-unit id="templateAnalyzer">
+                               <source>Template Analyzer</source>
+                       </trans-unit>
+                       <trans-unit id="constantEditor">
+                               <source>Constant Editor</source>
+                       </trans-unit>
+                       <trans-unit id="infoModify">
+                               <source>Info/Modify</source>
+                       </trans-unit>
+                       <trans-unit id="objectBrowser">
+                               <source>TypoScript Object Browser</source>
+                       </trans-unit>
+                       <trans-unit id="viewTemplates">
+                               <source>Viewing templates of</source>
+                       </trans-unit>
+                       <trans-unit id="pageName">
+                               <source>Page name</source>
+                       </trans-unit>
+                       <trans-unit id="templates">
+                               <source>Templates</source>
+                       </trans-unit>
+                       <trans-unit id="isRoot">
+                               <source>Is Root?</source>
+                       </trans-unit>
+                       <trans-unit id="isExt">
+                               <source>Is Ext?</source>
+                       </trans-unit>
+                       <trans-unit id="overview">
+                               <source>This is an overview of the pages in the database containing one or more template records. Click a page title to go to the page.</source>
+                       </trans-unit>
+                       <trans-unit id="areYouSure">
+                               <source>Are you sure you want to do this?</source>
+                       </trans-unit>
+                       <trans-unit id="noTemplate">
+                               <source>No template</source>
+                       </trans-unit>
+                       <trans-unit id="noTemplateDescription">
+                               <source>There was no template on this page!</source>
+                       </trans-unit>
+                       <trans-unit id="createTemplate">
+                               <source>Create a template record first in order to edit constants!</source>
+                       </trans-unit>
+                       <trans-unit id="createTemplateToEditConfiguration">
+                               <source>You need to create a template record below in order to edit your configuration.</source>
+                       </trans-unit>
+                       <trans-unit id="newWebsite">
+                               <source>Create new website</source>
+                       </trans-unit>
+                       <trans-unit id="newWebsiteDescription">
+                               <source>If you want this page to be the root of a new website, optionally based on one of the standard templates, then press the button below:</source>
+                       </trans-unit>
+                       <trans-unit id="newWebsiteAction">
+                               <source>Create template for a new site</source>
+                       </trans-unit>
+                       <trans-unit id="extTemplate">
+                               <source>Create extension template</source>
+                       </trans-unit>
+                       <trans-unit id="extTemplateDescription">
+                               <source>An extension template allows you to enter TypoScript values that will affect only this page and subpages.</source>
+                       </trans-unit>
+                       <trans-unit id="extTemplateAction">
+                               <source>Click here to create an extension template.</source>
+                       </trans-unit>
+                       <trans-unit id="goToClosest">
+                               <source>Go to closest page with template</source>
+                       </trans-unit>
+                       <trans-unit id="goToClosestDescription">
+                               <source>Closest template is on page '%s' (uid %s).</source>
+                       </trans-unit>
+                       <trans-unit id="goToClosestAction">
+                               <source>Click here to go.</source>
+                       </trans-unit>
+                       <trans-unit id="titleNewSiteStandard">
+                               <source>NEW SITE, based on standard</source>
+                       </trans-unit>
+                       <trans-unit id="titleNewSite">
+                               <source>NEW SITE</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_mod.xlf b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_mod.xlf
new file mode 100644 (file)
index 0000000..774632c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415815008" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="tstemplate">
+               <header/>
+               <body>
+                       <trans-unit id="mlang_labels_tablabel">
+                               <source>Template tools</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_labels_tabdescr">
+                               <source>Here you manage the TypoScript templates which are in charge of the look of your website on the frontend. The module provides specialized features like an object browser, a constant editor and raw editing facilities.&lt;br /&gt;&lt;em&gt;Access for 'admin' users only!&lt;/em&gt;</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_tabs_tab">
+                               <source>Template</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
index 3938174..cc5dcc9 100644 (file)
@@ -6,16 +6,16 @@ if (TYPO3_MODE === 'BE') {
                'web',
                'ts',
                '',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('tstemplate') . 'ts/',
+               'EXT:tstemplate/Modules/TsTemplate/',
                array(
                        'script' => '_DISPATCH',
                        'access' => 'admin',
                        'name' => 'web_ts',
                        'labels' => array(
                                'tabs_images' => array(
-                                       'tab' => '../Resources/Public/Icons/module-tstemplate.svg',
+                                       'tab' => 'EXT:tstemplate/Resources/Public/Icons/module-tstemplate.svg',
                                ),
-                               'll_ref' => 'LLL:EXT:tstemplate/ts/locallang_mod.xlf',
+                               'll_ref' => 'LLL:EXT:tstemplate/Resources/Private/Language/locallang_mod.xlf',
                        ),
                )
        );
@@ -24,28 +24,28 @@ if (TYPO3_MODE === 'BE') {
                'web_ts',
                \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController::class,
                NULL,
-               'LLL:EXT:tstemplate/ts/locallang.xlf:constantEditor'
+               'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:constantEditor'
        );
 
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
                'web_ts',
                \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController::class,
                NULL,
-               'LLL:EXT:tstemplate/ts/locallang.xlf:infoModify'
+               'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:infoModify'
        );
 
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
                'web_ts',
                \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController::class,
                NULL,
-               'LLL:EXT:tstemplate/ts/locallang.xlf:objectBrowser'
+               'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:objectBrowser'
        );
 
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
                'web_ts',
                \TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController::class,
                NULL,
-               'LLL:EXT:tstemplate/ts/locallang.xlf:templateAnalyzer'
+               'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:templateAnalyzer'
        );
 
 }
diff --git a/typo3/sysext/tstemplate/ts/clear.gif b/typo3/sysext/tstemplate/ts/clear.gif
deleted file mode 100644 (file)
index e1d2d83..0000000
Binary files a/typo3/sysext/tstemplate/ts/clear.gif and /dev/null differ
diff --git a/typo3/sysext/tstemplate/ts/index.php b/typo3/sysext/tstemplate/ts/index.php
deleted file mode 100644 (file)
index 4215698..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-$GLOBALS['SOBE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class);
-$GLOBALS['SOBE']->init();
-
-// Checking for first level external objects
-$GLOBALS['SOBE']->checkExtObj();
-$GLOBALS['SOBE']->clearCache();
-$GLOBALS['SOBE']->main();
-$GLOBALS['SOBE']->printContent();
diff --git a/typo3/sysext/tstemplate/ts/locallang.xlf b/typo3/sysext/tstemplate/ts/locallang.xlf
deleted file mode 100644 (file)
index 4d8c23b..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415815007" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="tstemplate">
-               <header/>
-               <body>
-                       <trans-unit id="moduleTitle">
-                               <source>Template tools</source>
-                       </trans-unit>
-                       <trans-unit id="templateAnalyzer">
-                               <source>Template Analyzer</source>
-                       </trans-unit>
-                       <trans-unit id="constantEditor">
-                               <source>Constant Editor</source>
-                       </trans-unit>
-                       <trans-unit id="infoModify">
-                               <source>Info/Modify</source>
-                       </trans-unit>
-                       <trans-unit id="objectBrowser">
-                               <source>TypoScript Object Browser</source>
-                       </trans-unit>
-                       <trans-unit id="viewTemplates">
-                               <source>Viewing templates of</source>
-                       </trans-unit>
-                       <trans-unit id="pageName">
-                               <source>Page name</source>
-                       </trans-unit>
-                       <trans-unit id="templates">
-                               <source>Templates</source>
-                       </trans-unit>
-                       <trans-unit id="isRoot">
-                               <source>Is Root?</source>
-                       </trans-unit>
-                       <trans-unit id="isExt">
-                               <source>Is Ext?</source>
-                       </trans-unit>
-                       <trans-unit id="overview">
-                               <source>This is an overview of the pages in the database containing one or more template records. Click a page title to go to the page.</source>
-                       </trans-unit>
-                       <trans-unit id="areYouSure">
-                               <source>Are you sure you want to do this?</source>
-                       </trans-unit>
-                       <trans-unit id="noTemplate">
-                               <source>No template</source>
-                       </trans-unit>
-                       <trans-unit id="noTemplateDescription">
-                               <source>There was no template on this page!</source>
-                       </trans-unit>
-                       <trans-unit id="createTemplate">
-                               <source>Create a template record first in order to edit constants!</source>
-                       </trans-unit>
-                       <trans-unit id="createTemplateToEditConfiguration">
-                               <source>You need to create a template record below in order to edit your configuration.</source>
-                       </trans-unit>
-                       <trans-unit id="newWebsite">
-                               <source>Create new website</source>
-                       </trans-unit>
-                       <trans-unit id="newWebsiteDescription">
-                               <source>If you want this page to be the root of a new website, optionally based on one of the standard templates, then press the button below:</source>
-                       </trans-unit>
-                       <trans-unit id="newWebsiteAction">
-                               <source>Create template for a new site</source>
-                       </trans-unit>
-                       <trans-unit id="extTemplate">
-                               <source>Create extension template</source>
-                       </trans-unit>
-                       <trans-unit id="extTemplateDescription">
-                               <source>An extension template allows you to enter TypoScript values that will affect only this page and subpages.</source>
-                       </trans-unit>
-                       <trans-unit id="extTemplateAction">
-                               <source>Click here to create an extension template.</source>
-                       </trans-unit>
-                       <trans-unit id="goToClosest">
-                               <source>Go to closest page with template</source>
-                       </trans-unit>
-                       <trans-unit id="goToClosestDescription">
-                               <source>Closest template is on page '%s' (uid %s).</source>
-                       </trans-unit>
-                       <trans-unit id="goToClosestAction">
-                               <source>Click here to go.</source>
-                       </trans-unit>
-                       <trans-unit id="titleNewSiteStandard">
-                               <source>NEW SITE, based on standard</source>
-                       </trans-unit>
-                       <trans-unit id="titleNewSite">
-                               <source>NEW SITE</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/tstemplate/ts/locallang_mod.xlf b/typo3/sysext/tstemplate/ts/locallang_mod.xlf
deleted file mode 100644 (file)
index 774632c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415815008" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="tstemplate">
-               <header/>
-               <body>
-                       <trans-unit id="mlang_labels_tablabel">
-                               <source>Template tools</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_labels_tabdescr">
-                               <source>Here you manage the TypoScript templates which are in charge of the look of your website on the frontend. The module provides specialized features like an object browser, a constant editor and raw editing facilities.&lt;br /&gt;&lt;em&gt;Access for 'admin' users only!&lt;/em&gt;</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_tabs_tab">
-                               <source>Template</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>