#!/usr/bin/php $nodes) { $dirpath = ($dirpath ? BSFunctions::FetchSourcePath($dirpath) : ''); foreach ($nodes AS $file) { $ext = BSFunctions::FetchExtension($file); if ($ext == 'php') { $files[] = '.' . BSFunctions::FetchSourcePath($search) . $dirpath . $file; } else if ($ext == 'xml' OR $ext == 'tpl' OR $ext == 'html' OR $ext == 'htm') { $templates[] = array( 'orig' => '.' . BSFunctions::FetchSourcePath($search) . $dirpath . $file, 'temp' => '.' . BSFunctions::FetchSourcePath($search) . $dirpath . 'xgtxt-' . $file . '.php' ); } } } // ################################################################### // compile the templates into gettext-friendly PHP code function process_template_text($text) { return ''; } foreach ($templates AS $paths) { $template = file_get_contents($paths['orig']); $template = preg_replace('#\{@\\"(.*?)\\"\}#ise', 'process_template_text(\'$1\')', $template); file_put_contents($paths['temp'], $template); $files[] = $paths['temp']; $removelater[] = $paths['temp']; } // ################################################################### // run xgettext on all of the various files that we have now created // ################################################################### // remove all the files we no longer need foreach ($removelater AS $path) { unlink($path); } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>