diff --git a/Classes/Service/FileGenerator.php b/Classes/Service/FileGenerator.php index 49a55a32d..10896c15b 100644 --- a/Classes/Service/FileGenerator.php +++ b/Classes/Service/FileGenerator.php @@ -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()); } @@ -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 * @@ -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); } diff --git a/Classes/Service/LocalizationService.php b/Classes/Service/LocalizationService.php index 8769ba69b..87a2d41ea 100644 --- a/Classes/Service/LocalizationService.php +++ b/Classes/Service/LocalizationService.php @@ -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 [ diff --git a/Classes/Service/RoundTrip.php b/Classes/Service/RoundTrip.php index 51bd23e27..b95436f85 100644 --- a/Classes/Service/RoundTrip.php +++ b/Classes/Service/RoundTrip.php @@ -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); diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_astrofilter.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_astrofilter.xlf deleted file mode 100644 index 2928338c6..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_astrofilter.xlf +++ /dev/null @@ -1,32 +0,0 @@ - - - -
- - - name - - - filterType - - - centralWavelength - - - bandwidth - - - color - - - manufacturer - - - diameter - - - active - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_astroimage.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_astroimage.xlf deleted file mode 100644 index 8db62376e..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_astroimage.xlf +++ /dev/null @@ -1,44 +0,0 @@ - - - -
- - - title - - - slug - - - description - - - image - - - captureDateTime - - - publishDate - - - featured - - - stackCount - - - celestialObjects - - - imagingSessions - - - processingRecipes - - - awards - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_award.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_award.xlf deleted file mode 100644 index eb851b20a..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_award.xlf +++ /dev/null @@ -1,29 +0,0 @@ - - - -
- - - title - - - organization - - - awardDate - - - description - - - certificateFile - - - sourceUrl - - - active - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_camera.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_camera.xlf deleted file mode 100644 index 8fd35a91a..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_camera.xlf +++ /dev/null @@ -1,38 +0,0 @@ - - - -
- - - name - - - brand - - - sensorType - - - sensorWidth - - - sensorHeight - - - pixelSize - - - megapixels - - - cooled - - - purchaseDate - - - active - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_celestialobject.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_celestialobject.xlf deleted file mode 100644 index c340181f3..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_celestialobject.xlf +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- - - name - - - catalogId - - - objectType - - - constellation - - - rightAscension - - - declination - - - magnitude - - - distanceLightyears - - - description - - - previewImage - - - active - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_imagingsession.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_imagingsession.xlf deleted file mode 100644 index 919860d76..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_imagingsession.xlf +++ /dev/null @@ -1,56 +0,0 @@ - - - -
- - - sessionDate - - - startTime - - - endTime - - - frameExposure - - - temperature - - - humidity - - - seeingConditions - - - transparency - - - moonPhase - - - totalFrames - - - usableFrames - - - notes - - - observingSites - - - telescopes - - - cameras - - - astroFilters - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_observingsite.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_observingsite.xlf deleted file mode 100644 index 02a880309..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_observingsite.xlf +++ /dev/null @@ -1,38 +0,0 @@ - - - -
- - - name - - - description - - - latitude - - - longitude - - - altitude - - - bortleClass - - - website - - - contactEmail - - - active - - - image - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_processingrecipe.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_processingrecipe.xlf deleted file mode 100644 index 8a18c6e01..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_processingrecipe.xlf +++ /dev/null @@ -1,38 +0,0 @@ - - - -
- - - title - - - software - - - description - - - stackingMethod - - - totalIntegrationTime - - - processingDate - - - recipeFile - - - active - - - notes - - - cameras - - - - diff --git a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_telescope.xlf b/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_telescope.xlf deleted file mode 100644 index 7fefa7088..000000000 --- a/Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Language/locallang_csh_tx_ebastrophotography_domain_model_telescope.xlf +++ /dev/null @@ -1,38 +0,0 @@ - - - -
- - - name - - - brand - - - telescopeType - - - focalLength - - - aperture - - - focalRatio - - - purchaseDate - - - active - - - notes - - - image - - - - diff --git a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_category.xlf b/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_category.xlf deleted file mode 100644 index 9c6cd75b9..000000000 --- a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_category.xlf +++ /dev/null @@ -1,14 +0,0 @@ - - - -
- - - name - - - categories - - - - diff --git a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child1.xlf b/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child1.xlf deleted file mode 100644 index 0f5a397a9..000000000 --- a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child1.xlf +++ /dev/null @@ -1,14 +0,0 @@ - - - -
- - - name - - - flag - - - - diff --git a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child2.xlf b/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child2.xlf deleted file mode 100644 index ea41c09c5..000000000 --- a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child2.xlf +++ /dev/null @@ -1,23 +0,0 @@ - - - -
- - - name - - - A date which is stored as Native Date - - - DateTime which is stored as Native DateTime - - - A date which is stored as Timestamp - - - DateTime stores as Timestamp - - - - diff --git a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child3.xlf b/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child3.xlf deleted file mode 100644 index 437e14d3d..000000000 --- a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child3.xlf +++ /dev/null @@ -1,17 +0,0 @@ - - - -
- - - name - - - password - - - imageProperty - - - - diff --git a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child4.xlf b/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child4.xlf deleted file mode 100644 index df3c25f84..000000000 --- a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_child4.xlf +++ /dev/null @@ -1,14 +0,0 @@ - - - -
- - - name - - - fileProperty - - - - diff --git a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_main.xlf b/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_main.xlf deleted file mode 100644 index f72947533..000000000 --- a/Tests/Fixtures/TestExtensions/test_extension/Resources/Private/Language/locallang_csh_tx_testextension_domain_model_main.xlf +++ /dev/null @@ -1,35 +0,0 @@ - - - -
- - - This is not required - - - This is required - - - description - - - Just a date - - - mail - - - This is a 1:1 relation - - - This is a 1:n relation - - - This is a n:1 relation - - - This is a m:n relation - - - -