Convert english translation file

- convert english translation to translate key
- remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material)
- fix tests about text in response (now checking translation key instead of translated text)
- remove all ugly `<div class="hidden">{{ form_rest(form) }}</div>`
This commit is contained in:
Jeremy Benoist
2016-03-09 08:59:08 +01:00
parent d2b4f01d74
commit 0d42217e4e
80 changed files with 1145 additions and 868 deletions

View File

@ -54,8 +54,8 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$this->assertTrue($content->getTags()->contains($tag));
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
$this->assertContains('Import summary', $alert[0]);
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
$this->assertContains('Import summary', $body[0]);
}
public function testImportWallabagWithFileAndMarkAllAsRead()
@ -99,7 +99,8 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$this->assertTrue($content2->isArchived());
$this->assertContains('Import summary', $client->getResponse()->getContent());
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
$this->assertContains('Import summary', $body[0]);
}
public function testImportWallabagWithEmptyFile()
@ -122,7 +123,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$crawler = $client->followRedirect();
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
$this->assertContains('Import failed, please try again', $alert[0]);
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
$this->assertContains('Import failed, please try again', $body[0]);
}
}

View File

@ -39,8 +39,8 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
$crawler = $client->followRedirect();
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
$this->assertContains('Import summary', $alert[0]);
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
$this->assertContains('Import summary', $body[0]);
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
@ -87,7 +87,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
$crawler = $client->followRedirect();
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
$this->assertContains('Import failed, please try again', $alert[0]);
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
$this->assertContains('Import failed, please try again', $body[0]);
}
}

View File

@ -85,7 +85,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('Pocket', $pocketImport->getName());
$this->assertNotEmpty($pocketImport->getUrl());
$this->assertContains('This importer will import all your Pocket data.', $pocketImport->getDescription());
$this->assertEquals('import.pocket.description', $pocketImport->getDescription());
}
public function testOAuthRequest()

View File

@ -45,7 +45,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('wallabag v1', $wallabagV1Import->getName());
$this->assertNotEmpty($wallabagV1Import->getUrl());
$this->assertContains('This importer will import all your wallabag v1 articles.', $wallabagV1Import->getDescription());
$this->assertEquals('import.wallabag_v1.description', $wallabagV1Import->getDescription());
}
public function testImport()

View File

@ -45,7 +45,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('wallabag v2', $wallabagV2Import->getName());
$this->assertNotEmpty($wallabagV2Import->getUrl());
$this->assertContains('This importer will import all your wallabag v2 articles.', $wallabagV2Import->getDescription());
$this->assertEquals('import.wallabag_v2.description', $wallabagV2Import->getDescription());
}
public function testImport()