From 97a7dfc93691f1a934ad81d4a329182fe36d67bc Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Sat, 26 Oct 2013 00:45:16 +0000 Subject: [PATCH] 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 --- tools/i18n/extract.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/i18n/extract.php b/tools/i18n/extract.php index bd40f9d056..0e7fd30929 100644 --- a/tools/i18n/extract.php +++ b/tools/i18n/extract.php @@ -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() ) {