aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-19 21:10:57 -0700
committerredmatrix <git@macgirvin.com>2016-06-19 21:10:57 -0700
commit905374c86ef78dd6a2c1f7e37b6d290428e6259e (patch)
treebea876dfb4a4f30ffdc4cff75b70edd1b595f9d8 /util
parent30841d94709f025a03362b711c4dc2fee85285a7 (diff)
downloadvolse-hubzilla-905374c86ef78dd6a2c1f7e37b6d290428e6259e.tar.gz
volse-hubzilla-905374c86ef78dd6a2c1f7e37b6d290428e6259e.tar.bz2
volse-hubzilla-905374c86ef78dd6a2c1f7e37b6d290428e6259e.zip
experimental rtl support; this will probably require a fair bit of work.
Diffstat (limited to 'util')
-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.'"] = '; }