X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FPoToPhp.php;h=b7c9bfaaec4c9326258a102a57b401deb4db5317;hb=9fbaaa1481a609563e00a40db64bdce5e02c5524;hp=1cfc1ec7fd93e70b4019c17355a47a05977dae9d;hpb=91eb64474346a514e27586b831e171b5f08a1a65;p=friendica.git diff --git a/src/Core/Console/PoToPhp.php b/src/Core/Console/PoToPhp.php index 1cfc1ec7fd..b7c9bfaaec 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 { @@ -94,6 +94,7 @@ HELP; $fnname = 'string_plural_select_' . $lang; $out .= 'if(! function_exists("' . $fnname . '")) {' . "\n"; $out .= 'function ' . $fnname . '($n){' . "\n"; + $out .= ' $n = intval($n);' . "\n"; $out .= ' return ' . $cond . ';' . "\n"; $out .= '}}' . "\n"; } @@ -109,7 +110,7 @@ HELP; $out .= '"' . $v . '"'; } - $v = substr($l, 8, $len - 11); + $v = substr($l, 8, $len - 10); $v = preg_replace_callback($escape_s_exp, [$this, 'escapeDollar'], $v); $inv = true;