aboutsummaryrefslogtreecommitdiffstats
path: root/util/po2php.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-28 19:58:05 -0700
committerredmatrix <git@macgirvin.com>2016-07-28 19:58:05 -0700
commitae5c10a71cd29722f63b379b62801dea52a9ab8f (patch)
tree5c9c0c6668369f5ffbd4f5c7b635c9c1ec96b996 /util/po2php.php
parent2d4b75428a87038b9a637bf49fc0a91c91b392fb (diff)
parent4d5202353fbce12f19fbe578205259d2a7bd3f04 (diff)
downloadvolse-hubzilla-1.10.tar.gz
volse-hubzilla-1.10.tar.bz2
volse-hubzilla-1.10.zip
Merge branch '1.10RC'1.10
Diffstat (limited to 'util/po2php.php')
-rw-r--r--util/po2php.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/util/po2php.php b/util/po2php.php
index ab8c495f9..50941c062 100644
--- a/util/po2php.php
+++ b/util/po2php.php
@@ -1,16 +1,22 @@
<?php
-
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
@@ -52,6 +58,8 @@ function po2php_run($argc,$argv) {
$out .= 'function string_plural_select_' . $lang . '($n){'."\n";
$out .= ' return '.$cond.';'."\n";
$out .= '}}'."\n";
+
+ $out .= 'App::$rtl = ' . intval($rtl) ;
}
if ($k!="" && substr($l,0,7)=="msgstr "){