Skip to content

Commit

Permalink
adding plurarization test using i18n __n()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rober040992 committed Jan 2, 2025
1 parent d5a4b24 commit 78bde81
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
6 changes: 5 additions & 1 deletion nodepop/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
"Find": "Find",
"Filter-by-max-price": "Filter-by-max-price",
"Reset Filters": "Reset Filters",
"Filter-by-name": "Filter-by-name"
"Filter-by-name": "Filter-by-name",
"raton": {
"one": "mouse",
"other": "mice"
}
}
6 changes: 5 additions & 1 deletion nodepop/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
"Filter-by-max-price": "Precio Máximo",
"Find": "Buscar",
"Reset Filters": "Limpiar Filtros",
"Filter-by-name": "Filtrar por nombre"
"Filter-by-name": "Filtrar por nombre",
"raton": {
"one": "raton",
"other": "ratones"
}
}
7 changes: 7 additions & 0 deletions nodepop/views/home.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
<% }) %>
</div>
<% } %>
<div>
<h3>prueba plural</h3>
<p>0 <%=__n('raton',0) %></p>
<p>1 <%=__n('raton',1) %></p>
<p>2 <%=__n('raton',2) %></p>

</div>
</div>
</div>

Expand Down

0 comments on commit 78bde81

Please sign in to comment.