2 namespace TYPO3\CMS\Lang\Command;
57 public function updateCommand($localesToUpdate =
'')
60 $translationService = $this->objectManager->get(\TYPO3\CMS\Lang\Service\TranslationService::class);
62 $languageRepository = $this->objectManager->get(\TYPO3\CMS\Lang\Domain\Repository\LanguageRepository::class);
64 if (!empty($localesToUpdate)) {
65 $locales = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(
',', $localesToUpdate,
true);
67 $languages = $languageRepository->findSelected();
68 foreach ($languages as $language) {
74 $packageManager = $this->objectManager->get(\TYPO3\CMS\Core\Package\PackageManager::class);
76 $packages = $packageManager->getAvailablePackages();
77 $this->
outputLine((sprintf(
'Updating language packs of all activated extensions for locales "%s"', implode(
', ',
$locales))));
81 foreach ($packages as $package) {
82 $extensionKey = $package->getPackageKey();
83 $result = $translationService->updateTranslation($extensionKey, $locale);
84 if (empty($result[$extensionKey][$locale][
'error'])) {
85 $this->registryService->set($locale,
$GLOBALS[
'EXEC_TIME']);
87 $this->
output->progressAdvance();
90 $this->
output->progressFinish();
98 $this->signalSlotDispatcher->dispatch(
'PackageManagement',
'packagesMayHaveChanged');