Skip to content

Commit

Permalink
[TASK] Improve wording
Browse files Browse the repository at this point in the history
  • Loading branch information
outdoorsman committed May 3, 2022
1 parent 96a823f commit a3a6fb9
Show file tree
Hide file tree
Showing 35 changed files with 112 additions and 112 deletions.
6 changes: 3 additions & 3 deletions Classes/Configuration/FlexForm/FlexFormTools8.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ protected function getDataStructureIdentifierFromRecord(array $fieldTca, string
throw new InvalidParentRowException(
'The data structure for field "' . $fieldName . '" in table "' . $tableName . '" has to be looked up'
. ' in field "' . $pointerFieldName . '". That field had no valid value, so a lookup in parent record'
. ' with uid "' . $row[$parentFieldName] . '" was done. This row however does not exist or was deleted.',
. ' with uid "' . $row[$parentFieldName] . '" was done. However, this row does not exist or was deleted.',
1463833794
);
}
Expand Down Expand Up @@ -378,14 +378,14 @@ protected function getDataStructureIdentifierFromRecord(array $fieldTca, string
if (!isset($fieldTca['config']['ds_tableField'])) {
throw new InvalidTcaException(
'Invalid data structure pointer for field "' . $fieldName . '" in table "' . $tableName . '", the value'
. 'resolved to "' . $pointerValue . '" . which is an integer, so "ds_tableField" must be configured',
. 'resolved to "' . $pointerValue . '", . which is an integer, so "ds_tableField" must be configured',
1464115639
);
}
if (substr_count($fieldTca['config']['ds_tableField'], ':') !== 1) {
// ds_tableField must be of the form "table:field"
throw new InvalidTcaException(
'Invalid TCA configuration for field "' . $fieldName . '" in table "' . $tableName . '", the setting'
'Invalid TCA configuration for field "' . $fieldName . '" in table "' . $tableName . '". The setting'
. '"ds_tableField" must be of the form "tableName:fieldName"',
1464116002
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,14 @@ protected function checkAllDsToValid(array $allDs, array $allTo): array
$to['valid'] = true;
$to['DS'] = $validatedDs[$to['datastructure']]; /** @TODO If parent then from parent! Check if parent exists */
} else {
$validationErrors[] = 'Cannot verify TO with title "' . $to['title'] . '" and uid "' . $to['uid'] . '", as mapping seams not existing.';
$validationErrors[] = 'Cannot verify TO with title "' . $to['title'] . '" and uid "' . $to['uid'] . '" because mapping does not seem to exist.';
}
}
} else {
$validationErrors[] = 'Cannot verify TO with title "' . $to['title'] . '" and uid "' . $to['uid'] . '", as template file "' . $to['fileref'] . '" could not be found.';
$validationErrors[] = 'Cannot verify TO with title "' . $to['title'] . '" and uid "' . $to['uid'] . '" because template file "' . $to['fileref'] . '" could not be found.';
}
} else {
$validationErrors[] = 'Cannot verify TO with title "' . $to['title'] . '" and uid "' . $to['uid'] . '", as DataStructure "' . $to['datastructure'] . '" could not be found.';
$validationErrors[] = 'Cannot verify TO with title "' . $to['title'] . '" and uid "' . $to['uid'] . '" because DataStructure "' . $to['datastructure'] . '" could not be found.';
}
$validatedToWithDs[$to['uid']] = $to;
}
Expand All @@ -398,7 +398,7 @@ protected function checkAllDsToValid(array $allDs, array $allTo): array
foreach ($validatedDs as $key => $ds) {
if ($ds['countUsage'] === 0) {
$validatedDs[$key]['valid'] = false;
$validationErrors[] = 'Cannot verify DS with title "' . $ds['title'] . '" it has no Template Object data';
$validationErrors[] = 'Cannot verify DS with title "' . $ds['title'] . '" since it has no Template Object data.';
}
}

