Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format number choice #148

Open
pjam opened this issue May 6, 2015 · 6 comments
Open

Format number choice #148

pjam opened this issue May 6, 2015 · 6 comments

Comments

@pjam
Copy link
Contributor

pjam commented May 6, 2015

Just a minor correction.
In list view, when only 1 object is created, it reads "Showing all 1 results", where it should be "Showing all 1 result" or "Showing 1 result".

@pjam pjam changed the title Format number choice Format number choice easy-pick May 7, 2015
@pjam pjam changed the title Format number choice easy-pick Format number choice May 7, 2015
@ioleo
Copy link
Member

ioleo commented May 10, 2015

This can be changed by editing the nbresults.php.twig template here adding another if

(if results > 1 ---> current behaviour, if results == 1 --> new message)

@sescandell
Copy link
Member

The right way to do is to use a trans_choice in place of trans

@pjam
Copy link
Contributor Author

pjam commented May 11, 2015

Yeah, that was my first thought, but looking at the code I see I would have to create the echo_transchoice method and for me its not worth the trouble, I'll go for the condition loostro suggested.
Anyway the issue is here for any contributor to take it and solve it.

@pjam
Copy link
Contributor Author

pjam commented Jun 17, 2015

Is it possible to override the nbresults template without changing the vendor file? I've been trying to do it without success...

@bobvandevijver
Copy link
Member

@pjam Yes, but you will have to follow this cookbook item: Extending generator templates.

@pjam
Copy link
Contributor Author

pjam commented Jun 18, 2015

Thanks @bobvandevijver exactly what I needed!

bobvandevijver added a commit that referenced this issue Aug 11, 2015
Fix for nbresults.html.twig when there is only one result #148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants