Skip to content

Commit

Permalink
feature #445 Translated all the remaining labels and messages (javier…
Browse files Browse the repository at this point in the history
…eguiluz)

This PR was squashed before being merged into the master branch (closes #445).

Discussion
----------

Translated all the remaining labels and messages

In #444 we translated the boolean labels. This PR translates the reamining labels and messages, so the bundle is now 100% translated.

Commits
-------

c7339ab Translated all the remaining labels and messages
  • Loading branch information
javiereguiluz committed Sep 10, 2015
2 parents 588ac32 + c7339ab commit a48d410
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
16 changes: 16 additions & 0 deletions Resources/translations/EasyAdminBundle.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@
<source>label.false</source>
<target>No</target>
</trans-unit>
<trans-unit id="label.empty">
<source>label.empty</source>
<target>Empty</target>
</trans-unit>
<trans-unit id="label.null">
<source>label.null</source>
<target>Null</target>
</trans-unit>
<trans-unit id="label.inaccessible">
<source>label.inaccessible</source>
<target>Inaccessible</target>
</trans-unit>
<trans-unit id="label.inaccessible.explanation">
<source>label.inaccessible.explanation</source>
<target>Getter method does not exist for this field or the property is not public</target>
</trans-unit>

<!-- misc. elements -->
<trans-unit id="header.close">
Expand Down
4 changes: 3 additions & 1 deletion Resources/views/default/label_empty.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<span class="label label-empty">EMPTY</span>
{% trans_default_domain "EasyAdminBundle" %}

<span class="label label-empty">{{ 'label.empty'|trans }}</span>
6 changes: 5 additions & 1 deletion Resources/views/default/label_inaccessible.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<span class="label label-danger" title="Getter method does not exist for this field or the property is not public">inaccessible</span>
{% trans_default_domain "EasyAdminBundle" %}

<span class="label label-danger" title="{{ 'label.inaccessible.explanation'|trans }}">
{{ 'label.inaccessible'|trans }}
</span>
4 changes: 3 additions & 1 deletion Resources/views/default/label_null.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<span class="label">NULL</span>
{% trans_default_domain "EasyAdminBundle" %}

<span class="label">{{ 'label.null'|trans }}</span>
6 changes: 3 additions & 3 deletions Tests/Controller/CustomizedBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,11 @@ public function testListViewVirtualFields()
{
$crawler = $this->requestListView('Product');

$this->assertCount(15, $crawler->filter('.table tbody td:contains("inaccessible")'));
$this->assertCount(15, $crawler->filter('.table tbody td:contains("Inaccessible")'));

$this->assertEquals('thisFieldIsVirtual', $crawler->filter('.table tbody td:contains("inaccessible")')->first()->attr('data-label'));
$this->assertEquals('thisFieldIsVirtual', $crawler->filter('.table tbody td:contains("Inaccessible")')->first()->attr('data-label'));

$firstVirtualField = $crawler->filter('.table tbody td:contains("inaccessible") span')->first();
$firstVirtualField = $crawler->filter('.table tbody td:contains("Inaccessible") span')->first();
$this->assertEquals('label label-danger', $firstVirtualField->attr('class'));
$this->assertEquals(
'Getter method does not exist for this field or the property is not public',
Expand Down

0 comments on commit a48d410

Please sign in to comment.