mirror of
https://github.com/friendica/friendica
synced 2025-01-03 19:22:18 +00:00
Fix lang strings object in PhpToPo command
This commit is contained in:
parent
59292571e0
commit
712b9e9610
1 changed files with 8 additions and 6 deletions
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
namespace Friendica\Console;
|
namespace Friendica\Console;
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\AppHelper;
|
||||||
|
use stdClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read a strings.php file and create messages.po in the same directory
|
* Read a strings.php file and create messages.po in the same directory
|
||||||
|
@ -20,14 +21,14 @@ class PhpToPo extends \Asika\SimpleConsole\Console
|
||||||
private $normBaseMsgIds = [];
|
private $normBaseMsgIds = [];
|
||||||
const NORM_REGEXP = "|[\\\]|";
|
const NORM_REGEXP = "|[\\\]|";
|
||||||
|
|
||||||
/** @var App */
|
/** @var AppHelper */
|
||||||
private $app;
|
private $appHelper;
|
||||||
|
|
||||||
public function __construct(App $app, array $argv = null)
|
public function __construct(AppHelper $appHelper, array $argv = null)
|
||||||
{
|
{
|
||||||
parent::__construct($argv);
|
parent::__construct($argv);
|
||||||
|
|
||||||
$this->app = $app;
|
$this->appHelper = $appHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHelp()
|
protected function getHelp()
|
||||||
|
@ -66,7 +67,8 @@ HELP;
|
||||||
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
|
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
|
||||||
}
|
}
|
||||||
|
|
||||||
$a = $this->app;
|
$a = new stdClass();
|
||||||
|
$a->strings = [];
|
||||||
|
|
||||||
$phpfile = realpath($this->getArgument(0));
|
$phpfile = realpath($this->getArgument(0));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue