| @@ 15-32 (lines=18) @@ | ||
| 12 | /** |
|
| 13 | * very quick and dirty solution to import crowdin snippets into the legacy translation system |
|
| 14 | */ |
|
| 15 | class ImportLegacyTranslationCommand extends ContainerAwareCommand |
|
| 16 | { |
|
| 17 | const COMMAND_NAME = 'translation:update-legacy-translation'; |
|
| 18 | ||
| 19 | protected function configure() |
|
| 20 | { |
|
| 21 | parent::configure(); |
|
| 22 | ||
| 23 | $this |
|
| 24 | ->setName(self::COMMAND_NAME) |
|
| 25 | ->setDescription('import translation from crowdin into legacy translation system'); |
|
| 26 | } |
|
| 27 | ||
| 28 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 29 | { |
|
| 30 | $this->getContainer()->get('oc.translation.crowdin_import')->importTranslations(); |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| @@ 12-40 (lines=29) @@ | ||
| 9 | use Symfony\Component\Console\Input\InputInterface; |
|
| 10 | use Symfony\Component\Console\Output\OutputInterface; |
|
| 11 | ||
| 12 | class JournaldPostfixLogsCommand extends ContainerAwareCommand |
|
| 13 | { |
|
| 14 | const COMMAND_NAME = 'postfix:processing-logs'; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * @return void |
|
| 18 | * @throws \Symfony\Component\Console\Exception\InvalidArgumentException |
|
| 19 | */ |
|
| 20 | protected function configure() |
|
| 21 | { |
|
| 22 | parent::configure(); |
|
| 23 | ||
| 24 | $this |
|
| 25 | ->setName(self::COMMAND_NAME) |
|
| 26 | ->setDescription('process postfix logs for support'); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @param \Symfony\Component\Console\Input\InputInterface $input |
|
| 31 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
| 32 | * |
|
| 33 | * @return int|null |
|
| 34 | */ |
|
| 35 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 36 | { |
|
| 37 | $journal = $this->getContainer()->get('oc_bundle.postfix.journal_logs'); |
|
| 38 | $journal->processJournalLogs(); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||