Changeset 29563
- Timestamp:
- 08/21/2014 02:53:16 AM (11 years ago)
- Location:
- trunk/tools/i18n
- Files:
-
- 2 edited
-
extract.php (modified) (1 diff)
-
pot-ext-meta.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/i18n/extract.php
r25920 r29563 29 29 if ( '.' == $file_name || '..' == $file_name ) continue; 30 30 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 ); 32 33 } 33 34 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 ); 35 37 } 36 38 } -
trunk/tools/i18n/pot-ext-meta.php
r25254 r29563 33 33 34 34 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); 36 37 $pot = ''; 38 $po = new PO; 37 39 foreach($this->headers as $header) { 38 $string = MakePOT::get_addon_header($header, $source);40 $string = $makepot->get_addon_header($header, $source); 39 41 if (!$string) continue; 40 42 $args = array( … … 43 45 ); 44 46 $entry = new Translation_Entry($args); 45 $pot .= "\n". PO::export_entry($entry)."\n";47 $pot .= "\n".$po->export_entry($entry)."\n"; 46 48 } 47 49 return $pot;
Note: See TracChangeset
for help on using the changeset viewer.