]> git.mxchange.org Git - friendica.git/blobdiff - util/po2php.php
Merge pull request #4118 from annando/cleaned-update
[friendica.git] / util / po2php.php
index 199d79ed3b3b9d22e40b2a658b400098edc21ada..75442406a1a54d80c14734258f18f4dd8f64540e 100644 (file)
@@ -86,10 +86,11 @@ function po2php_run(&$argv, &$argc) {
                        }
                        $match = array();
                        preg_match("|\[([0-9]*)\] (.*)|", $l, $match);
-                       $out .= "\t".
-                               preg_replace_callback($escape_s_exp,'escape_s',$match[1])
-                               ." => "
-                               .preg_replace_callback($escape_s_exp,'escape_s',$match[2]) .",\n";
+                       $out .= "\t"
+                               . preg_replace_callback($escape_s_exp, 'escape_s', $match[1])
+                               . " => "
+                               . preg_replace_callback($escape_s_exp, 'escape_s', $match[2])
+                               . ",\n";
                }
 
                if (substr($l, 0, 6) == "msgid_") {
@@ -98,22 +99,21 @@ function po2php_run(&$argv, &$argc) {
                }
 
                if ($ink) {
-                       $k .= trim($l,"\"\r\n");
-                       $k = preg_replace_callback($escape_s_exp,'escape_s',$k);
+                       $k .= trim($l, "\"\r\n");
+                       $k = preg_replace_callback($escape_s_exp, 'escape_s', $k);
                        //$out .= '$a->strings['.$k.'] = ';
                }
 
                if (substr($l, 0, 6) == "msgid ") {
                        if ($inv) {
                                $inv = false;
-                               $out .= '"'.$v.'"';
+                               $out .= '"' . $v . '"';
                        }
                        if ($k != "") {
-                               /// @TODO Maybe add parentheses here?
-                               $out .= $arr ? ");\n" : ";\n";
+                               $out .= ($arr) ? ");\n" : ";\n";
                        }
                        $arr = false;
-                       $k = str_replace("msgid ","",$l);
+                       $k = str_replace("msgid ", "", $l);
                        if ($k != '""') {
                                $k = trim($k, "\"\r\n");
                        } else {