* @license PHP License * @package WB * @subpackage base */ WBClass::load('WBNLS_Extractor_PHPSystem'); /** * Native Lanauge Support: Extractor Custom PHP Files * * Extract translatable strings from project PHP files * * @version 0.1.0 * @package WB * @subpackage nls */ class WBNLS_Extractor_PHPOther extends WBNLS_Extractor_PHPSystem { /** * actually extract messages * * Extract messages from project's folder * * @return int $total */ protected function extract() { $cnt = 0; $incPath = WBParam::get('wb/class/includePath'); $base = WBParam::get('wb/dir/base'); $system = WBParam::get('wb/dir/system'); foreach ($incPath as $ip) { if (0 == strncmp($base, $ip, strlen($base))) { continue; } if (0 == strncmp($system, $ip, strlen($system))) { continue; } $cnt += $this->extractPhpDir($ip); } return $cnt; // $cnt += $this->extractPhpDir($sys . '/include/patEx'); $base = WBParam::get('wb/dir/base'); // skip if base dir and system dir are the same if ($base == WBParam::get('wb/dir/system')) { return 0; } return $this->extractPhpDir($base . '/include'); } }