Feature #77540

ExtensionManagementUtility::addStaticFile language handling for $title

Added by David C. over 4 years ago. Updated 9 months ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2016-08-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently it's not possible to use a string from language file for the $title when adding a static TypoScript template file.

This works:

<?php
// Add an entry in the static template list found in sys_templates for static TS
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
    'ext_key',
    'Configuration/TypoScript',
    'TS Title'
);
?>

This doesn't, but should:

<?php
// Add an entry in the static template list found in sys_templates for static TS
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
    'ext_key',
    'Configuration/TypoScript',
    'LLL:EXT:ext_key/Resources/Private/Language/locallang.xlf:tstitle'
);
?>


Related issues

Related to TYPO3 Core - Feature #79928: PageTS config from file not localizableRejected2017-02-20

Actions
#1

Updated by Mathias Brodala over 4 years ago

The reason behind this is that ExtensionManagementUtility::addStaticFile() appends a suffix (<extkey>) to each title which breaks localization references.

#2

Updated by Mathias Brodala almost 4 years ago

Notice that the same issue applies to ExtensionManagementUtility::registerPageTSConfigFile.

#3

Updated by Georg Ringer 9 months ago

  • Related to Feature #79928: PageTS config from file not localizable added
#4

Updated by Gerrit Code Review 9 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63693

#5

Updated by Gerrit Code Review 9 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63693

#6

Updated by Georg Ringer 9 months ago

  • Status changed from Under Review to Rejected

I am closing this issue because it would lead to an inconsistent behaviour in the backend. Having the extension key added to the label is very nice as it improves the search a lot.

If you need it translated - which I fully understand as well - please modify the TCA directly which is absolutly valid too by adding it to $GLOBALS['TCA']['sys_template']['columns']['include_static_file']['config']['items'] directly.

Also available in: Atom PDF