src/Kunstmaan/TranslatorBundle/Service/Command/Importer/ImportCommandHandler.php
private function importSingleBundleTranslationFiles(ImportCommand $importCommand)
    {
        $this->validateBundleName($importCommand->getDefaultBundle());
        $bundles = array_change_key_case($this->kernel->getBundles(), CASE_LOWER);
        $finder = $this->translationFileExplorer->find($bundles[strtolower($importCommand->getDefaultBundle())]->getPath(), $this->determineLocalesToImport($importCommand));

        if ($finder === null) {
            return 0;
        }

        return $this->importTranslationFiles($finder, $importCommand->getForce());
    }
private function importSingleBundleTranslationFiles(ImportCommand $importCommand)
    {
        $this->validateBundleName($importCommand->getDefaultBundle());
        $bundles = array_change_key_case($this->kernel->getBundles(), CASE_LOWER);
        $finder = $this->translationFileExplorer->find($bundles[strtolower($importCommand->getDefaultBundle())]->getPath(), $this->determineLocalesToImport($importCommand));

        if ($finder === null) {
            return 0;
        }

        return $this->importTranslationFiles($finder, $importCommand->getForce());
    }
private function importSingleBundleTranslationFiles ( ImportCommand $ importCommand ) { $ this -> validateBundleName ( $ importCommand -> getDefaultBundle ( ) ) ; $ bundles = array_change_key_case ( $ this -> kernel -> getBundles ( ) , CASE_LOWER ) ; $ finder = $ this -> translationFileExplorer -> find ( $ bundles [ strtolower ( $ importCommand -> getDefaultBundle ( ) ) ] -> getPath ( ) , $ this -> determineLocalesToImport ( $ importCommand ) ) ; if ( $ finder === null ) { return 0 ; } return $ this -> importTranslationFiles ( $ finder , $ importCommand -> getForce ( ) ) ; }
Import all translation files from a single bundle

@param ImportCommand $importCommand

@return int total number of files imported
Import all translation files from a single bundle