diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:07:29 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:07:29 -0400 |
commit | 8cd9a1e4fc28d92d270e3f154c144123dca9044a (patch) | |
tree | 20e9d45895fdea5a1af3f4066a95c526e7476a20 /util/po2php.php | |
parent | 20b4fc919871433df6111cbb8b3508fd1693123b (diff) | |
parent | cc09f9a7a5f799a0811ba83799c0a3ac6598c476 (diff) | |
download | volse-hubzilla-8cd9a1e4fc28d92d270e3f154c144123dca9044a.tar.gz volse-hubzilla-8cd9a1e4fc28d92d270e3f154c144123dca9044a.tar.bz2 volse-hubzilla-8cd9a1e4fc28d92d270e3f154c144123dca9044a.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'util/po2php.php')
-rw-r--r-- | util/po2php.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/util/po2php.php b/util/po2php.php index ab8c495f9..a72a65ba1 100644 --- a/util/po2php.php +++ b/util/po2php.php @@ -3,14 +3,21 @@ function po2php_run($argc,$argv) { - if ($argc!=2) { + if ($argc < 2) { print "Usage: ".$argv[0]." <file.po>\n\n"; return; } - + + $rtl = false; + $pofile = $argv[1]; $outfile = dirname($pofile)."/hstrings.php"; + if($argc > 2) { + if($argv[2] === 'rtl') + $rtl = true; + } + if(strstr($outfile,'util')) $lang = 'en'; else @@ -53,6 +60,7 @@ function po2php_run($argc,$argv) { $out .= ' return '.$cond.';'."\n"; $out .= '}}'."\n"; } + $out .= 'App::$rtl = ' . intval($rtl) . ';'; if ($k!="" && substr($l,0,7)=="msgstr "){ if ($ink) { $ink = False; $out .= 'App::$strings["'.$k.'"] = '; } |