public function __construct() { cli\line('PO Translator (using Yandex Translator https://translate.yandex.com )'); if (php_sapi_name() != 'cli') { $this->error('Must run from command line'); } $this->parseArgs(); $this->initYandexTranslator(); $this->loadTranslations(); $this->translate(); $this->saveTranslations(); cli\line('Finished, closing PO Translator.'); }
/** * The main installation process to set up GitHook'd for a project. */ public function install() { $args = $this->registerArgs(); // Show the help screen. if ($args['help']) { echo $args->getHelpScreen(); return; } // Verify necessary directories are in place. if (!$this->verifyDirectories()) { return; } if ($hookCount = $this->copyHooks()) { cli\line('Success: %d hook(s) has/have been copied successfully!', $hookCount); } }