5 $files = array('index.php','boot.php');
6 $files = array_merge($files,glob('mod/*'),glob('include/*'),glob('addon/*/*'));
9 foreach ($files as $file) {
10 $str = file_get_contents($file);
12 $pat = '| t\(([^\)]*)\)|';
13 $patt = '| tt\(([^\)]*)\)|';
15 preg_match_all($pat,$str,$matches);
16 preg_match_all($patt, $str, $matchestt);
20 foreach ($matches[1] as $match) {
21 if (! in_array($match,$arr))
25 if (count($matchestt)){
26 foreach ($matchestt[1] as $match) {
27 $matchtkns = preg_split("|[ \t\r\n]*,[ \t\r\n]*|",$match);
28 if (count($matchtkns)==3 && !in_array($matchtkns,$arr)){
38 function string_plural_select($n){
44 foreach ($arr as $a) {
46 if (substr($a[1],0,1) == '$') {
49 $s .= '$a->strings[' . $a[0] . "] = array(\n";
50 $s .= "\t0 => ". $a[0]. ",\n";
51 $s .= "\t1 => ". $a[1]. ",\n";
54 if (substr($a,0,1) == '$') {
57 $s .= '$a->strings[' . $a . '] = '. $a . ';' . "\n";
61 $zones = timezone_identifiers_list();
62 foreach ($zones as $zone) {
63 $s .= '$a->strings[\'' . $zone . '\'] = \'' . $zone . '\';' . "\n";