Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add context & file name as comment
  • Loading branch information
oandregal committed Apr 5, 2022
commit 2b14dfd9c310cba6708eafb6aa2c2796289ec234
8 changes: 4 additions & 4 deletions src/IterableCodeExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ public static function fromFile( $file_or_files, Translations $translations, arr
);

if ( ! empty( $headers['Title'] ) ) {
$translation = new Translation( '', $headers['Title'] );
$translation->addExtractedComment( 'Title of the pattern' );
$translation = new Translation( 'Title of the pattern', $headers['Title'] );
$translation->addReference( $options[ 'file' ] );

$translations[] = $translation;
}

if ( ! empty( $headers['Description'] ) ) {
$translation = new Translation( '', $headers['Description'] );
$translation->addExtractedComment( 'Description of the pattern' );
$translation = new Translation( 'Description of the pattern', $headers['Description'] );
$translation->addReference( $options[ 'file' ] );

$translations[] = $translation;
}
Expand Down