aboutsummaryrefslogtreecommitdiffstats
path: root/util/po2php.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-20 09:31:27 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-20 09:31:27 +0200
commite40112b40dc7dd0e8b235800d85ef070f428e2c2 (patch)
treeb9265650b08bde6762ce4a1494316d1e5458f402 /util/po2php.php
parent7a4efcf67f57d6437af5596ad99920c1793cf450 (diff)
parentcc09f9a7a5f799a0811ba83799c0a3ac6598c476 (diff)
downloadvolse-hubzilla-e40112b40dc7dd0e8b235800d85ef070f428e2c2.tar.gz
volse-hubzilla-e40112b40dc7dd0e8b235800d85ef070f428e2c2.tar.bz2
volse-hubzilla-e40112b40dc7dd0e8b235800d85ef070f428e2c2.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'util/po2php.php')
-rw-r--r--util/po2php.php12
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.'"] = '; }