]> git.mxchange.org Git - friendica.git/commitdiff
Fix formatting in Console\PoToPhp
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 24 Mar 2018 20:08:56 +0000 (16:08 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 24 Mar 2018 20:08:56 +0000 (16:08 -0400)
src/Core/Console/PoToPhp.php

index 0a7224503ac3956bdf43f40d6b26f9f143035cab..1cfc1ec7fd93e70b4019c17355a47a05977dae9d 100644 (file)
@@ -98,7 +98,7 @@ HELP;
                                $out .= '}}' . "\n";
                        }
 
-                       if ($k != "" && substr($l, 0, 7) == 'msgstr ') {
+                       if ($k != '' && substr($l, 0, 7) == 'msgstr ') {
                                if ($ink) {
                                        $ink = false;
                                        $out .= '$a->strings["' . $k . '"] = ';
@@ -114,6 +114,7 @@ HELP;
 
                                $inv = true;
                        }
+
                        if ($k != "" && substr($l, 0, 7) == 'msgstr[') {
                                if ($ink) {
                                        $ink = false;
@@ -125,9 +126,10 @@ HELP;
                                }
 
                                if (!$arr) {
-                                       $arr = True;
+                                       $arr = true;
                                        $out .= "[\n";
                                }
+
                                $match = [];
                                preg_match("|\[([0-9]*)\] (.*)|", $l, $match);
                                $out .= "\t"
@@ -152,9 +154,11 @@ HELP;
                                        $inv = false;
                                        $out .= '"' . $v . '"';
                                }
+
                                if ($k != "") {
                                        $out .= ($arr) ? "];\n" : ";\n";
                                }
+
                                $arr = false;
                                $k = str_replace("msgid ", "", $l);
                                if ($k != '""') {