芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/store.kwesioben.com/vendor/amirami/localizator/src/Commands/LocalizeCommand.php
confirmToProceed()) { return 1; } $locales = $this->getLocales(); $progressBar = $this->output->createProgressBar(count($locales)); $this->info('Localizing: '.implode(', ', $locales)); $parser->parseKeys(); $progressBar->setFormat('%current%/%max% [%bar%] %percent:3s%% %message%'); $progressBar->setMessage('Localizing...'); $progressBar->start(); foreach ($locales as $locale) { $progressBar->setMessage("Localizing {$locale}..."); foreach ($this->getTypes() as $type) { $localizator->localize($parser->getKeys($locale, $type), $type, $locale); } $progressBar->advance(); } $progressBar->finish(); $this->info( "\nTranslatable strings have been generated for locale(s): ".implode(', ', $locales) ); return 0; } /** * @return array */ protected function getLocales(): array { return $this->argument('lang') ? explode(',', $this->argument('lang')) : [config('app.locale')]; } /** * @return array */ protected function getTypes(): array { return array_keys(array_filter(config('localizator.localize'))); } }