experimental rtl support; this will probably require a fair bit of work.

This commit is contained in:
redmatrix
2016-06-19 21:10:57 -07:00
parent 30841d9470
commit 905374c86e
3 changed files with 18 additions and 3 deletions

View File

@@ -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.'"] = '; }