Merge branch 'dev' into 'dev'
Better plural function detection See merge request hubzilla/core!1753
This commit is contained in:
commit
aa330bc8c7
@ -52,7 +52,7 @@ function po2php_run($argc,$argv) {
|
|||||||
if ($l[0]=="#") $l="";
|
if ($l[0]=="#") $l="";
|
||||||
if (substr($l,0,15)=='"Plural-Forms: '){
|
if (substr($l,0,15)=='"Plural-Forms: '){
|
||||||
$match=Array();
|
$match=Array();
|
||||||
preg_match("|nplurals=([0-9]*);\s*plural=(.*)[;\\\\]|", $l, $match);
|
preg_match("|nplurals=([0-9]*);\s*plural=([^;\\\\]*)|", $l, $match);
|
||||||
$cond = str_replace('n','$n',$match[2]);
|
$cond = str_replace('n','$n',$match[2]);
|
||||||
$out .= 'if(! function_exists("' . 'string_plural_select_' . $lang .'")) {' . "\n";
|
$out .= 'if(! function_exists("' . 'string_plural_select_' . $lang .'")) {' . "\n";
|
||||||
$out .= 'function string_plural_select_' . $lang . '($n){'."\n";
|
$out .= 'function string_plural_select_' . $lang . '($n){'."\n";
|
||||||
|
Reference in New Issue
Block a user