Ticket #34749: 34749-i18n-svn.diff
| File 34749-i18n-svn.diff, 1.1 KB (added by , 11 years ago) |
|---|
-
add-textdomain.php
3 3 * Console application, which adds textdomain argument 4 4 * to all i18n function calls 5 5 * 6 * @author7 * @version $Id$8 6 * @package wordpress-i18n 9 7 */ 10 8 error_reporting(E_ALL); … … 16 14 var $modified_contents = ''; 17 15 var $funcs; 18 16 19 function AddTextdomain() { 17 /** 18 * PHP5 constructor. 19 */ 20 function __construct() { 20 21 $makepot = new MakePOT; 21 22 $this->funcs = array_keys( $makepot->rules ); 22 23 } 23 24 25 /** 26 * PHP4 constructor. 27 */ 28 public function AddTextdomain() { 29 _deprecated_constructor( 'AddTextdomain' , '4.3' ); 30 } 31 24 32 function usage() { 25 33 $usage = "Usage: php add-textdomain.php [-i] <domain> <file>\n\nAdds the string <domain> as a last argument to all i18n function calls in <file>\nand prints the modified php file on standard output.\n\nOptions:\n -i Modifies the PHP file in place, instead of printing it to standard output.\n"; 26 34 fwrite(STDERR, $usage);