WordPress.org

Make WordPress Core

Ticket #34749: 34749-i18n-svn.diff

File 34749-i18n-svn.diff, 1.1 KB (added by netweb, 6 years ago)
  • add-textdomain.php

     
    33 * Console application, which adds textdomain argument
    44 * to all i18n function calls
    55 *
    6  * @author
    7  * @version $Id$
    86 * @package wordpress-i18n
    97 */
    108error_reporting(E_ALL);
     
    1614        var $modified_contents = '';
    1715        var $funcs;
    1816
    19         function AddTextdomain() {
     17        /**
     18         * PHP5 constructor.
     19         */
     20        function __construct() {
    2021                $makepot = new MakePOT;
    2122                $this->funcs = array_keys( $makepot->rules );
    2223        }
    2324
     25        /**
     26         * PHP4 constructor.
     27         */
     28        public function AddTextdomain() {
     29                _deprecated_constructor( 'AddTextdomain' , '4.3'  );
     30        }
     31
    2432        function usage() {
    2533                $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";
    2634                fwrite(STDERR, $usage);