SalvatoreRecharger.php 6,54 Kio
<?php
/*
This file is part of Salvatore, the translation robot of Trad-lang (SPIP)
Salvatore is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Trad-Lang is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Trad-Lang; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright 2003-2020
Florent Jugla <florent.jugla@eledo.com>,
Philippe Riviere <fil@rezo.net>,
Chryjs <chryjs!@!free!.!fr>,
kent1 <kent1@arscenic.info>
Cerdic <cedric@yterium.com>
*/
/**
* Prend les fichiers de langue de référence de salvatore/modules/ et met à jour la base de données
* pour les modules decrits dans le fichier traductions/traductions.txt
*
*/
use Spip\Cli\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Helper\ProgressHelper;
class SalvatoreRecharger extends Command {
protected function configure(){
$this
->setName('salvatore:recharger')
->setDescription('Tirer&Lire les modules modifies des fichiers de langue de référence de salvatore/modules/')
->addOption(
'traductions',
null,
InputOption::VALUE_REQUIRED,
'Chemin vers le fichier traductions.txt a utiliser [salvatore/traductions/traductions.txt]',
null
)
->addOption(
'changelog',
null,
InputOption::VALUE_REQUIRED,
'Chemin vers le fichier JSON changelog des dernières modifications sur la zone',
null
)
->addOption(
'from',
null,
InputOption::VALUE_REQUIRED,
'Date ou intervalle de temps sur lequel considerer les changements. Defaut : -1hour',
null
)
->addOption(
'module',