Skip to content

Commit

Permalink
#24: Pluralization-translation for number of contents returned
Browse files Browse the repository at this point in the history
  • Loading branch information
obounjerte authored and daverner committed Aug 4, 2021
1 parent c2a78b0 commit a0015d5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
7 changes: 7 additions & 0 deletions Resources/translations/sqli_admin+intl-icu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Content List
num_of_content: >-
{totalCount, plural,
=0 {No Content Found}
one {1 Content Found}
other {# Contents Found}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@ sqli_admin__menu_entities_tab__default: "Doctrine Entities"
sqli_admin__menu_content_list: "Content List"

#Content List
content_list_total_object: "Object"
content_list_total_objects: "Objects"
num_of_content: >-
{totalCount, plural,
=0 {No Content Found}
one {1 Content Found}
other {# Contents Found}
}s
3 changes: 0 additions & 3 deletions Resources/translations/sqli_admin.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,3 @@ element__sidebar_right__edit: "Editer"
sqli_admin__menu_root: "SQLI Toolbox"
sqli_admin__menu_entities_tab__default: "Entités Doctrine"

#Content List
content_list_total_object: "Objet"
content_list_total_objects: "Objets"
6 changes: 1 addition & 5 deletions Resources/views/ContentList/all_content_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@
</div>
<div class="ez-table-header">
<div class="ez-table-header__headline">{{ "Content List"|trans }} --
{% if totalCount > 1 %}
{{ totalCount }}{{ "entity.content_list_total_objects"|trans}}
{% else %}
{{ totalCount }}{{ "content_list_total_object"|trans}}
{% endif %}
{{ "num_of_content"|trans({'totalCount' : totalCount})}}
</div>
</div>
<table class="table">
Expand Down

0 comments on commit a0015d5

Please sign in to comment.