Expand Down Expand Up @@ -441,14 +441,14 @@ protected function checkAllPageContentForTo(array $validatedToWithDs): array
if (isset($validatedToWithDs[$row['tx_templavoilaplus_to']])) {
$validatedToWithDs[$row['tx_templavoilaplus_to']]['countUsage'] += $row['COUNT(`uid`)'];
} else {
$validationErrors[] = 'There are pages which use an non existent Template Object with uid "' . $row['tx_templavoilaplus_to'] . '" like page with page uid: "' . $row['uid'] . '"';
$validationErrors[] = 'There is a page using a non-existent Template Object with uid "' . $row['tx_templavoilaplus_to'] . '" like page with page uid: "' . $row['uid'] . '"';
}
}
if ($row['tx_templavoilaplus_next_to'] != 0) {
if (isset($validatedToWithDs[$row['tx_templavoilaplus_next_to']])) {
$validatedToWithDs[$row['tx_templavoilaplus_next_to']]['countUsage'] += $row['COUNT(`uid`)'];
} else {
$validationErrors[] = 'There are pages which use an non existent Template Object with uid "' . $row['tx_templavoilaplus_next_to'] . '" for subpages like page with page uid: "' . $row['uid'] . '"';
$validationErrors[] = 'There is a page using a non-existent Template Object with uid "' . $row['tx_templavoilaplus_next_to'] . '" for subpages like page with page uid: "' . $row['uid'] . '"';
}
}
}
Expand Down Expand Up @@ -477,7 +477,7 @@ protected function checkAllPageContentForTo(array $validatedToWithDs): array
if (isset($validatedToWithDs[$row['tx_templavoilaplus_to']])) {
$validatedToWithDs[$row['tx_templavoilaplus_to']]['countUsage'] += $row['COUNT(`uid`)'];
} else {
$validationErrors[] = 'There are content elements which use an non existent Template Object with uid "' . $row['tx_templavoilaplus_to'] . '" like content element with uid: "' . $row['uid'] . '"';
$validationErrors[] = 'There are content elements using a non-existent Template Object with uid "' . $row['tx_templavoilaplus_to'] . '" like content element with uid: "' . $row['uid'] . '"';
}
}
}
Expand Down Expand Up @@ -664,7 +664,7 @@ protected function step3NewExtensionAction()
* The key must not being with one of the following prefixes: tx,pages,tt_,sys_,ts_language_,csh_
*/
if (preg_match('/^(tx|pages_|tt_|sys_|ts_language_|csh_)/', $newExtensionKey)) {
$errors[] = 'The key must not being with one of the following prefixes: tx,pages,tt_,sys_,ts_language_,csh_';
$errors[] = 'The key must not begin with one of the following prefixes: tx,pages,tt_,sys_,ts_language_,csh_';
}

if (isset($allTerExtensionKeys[$newExtensionKey])) {
Expand Down Expand Up @@ -1077,7 +1077,7 @@ function convertDsToForOneTo(array $allDs, array $to, array &$copiedBackendLayou
];

/**
* @TODO in staticDS it was also possible that we had a filenamen with same name but with .html as ending which included the belayout
* @TODO in staticDS it was also possible that we had a filename with same name but with .html as ending which included the belayout
* Add this to the getAllDsFromStatic function.
* No Support for beLayout content inside DS-XML or TO-Table only filenames (as this is what only worked in TV+).
*/
Expand Down
6 changes: 3 additions & 3 deletions Classes/Controller/Backend/Handler/DoktypeDefaultHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public function handle(PageLayoutController $controller, array $pageRecord)
);
if (!empty($pageRecord['tx_templavoilaplus_ds']) || !empty($pageRecord['tx_templavoilaplus_next_ds'])) {
$controller->getView()->getModuleTemplate()->addFlashMessage(
'Older configuration found, did you upgrade to "TemplaVoilà! Plus 8" but forgot to run the upgrade scripts?',
'Did you forgot to Upgrade',
'Older configuration found. Did you upgrade to "TemplaVoilà! Plus 8" but forgot to run the upgrade scripts?',
'Did you forget to Upgrade',
\TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING,
false
);
Expand All @@ -96,7 +96,7 @@ public function handle(PageLayoutController $controller, array $pageRecord)
$controller->addContentPartial('body', 'Backend/Handler/DoktypeDefaultHandler'); // @TODO Add them automagically in controller to harden naming?
} catch (ConfigurationException $e) {
$controller->getView()->getModuleTemplate()->addFlashMessage(
'The page have a Layout defined, which seams missing on this system. The error was: ' . $e->getMessage(),
'The page has a Layout defined, which seems to be missing on this system. The error was: ' . $e->getMessage(),
'Template Configuration not loadable',
\TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR,
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected function fixPerElement(array &$element, array $elementCallbacks)
if (is_callable($callback)) {
$changed = $callback($element) || $changed;
} else {
throw new \Exception('Callback function "' . $callback[1] . '" not available. Cann\'t update DataStructure.');
throw new \Exception('Callback function "' . $callback[1] . '" not available. Can\'t update DataStructure.');
}
}

Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/Frontend/FrontendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public function renderPage($content, $conf)
// Current page record which we MIGHT manipulate a little:
$pageRecord = $GLOBALS['TSFE']->page;

// replace record if content_from_pid is used. This might change the template/mapping, however
// Replace record if content_from_pid is used. This might change the template/mapping, however
// it can't be expected that fields are the same between different templates, thus we need to use the
// other template anways
// other template anyway
if ($pageRecord['content_from_pid']) {
$pageRecord = BackendUtility::getRecordWSOL('pages', $pageRecord['content_from_pid']);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Form/Container/FlexFormTabsContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function render()
$tabCounter++;

// Assemble key for loading the correct CSH file
// @todo: what is that good for? That is for the title of single elements ... see FlexFormElementContainer!
// @todo: What is that good for? That is for the title of single elements ... see FlexFormElementContainer!
$dsPointerFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$fieldName]['config']['ds_pointerField'], true);
$parameterArray['_cshKey'] = $table . '.' . $fieldName;
foreach ($dsPointerFields as $key) {
Expand Down
6 changes: 3 additions & 3 deletions Classes/Form/Controller/FormFlexAjaxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function containerAdd(ServerRequestInterface $request, ResponseInterface
];
// A new container on a new record needs the 'NEW123' uid here, see comment
// in DatabaseUniqueUidNewRow for more information on that.
// @todo: Resolve, maybe with a redifinition of vanillaUid to transport the information more clean through this var?
// @todo: Resolve, maybe with a redefinition of vanillaUid to transport the information more clean through this var?
// @see issue #80100 for a series of changes in this area
if ($command === 'new') {
$formDataCompilerInput['databaseRow']['uid'] = $databaseRowUid;
Expand Down Expand Up @@ -128,15 +128,15 @@ public function containerAdd(ServerRequestInterface $request, ResponseInterface
$formData['parameterArray']['itemFormElName'] = 'data[' . $tableName . '][' . $formData['databaseRow']['uid'] . '][' . $fieldName . ']';

// JavaScript code for event handlers:
// @todo: see if we can get rid of this - used in group elements, and also for the "reload" on type field changes
// @todo: See if we can get rid of this - used in group elements, and also for the "reload" on type field changes
$formData['parameterArray']['fieldChangeFunc'] = [];
$formData['parameterArray']['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] = 'TBE_EDITOR.fieldChanged('
. GeneralUtility::quoteJSvalue($tableName)
. ',' . GeneralUtility::quoteJSvalue($formData['databaseRow']['uid'])
. ',' . GeneralUtility::quoteJSvalue($fieldName)
. ',' . GeneralUtility::quoteJSvalue($formData['parameterArray']['itemFormElName'])
. ');';
// @todo: check GroupElement for usage of elementBaseName ... maybe kick that thing?
// @todo: Check GroupElement for usage of elementBaseName ... maybe kick that thing?
// Feed resulting form data to container structure to render HTML and other result data
$nodeFactory = GeneralUtility::makeInstance(NodeFactory::class);
Expand Down
6 changes: 3 additions & 3 deletions Classes/Form/Controller/FormFlexAjaxController9.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function containerAdd(ServerRequestInterface $request): ResponseInterface
];
// A new container on a new record needs the 'NEW123' uid here, see comment
// in DatabaseUniqueUidNewRow for more information on that.
// @todo: Resolve, maybe with a redifinition of vanillaUid to transport the information more clean through this var?
// @todo: Resolve, maybe with a redefinition of vanillaUid to transport the information more clean through this var?
// @see issue #80100 for a series of changes in this area
if ($command === 'new') {
$formDataCompilerInput['databaseRow']['uid'] = $databaseRowUid;
Expand Down Expand Up @@ -128,15 +128,15 @@ public function containerAdd(ServerRequestInterface $request): ResponseInterface
$formData['parameterArray']['itemFormElName'] = 'data[' . $tableName . '][' . $formData['databaseRow']['uid'] . '][' . $fieldName . ']';

// JavaScript code for event handlers:
// @todo: see if we can get rid of this - used in group elements, and also for the "reload" on type field changes
// @todo: See if we can get rid of this - used in group elements, and also for the "reload" on type field changes
$formData['parameterArray']['fieldChangeFunc'] = [];
$formData['parameterArray']['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] = 'TBE_EDITOR.fieldChanged('
. GeneralUtility::quoteJSvalue($tableName)
. ',' . GeneralUtility::quoteJSvalue($formData['databaseRow']['uid'])
. ',' . GeneralUtility::quoteJSvalue($fieldName)
. ',' . GeneralUtility::quoteJSvalue($formData['parameterArray']['itemFormElName'])
. ');';
// @todo: check GroupElement for usage of elementBaseName ... maybe kick that thing?
// @todo: Check GroupElement for usage of elementBaseName ... maybe kick that thing?
// Feed resulting form data to container structure to render HTML and other result data
$nodeFactory = GeneralUtility::makeInstance(NodeFactory::class);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Form/FormDataProvider/TcaFlexFetch.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected function initializeDataValues(array $result, $fieldName)
* @todo: Why is this not done in BackendUtility::getFlexFormDS() directly? If done there, the two methods
* @todo: since this resolving is basically the only really useful thing they actually do.
*
* @TODO Copied from core, can be removed, is solved with code pathes for TYPO3 8.5.0
* @TODO Copied from core, can be removed, is solved with code paths for TYPO3 8.5.0
*
* @param array $result Result array
* @param string $fieldName Current handle field name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function setLoadSaveHandler(LoadSaveHandlerInterface $loadSaveHandler)
$this->loadSaveHandler = $loadSaveHandler;
}

/** @TODO it may be possible that this could go into an abstract */
/** @TODO It may be possible that this could go into an abstract */
public function loadConfigurations()
{
$configurations = [];
Expand All @@ -68,7 +68,7 @@ public function loadConfigurations()
'store' => ['file' => $file], /** @TODO Better place to save this information? */
];
} catch (\Exception $e) {
/** @TODO log error, that we can't read the configuration */
/** @TODO Log error, that we can't read the configuration */
}
}

Expand All @@ -88,12 +88,12 @@ public function createConfigurationFromConfigurationArray(array $configuration,
$templateConfiguration->setName($configuration['tvp-beLayout']['meta']['name']);
}
if (isset($configuration['tvp-beLayout']['meta']['renderer'])) {
/** @TODO check before setting */
/** @TODO Check before setting */
$templateConfiguration->setRenderHandlerIdentifier($configuration['tvp-beLayout']['meta']['renderer']);
}
if (isset($configuration['tvp-beLayout']['meta']['template'])) {
/**
* @TODO check before setting
* @TODO Check before setting
* @TODO Relative to Place or configuration file? Support Absolute or 'EXT:' (insecure?)
*/
$templateConfiguration->setTemplateFileName($configuration['tvp-beLayout']['meta']['template']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public function setLoadSaveHandler(LoadSaveHandlerInterface $loadSaveHandler)
$this->loadSaveHandler = $loadSaveHandler;
}

/** @TODO it may be possible that this could go into an abstract */
/** @TODO It may be possible that this could go into an abstract */
public function loadConfigurations()
{
$configurations = [];
$files = $this->loadSaveHandler->find();

/** @TODO No, we don't know if this are files, this may be something totaly different! */
/** @TODO No, we don't know if this are files, this may be something totally different! */
foreach ($files as $file) {
$content = $this->loadSaveHandler->load($file);

Expand All @@ -68,7 +68,7 @@ public function loadConfigurations()
'store' => ['file' => $file], /** @TODO Better place to save this information? */
];
} catch (\Exception $e) {
/** @TODO log error, that we can't read the configuration */
/** @TODO Log error, that we can't read the configuration */
}
}

Expand Down
6 changes: 3 additions & 3 deletions Classes/Handler/Configuration/MappingConfigurationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public function setLoadSaveHandler(LoadSaveHandlerInterface $loadSaveHandler)
$this->loadSaveHandler = $loadSaveHandler;
}

/** @TODO it may be possible that this could go into an abstract */
/** @TODO It may be possible that this could go into an abstract */
public function loadConfigurations()
{
$configurations = [];
$files = $this->loadSaveHandler->find();

/** @TODO No, we don't know if this are files, this may be something totaly different! */
/** @TODO No, we don't know if this are files, this may be something totally different! */
foreach ($files as $file) {
$content = $this->loadSaveHandler->load($file);

Expand All @@ -68,7 +68,7 @@ public function loadConfigurations()
'store' => ['file' => $file], /** @TODO Better place to save this information? */
];
} catch (\Exception $e) {
/** @TODO log error, that we can't read the configuration */
/** @TODO Log error, that we can't read the configuration */
}
}

Expand Down
Loading

0 comments on commit a3a6fb9

Please sign in to comment.