aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorOlivier Migeot <olivier@migeot.org>2011-10-04 11:45:57 +0200
committerOlivier Migeot <olivier@migeot.org>2011-10-04 11:45:57 +0200
commit273594af62c960b5a52da5ec1cf6d6bd450415ba (patch)
tree5f79914d28c343f7642ecb13b99f9e0e3f5090a7 /util
parent1548449586f17c0ef9bfab0ffb16f2a495fc6082 (diff)
parentdfd5cc57c2134067dc6229b8583b5e808f160004 (diff)
downloadvolse-hubzilla-273594af62c960b5a52da5ec1cf6d6bd450415ba.tar.gz
volse-hubzilla-273594af62c960b5a52da5ec1cf6d6bd450415ba.tar.bz2
volse-hubzilla-273594af62c960b5a52da5ec1cf6d6bd450415ba.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'util')
-rw-r--r--util/po2php.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/po2php.php b/util/po2php.php
index 1a86bb38d..c703172af 100644
--- a/util/po2php.php
+++ b/util/po2php.php
@@ -10,7 +10,14 @@ function po2php_run($argv, $argc) {
$pofile = $argv[1];
$outfile = dirname($pofile)."/strings.php";
-
+
+ if(strstr($outfile,'util'))
+ $lang = 'en';
+ else
+ $lang = str_replace('-','_',basename(dirname($pofile)));
+
+
+
if (!file_exists($pofile)){
print "Unable to find '$pofile'\n";
return;
@@ -37,7 +44,7 @@ function po2php_run($argv, $argc) {
$match=Array();
preg_match("|nplurals=([0-9]*); *plural=(.*)[;\\\\]|", $l, $match);
$cond = str_replace('n','$n',$match[2]);
- $out .= 'function string_plural_select($n){'."\n";
+ $out .= 'function string_plural_select_' . $lang . '($n){'."\n";
$out .= ' return '.$cond.';'."\n";
$out .= '}'."\n";
}