Skip to content

Commit

Permalink
Merge pull request #66 from bvleur/invalid-message-in-validators-domain
Browse files Browse the repository at this point in the history
Use the "validators" domain for the "invalid_message" options in forms.
  • Loading branch information
schmittjoh committed Aug 1, 2012
2 parents ef78903 + 3a40fc2 commit 1f9ae6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/Translation/Extractor/File/FormExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function testExtract()
$message->addSource(new FileSource($path, 50));
$expected->add($message);

$message = new Message('form.error.password_mismatch');
$message = new Message('form.error.password_mismatch', 'validators');
$message->setDesc('The entered passwords do not match');
$message->addSource(new FileSource($path, 47));
$expected->add($message);
Expand Down
2 changes: 2 additions & 0 deletions Translation/Extractor/File/FormExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ public function enterNode(\PHPParser_Node $node)
$this->parseItem($sitem, $domain);
}
}
} elseif ('invalid_message' === $item->key->value) {
$this->parseItem($item, 'validators');
} else {
$this->parseItem($item, $domain);
}
Expand Down

0 comments on commit 1f9ae6d

Please sign in to comment.