diff --git a/tools/i18n/extract.php b/tools/i18n/extract.php index edd274fb46..f819f0a4fc 100644 --- a/tools/i18n/extract.php +++ b/tools/i18n/extract.php @@ -40,7 +40,7 @@ class StringExtractor { function extract_from_file( $file_name, $prefix ) { $code = file_get_contents( $file_name ); - return $this->extract_entries( $code, $prefix . $file_name ); + return $this->extract_from_code( $code, $prefix . $file_name ); } function does_file_name_match( $path, $excludes, $includes ) { @@ -126,7 +126,7 @@ class StringExtractor { return $entry; } - function extract_entries( $code, $file_name ) { + function extract_from_code( $code, $file_name ) { $translations = new Translations; $function_calls = $this->find_function_calls( array_keys( $this->rules ), $code ); foreach( $function_calls as $call ) { diff --git a/tools/i18n/t/ExtractTest.php b/tools/i18n/t/ExtractTest.php index c1deea35c0..32f62797e0 100644 --- a/tools/i18n/t/ExtractTest.php +++ b/tools/i18n/t/ExtractTest.php @@ -13,7 +13,7 @@ class ExtractTest extends PHPUnit_Framework_TestCase { function test_with_just_a_string() { $expected = new Translation_Entry( array( 'singular' => 'baba', 'references' => array('baba.php:1') ) ); - $result = $this->extractor->extract_entries('', 'baba.php' ); + $result = $this->extractor->extract_from_code('', 'baba.php' ); $this->assertEquals( $expected, $result->entries['baba'] ); }