[FEATURE] Add backend for loading translations via ajax

This commit is contained in:
2024-02-09 11:04:01 +01:00
parent e126e674c7
commit ddbb0c35b0
22 changed files with 625 additions and 69 deletions

View File

@@ -9,33 +9,57 @@ call_user_func(
'Cjel.TemplatesAide',
'Dummy',
[
'Dummy' => 'list'
'Dummy' => 'list',
'Translation' => 'translations'
],
// non-cacheable actions
[
'Dummy' => ''
'Dummy' => '',
'Translation' => ''
]
);
// wizards
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
dummy {
iconIdentifier = templates_aide-plugin-dummy
title = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_dummy.name
description = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_dummy.description
tt_content_defValues {
CType = list
list_type = templatesaide_dummy
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Cjel.TemplatesAide',
'Translationplugin',
[
'Translation' => 'translations'
],
// non-cacheable actions
[
'Dummy' => '',
'Translation' => ''
]
);
// wizards
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
dummy {
iconIdentifier = templates_aide-plugin-dummy
title = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_dummy.name
description = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_dummy.description
tt_content_defValues {
CType = list
list_type = templatesaide_dummy
}
}
translationplugin {
iconIdentifier = templates_aide-plugin-translationplugin
title = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_translationplugin.name
description = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_translationplugin.description
tt_content_defValues {
CType = list
list_type = templatesaide_translationplugin
}
}
}
show = *
}
show = *
}
}'
);
}'
);
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
@@ -44,6 +68,12 @@ call_user_func(
['source' => 'EXT:templates_aide/Resources/Public/Icons/user_plugin_dummy.svg']
);
$iconRegistry->registerIcon(
'templates_aide-plugin-translationplugin',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:templates_aide/Resources/Public/Icons/user_plugin_translationplugin.svg']
);
}
);
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
@@ -89,4 +119,4 @@ call_user_func(
}
);
);