]> git.mxchange.org Git - friendica.git/commitdiff
Fix lang strings object in PhpToPo command
authorArt4 <art4@wlabs.de>
Sun, 10 Nov 2024 22:50:54 +0000 (22:50 +0000)
committerArt4 <art4@wlabs.de>
Sun, 10 Nov 2024 22:50:59 +0000 (22:50 +0000)
src/Console/PhpToPo.php

index ebe49b173648e3a0c54f5ecd0accbd26a72e3b9f..ad377561a26cb6335e8c305d0485d47f402ddbfb 100644 (file)
@@ -7,7 +7,8 @@
 
 namespace Friendica\Console;
 
-use Friendica\App;
+use Friendica\AppHelper;
+use stdClass;
 
 /**
  * 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 = [];
        const NORM_REGEXP = "|[\\\]|";
 
-       /** @var App */
-       private $app;
+       /** @var AppHelper */
+       private $appHelper;
 
-       public function __construct(App $app, array $argv = null)
+       public function __construct(AppHelper $appHelper, array $argv = null)
        {
                parent::__construct($argv);
 
-               $this->app = $app;
+               $this->appHelper = $appHelper;
        }
 
        protected function getHelp()
@@ -66,7 +67,8 @@ HELP;
                        throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
                }
 
-               $a = $this->app;
+               $a          = new stdClass();
+               $a->strings = [];
 
                $phpfile = realpath($this->getArgument(0));