Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions Classes/Service/FileGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,7 @@ protected function generateLocallangFiles(): void
);
}
}
foreach ($this->extension->getDomainObjects() as $domainObject) {
$fileContents = $this->generateLocallangFileContent('_csh_' . $domainObject->getDatabaseTableName() . '.xlf', 'domainObject', $domainObject);
$this->writeFile(
$this->languageDirectory . 'locallang_csh_' . $domainObject->getDatabaseTableName() . '.xlf',
$fileContents
);
}

} catch (Exception $e) {
throw new Exception('Could not generate locallang files, error: ' . $e->getMessage());
}
Expand Down Expand Up @@ -1251,7 +1245,7 @@ public function generateLayout(string $templateRootFolder): ?string
}

/**
* @param string $fileNameSuffix (_db, _csh, _mod)
* @param string $fileNameSuffix (_db, _mod)
* @param string $variableName
* @param DomainObject|BackendModule $variable
*
Expand Down Expand Up @@ -1293,10 +1287,6 @@ protected function generateLocallangFileContent(string $fileNameSuffix = '', str

protected function getLanguageLabelsForVariable(string $variableName, $variable, string $fileNameSuffix): array
{
if ($variableName === 'domainObject') {
return $this->localizationService->prepareLabelArrayForContextHelp($variable);
}

if ($variableName === 'backendModule') {
return $this->localizationService->prepareLabelArrayForBackendModule($variable);
}
Expand Down
15 changes: 0 additions & 15 deletions Classes/Service/LocalizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,6 @@ public function prepareLabelArray(Extension $extension, string $type = 'locallan
return $labelArray;
}

/**
* @param DomainObject $domainObject
*
* @return array
* @throws InvalidArgumentException
*/
public function prepareLabelArrayForContextHelp(DomainObject $domainObject): array
{
$labelArray = [];
foreach ($domainObject->getProperties() as $property) {
$labelArray[$property->getFieldName() . '.description'] = htmlspecialchars($property->getDescription());
}
return $labelArray;
}

public function prepareLabelArrayForBackendModule(BackendModule $backendModule): array
{
return [
Expand Down
9 changes: 5 additions & 4 deletions Classes/Service/RoundTrip.php
Original file line number Diff line number Diff line change
Expand Up @@ -1266,11 +1266,12 @@ protected function removeDomainObjectFiles(DomainObject $domainObject): void
// other files
$iconsDirectory = $this->extensionDirectory . 'Resources/Public/Icons/';
$languageDirectory = $this->extensionDirectory . 'Resources/Private/Language/';
$locallang_cshFile = $languageDirectory . 'locallang_csh_' . $domainObject->getDatabaseTableName() . '.xml';
$iconFile = $iconsDirectory . $domainObject->getDatabaseTableName() . '.gif';
if (file_exists($locallang_cshFile)) {
// no overwrite settings check here...
unlink($locallang_cshFile);
foreach (['xml', 'xlf'] as $cshExt) {
$cshFile = $languageDirectory . 'locallang_csh_' . $domainObject->getDatabaseTableName() . '.' . $cshExt;
if (file_exists($cshFile)) {
unlink($cshFile);
}
}
if (file_exists($iconFile)) {
unlink($iconFile);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading