X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FPoToPhp.php;h=d539eae5b6a3f221317fbe5cb58ccff1f5664889;hb=efe358c617d18740b63cd0dcb1ee23591fcb0e2d;hp=e97e1ff3d9cfedd31751f4e1b29ba8e522e0a535;hpb=78114c13d5ce27b36682a960859056d4ebf9d9be;p=friendica.git diff --git a/src/Core/Console/PoToPhp.php b/src/Core/Console/PoToPhp.php index e97e1ff3d9..d539eae5b6 100644 --- a/src/Core/Console/PoToPhp.php +++ b/src/Core/Console/PoToPhp.php @@ -5,7 +5,7 @@ namespace Friendica\Core\Console; /** * Read a messages.po file and create strings.php in the same directory * - * @author Hypolite Petovan + * @author Hypolite Petovan */ class PoToPhp extends \Asika\SimpleConsole\Console { @@ -47,8 +47,6 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - $a = get_app(); - $pofile = realpath($this->getArgument(0)); if (!file_exists($pofile)) { @@ -61,7 +59,7 @@ HELP; $outfile = dirname($pofile) . DIRECTORY_SEPARATOR . 'strings.php'; - if (strstr($outfile, 'util')) { + if (basename(dirname($pofile)) == 'C') { $lang = 'en'; } else { $lang = str_replace('-', '_', basename(dirname($pofile))); @@ -106,7 +104,6 @@ HELP; } if ($inv) { - $inv = false; $out .= '"' . $v . '"'; } @@ -179,7 +176,6 @@ HELP; } if ($inv) { - $inv = false; $out .= '"' . $v . '"'; }