Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1999e89

Browse files
committed
[TranslationUpdateCommand] fixed undefined resultMessage var.
1 parent829c011 commit1999e89

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
150150
return;
151151
}
152152

153+
$resultMessage ='Translation files were successfully updated.';
154+
153155
// show compiled list of messages
154156
if (true ===$input->getOption('dump-messages')) {
155157
$extractedMessagesCount =0;
@@ -205,8 +207,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
205207

206208
if (true ===$input->getOption('dump-messages')) {
207209
$resultMessage .=' and translation files were updated.';
208-
}else {
209-
$resultMessage ='Translation files were successfully updated.';
210210
}
211211
}
212212

‎src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ public function testDumpMessagesAndClean()
2828
$tester =$this->createCommandTester($this->getContainer(array('foo' =>'foo')));
2929
$tester->execute(array('command' =>'translation:update','locale' =>'en','bundle' =>'foo','--dump-messages' =>true,'--clean' =>true));
3030
$this->assertRegExp('/foo/',$tester->getDisplay());
31+
$this->assertRegExp('/2 messages were successfully extracted/',$tester->getDisplay());
32+
}
33+
34+
publicfunctiontestWriteMessages()
35+
{
36+
$tester =$this->createCommandTester($this->getContainer(array('foo' =>'foo')));
37+
$tester->execute(array('command' =>'translation:update','locale' =>'en','bundle' =>'foo','--force' =>true));
38+
$this->assertRegExp('/Translation files were successfully updated./',$tester->getDisplay());
3139
}
3240

3341
protectedfunctionsetUp()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp