-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c75d4d1
commit e41cf05
Showing
20 changed files
with
169 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
use function count; | ||
|
||
/** | ||
* Class ImportCommand | ||
* Class ImportCommand. | ||
* | ||
* @author Rico Sonntag <[email protected]> | ||
* @license Netresearch https://www.netresearch.de | ||
|
@@ -170,7 +170,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
} | ||
|
||
/** | ||
* Returns the sys_language_uid for a language code | ||
* Returns the sys_language_uid for a language code. | ||
* | ||
* @param string $languageCode Language Code | ||
* | ||
|
@@ -228,6 +228,7 @@ protected function getLanguageKeyFromFile(string $file): string | |
* @param bool $forceUpdate | ||
* | ||
* @return void | ||
* | ||
* @throws IllegalObjectTypeException | ||
*/ | ||
protected function importTranslationsFromFiles(OutputInterface $output, bool $forceUpdate = false): void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ | |
use function is_string; | ||
|
||
/** | ||
* TranslationController | ||
* TranslationController. | ||
* | ||
* @author Thomas Schöne <[email protected]> | ||
* @license Netresearch https://www.netresearch.de | ||
|
@@ -152,14 +152,14 @@ public function __construct( | |
ImportService $importService | ||
) { | ||
$this->extensionConfiguration = $extensionConfiguration; | ||
$this->environmentRepository = $environmentRepository; | ||
$this->translationRepository = $translationRepository; | ||
$this->translationService = $translationService; | ||
$this->persistenceManager = $persistenceManager; | ||
$this->componentRepository = $componentRepository; | ||
$this->typeRepository = $typeRepository; | ||
$this->moduleTemplateFactory = $moduleTemplateFactory; | ||
$this->iconFactory = $iconFactory; | ||
$this->environmentRepository = $environmentRepository; | ||
$this->translationRepository = $translationRepository; | ||
$this->translationService = $translationService; | ||
$this->persistenceManager = $persistenceManager; | ||
$this->componentRepository = $componentRepository; | ||
$this->typeRepository = $typeRepository; | ||
$this->moduleTemplateFactory = $moduleTemplateFactory; | ||
$this->iconFactory = $iconFactory; | ||
|
||
$this->pageRenderer = $pageRenderer; | ||
$this->pageRenderer->loadJavaScriptModule('@typo3/backend/modal.js'); | ||
|
@@ -174,7 +174,7 @@ public function __construct( | |
} | ||
|
||
/** | ||
* Initialize Action | ||
* Initialize Action. | ||
* | ||
* @return void | ||
* | ||
|
@@ -202,7 +202,7 @@ private function moduleResponse(): ResponseInterface | |
} | ||
|
||
/** | ||
* Shows the textDB entires | ||
* Shows the textDB entires. | ||
* | ||
* @return ResponseInterface | ||
* | ||
|
@@ -249,10 +249,10 @@ public function listAction(): ResponseInterface | |
$value | ||
); | ||
|
||
$config['component'] = $componentId; | ||
$config['type'] = $typeId; | ||
$config['component'] = $componentId; | ||
$config['type'] = $typeId; | ||
$config['placeholder'] = $placeholder; | ||
$config['value'] = $value; | ||
$config['value'] = $value; | ||
|
||
$this->persistConfigInBeUserData($config); | ||
|
||
|
@@ -533,7 +533,7 @@ public function importAction(bool $update = false): ResponseInterface | |
{ | ||
$this->view->assign('action', 'import'); | ||
|
||
/** @var null|UploadedFile $translationFile */ | ||
/** @var UploadedFile|null $translationFile */ | ||
$translationFile = $this->request->getUploadedFiles()['translationFile'] ?? null; | ||
|
||
if ( | ||
|
@@ -594,6 +594,7 @@ public function importAction(bool $update = false): ResponseInterface | |
} | ||
|
||
$this->view->assign('errors', $errors); | ||
|
||
return $this->moduleResponse(); | ||
} | ||
|
||
|
@@ -653,41 +654,44 @@ public function importAction(bool $update = false): ResponseInterface | |
} | ||
|
||
/** | ||
* Get the component from key | ||
* Get the component from key. | ||
* | ||
* @param string $key | ||
* | ||
* @return null|string | ||
* @return string|null | ||
*/ | ||
private function getComponentFromKey(string $key): ?string | ||
{ | ||
$parts = explode('|', $key); | ||
|
||
return $parts[0] ?? null; | ||
} | ||
|
||
/** | ||
* Get the type from a key | ||
* Get the type from a key. | ||
* | ||
* @param string $key | ||
* | ||
* @return null|string | ||
* @return string|null | ||
*/ | ||
private function getTypeFromKey(string $key): ?string | ||
{ | ||
$parts = explode('|', $key); | ||
|
||
return $parts[1] ?? null; | ||
} | ||
|
||
/** | ||
* Get the placeholder from key | ||
* Get the placeholder from key. | ||
* | ||
* @param string $key | ||
* | ||
* @return null|string | ||
* @return string|null | ||
*/ | ||
private function getPlaceholderFromKey(string $key): ?string | ||
{ | ||
$parts = explode('|', $key); | ||
|
||
return $parts[2] ?? null; | ||
} | ||
|
||
|
@@ -705,7 +709,7 @@ protected function getExtensionConfiguration(): mixed | |
} | ||
|
||
/** | ||
* Get module config from user data | ||
* Get module config from user data. | ||
* | ||
* @return array<array-key, int|string> | ||
*/ | ||
|
@@ -730,7 +734,7 @@ protected function getConfigFromBeUserData(): array | |
} | ||
|
||
/** | ||
* Save current config in backend user settings | ||
* Save current config in backend user settings. | ||
* | ||
* @param array<array-key, int|string> $config | ||
*/ | ||
|
@@ -740,7 +744,7 @@ protected function persistConfigInBeUserData(array $config): void | |
} | ||
|
||
/** | ||
* Write the translation file for export and returns the uid of entries written to file | ||
* Write the translation file for export and returns the uid of entries written to file. | ||
* | ||
* @param QueryResultInterface $translations | ||
* @param string $exportDir | ||
|
@@ -821,22 +825,22 @@ protected function registerDocHeaderButtons(ModuleTemplate $moduleTemplate): voi | |
// Prepare an array for the button definitions | ||
$buttons = [ | ||
[ | ||
'label' => 'LLL:EXT:nr_textdb/Resources/Private/Language/locallang.xlf:button.label.list', | ||
'action' => 'list', | ||
'icon' => 'actions-list-alternative', | ||
'group' => 1, | ||
'label' => 'LLL:EXT:nr_textdb/Resources/Private/Language/locallang.xlf:button.label.list', | ||
'action' => 'list', | ||
'icon' => 'actions-list-alternative', | ||
'group' => 1, | ||
], | ||
[ | ||
'label' => 'LLL:EXT:nr_textdb/Resources/Private/Language/locallang.xlf:button.label.export', | ||
'action' => 'export', | ||
'icon' => 'actions-database-export', | ||
'group' => 1, | ||
'label' => 'LLL:EXT:nr_textdb/Resources/Private/Language/locallang.xlf:button.label.export', | ||
'action' => 'export', | ||
'icon' => 'actions-database-export', | ||
'group' => 1, | ||
], | ||
[ | ||
'label' => 'LLL:EXT:nr_textdb/Resources/Private/Language/locallang.xlf:import', | ||
'action' => 'import', | ||
'icon' => 'actions-database-import', | ||
'group' => 1, | ||
'label' => 'LLL:EXT:nr_textdb/Resources/Private/Language/locallang.xlf:import', | ||
'action' => 'import', | ||
'icon' => 'actions-database-import', | ||
'group' => 1, | ||
], | ||
]; | ||
|
||
|
@@ -955,7 +959,7 @@ protected function addFlashMessageToQueue( | |
} | ||
|
||
/** | ||
* Shorthand functionality for fetching the language service | ||
* Shorthand functionality for fetching the language service. | ||
* | ||
* @return LanguageService | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
use TYPO3\CMS\Extbase\DomainObject\AbstractValueObject; | ||
|
||
/** | ||
* Component | ||
* Component. | ||
* | ||
* @author Thomas Schöne <[email protected]> | ||
* @author Rico Sonntag <[email protected]> | ||
|
@@ -25,7 +25,7 @@ | |
class Component extends AbstractValueObject | ||
{ | ||
/** | ||
* name | ||
* name. | ||
* | ||
* @var string | ||
* | ||
|
@@ -34,7 +34,7 @@ class Component extends AbstractValueObject | |
protected string $name = ''; | ||
|
||
/** | ||
* Returns the name | ||
* Returns the name. | ||
* | ||
* @return string | ||
*/ | ||
|
@@ -44,7 +44,7 @@ public function getName(): string | |
} | ||
|
||
/** | ||
* Sets the name | ||
* Sets the name. | ||
* | ||
* @param string $name | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
use TYPO3\CMS\Extbase\DomainObject\AbstractValueObject; | ||
|
||
/** | ||
* Environment | ||
* Environment. | ||
* | ||
* @author Thomas Schöne <[email protected]> | ||
* @author Rico Sonntag <[email protected]> | ||
|
@@ -25,7 +25,7 @@ | |
class Environment extends AbstractValueObject | ||
{ | ||
/** | ||
* name | ||
* name. | ||
* | ||
* @var string | ||
* | ||
|
@@ -34,7 +34,7 @@ class Environment extends AbstractValueObject | |
protected string $name = ''; | ||
|
||
/** | ||
* Returns the name | ||
* Returns the name. | ||
* | ||
* @return string | ||
*/ | ||
|
@@ -44,7 +44,7 @@ public function getName(): string | |
} | ||
|
||
/** | ||
* Sets the name | ||
* Sets the name. | ||
* | ||
* @param string $name | ||
* | ||
|
Oops, something went wrong.