I love create pot, from repository root dir

This commit is contained in:
Renato Covarrubias 2013-09-16 20:41:16 -03:00
parent 551d63927d
commit 58db9cafe1
2 changed files with 8 additions and 6 deletions

View File

@ -11,7 +11,9 @@
* Note: this file is locked by default since it should not be publicly accessible
* on a live website. You can unlock it by temporarily removing the following line.
*/
exit( 'Locked' );
//exit( 'Locked' );
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__));
if(isset($_SERVER['SHELL'])){
$is_shell = True;
@ -20,7 +22,7 @@ if(isset($_SERVER['SHELL'])){
}
// Load the makepot generator
require './makepot.php';
require 'makepot.php';
$makepot = new WC_Makepot;
// Regeneration requested

View File

@ -62,7 +62,7 @@ class WC_Makepot {
*/
public function __construct() {
// Default path
$this->set_woocommerce_path( '../../' );
$this->set_woocommerce_path( dirname(__FILE__) . '/../..' );
// All available projects with their settings
$this->projects = array(
@ -84,9 +84,9 @@ class WC_Makepot {
error_reporting(E_ALL);
// Load required files and objects
require_once './not-gettexted.php';
require_once './pot-ext-meta.php';
require_once './extract/extract.php';
require_once 'not-gettexted.php';
require_once 'pot-ext-meta.php';
require_once 'extract/extract.php';
$this->extractor = new StringExtractor( $this->rules );
}