Extract: add default rules

Two purposes:

 * Helps people, reading the code to have a better idea of the structure of the array
 * Reciprocity with `$comment_prefix`, which has a default value

See #25691


git-svn-id: https://develop.svn.wordpress.org/trunk@25918 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Nikolay Bachiyski 2013-10-26 00:45:16 +00:00
parent 38f7bf86c6
commit 97a7dfc936
1 changed files with 7 additions and 1 deletions

View File

@ -9,7 +9,13 @@ require_once "$pomo/translations.php";
*/
class StringExtractor {
var $rules = array();
var $rules = array(
'_' => array( 'string' ),
'__' => array( 'string' ),
'_e' => array( 'string' ),
'_c' => array( 'string' ),
'_n' => array( 'singular', 'plural' ),
);
var $comment_prefix = 'translators:';
function __construct( $rules = array() ) {