WordPress.org

Make WordPress Core

Changeset 29563


Ignore:
Timestamp:
08/21/2014 02:53:16 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Fix strict notices in makepot.

props jdgrimes.
fixes #29254.

Location:
trunk/tools/i18n
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/i18n/extract.php

    r25920 r29563  
    2929            if ( '.' == $file_name || '..' == $file_name ) continue;
    3030            if ( preg_match( '/\.php$/', $file_name ) && $this->does_file_name_match( $prefix . $file_name, $excludes, $includes ) ) {
    31                 $translations->merge_originals_with( $this->extract_from_file( $file_name, $prefix ) );
     31                $extracted = $this->extract_from_file( $file_name, $prefix );
     32                $translations->merge_originals_with( $extracted );
    3233            }
    3334            if ( is_dir( $file_name ) ) {
    34                 $translations->merge_originals_with( $this->extract_from_directory( $file_name, $excludes, $includes, $prefix . $file_name . '/' ) );
     35                $extracted = $this->extract_from_directory( $file_name, $excludes, $includes, $prefix . $file_name . '/' );
     36                $translations->merge_originals_with( $extracted );
    3537            }
    3638        }
  • trunk/tools/i18n/pot-ext-meta.php

    r25254 r29563  
    3333
    3434    function load_from_file($ext_filename) {
    35         $source = MakePOT::get_first_lines($ext_filename);
     35        $makepot = new MakePOT;
     36        $source = $makepot->get_first_lines($ext_filename);
    3637        $pot = '';
     38        $po = new PO;
    3739        foreach($this->headers as $header) {
    38             $string = MakePOT::get_addon_header($header, $source);
     40            $string = $makepot->get_addon_header($header, $source);
    3941            if (!$string) continue;
    4042            $args = array(
     
    4345            );
    4446            $entry = new Translation_Entry($args);
    45             $pot .= "\n".PO::export_entry($entry)."\n";
     47            $pot .= "\n".$po->export_entry($entry)."\n";
    4648        }
    4749        return $pot;
Note: See TracChangeset for help on using the changeset viewer.