-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Comments Title: Count toggle working in 'Singular' editing mode (fix) #40728
Conversation
Size Change: +22 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @c4rl0sbr4v0!
@c4rl0sbr4v0 @ockham a corresponding PR against wordpress-develop will be needed to backport this into WordPress 6.0. Would you please create one? Edit: or will it? If no unit tests break, we may be good here. |
We have both singular and plural editing on the comment title. Also, we have an option for showing comments count or not. In singular, this last option was not taken into account, showing always the same placeholder. 'One response' Also, to keep consistency, we change uppercase or lowercase on R letter of Response depending on we are enabling or disabling the comments count.
I cherry picked this change into |
@adamziel I don't think these can go in to 6.0 because of the string freeze last week. The exception to that would be to use the existing strings in WP comments.
The logic seems to be a little off too. My understanding is that some languages may replace the function with something that considers different forms for more than two strings. |
What?
Fixes #40541
Also, to keep consistency, we change uppercase or lowercase on R letter of Response depending on we are enabling or disabling the comments count.
Why?
We have both singular and plural editing on the comment title. Also, we have an option for showing comments count or not.
In singular, this last option was not taken into account, showing always the same placeholder. 'One response'
How?
Adding new strings placeholders.
Testing Instructions
1.) Go to site editor -> single template. Add Comments Query Loop.
2.) Click on Comments Title block. Play with the different options.
3.) Check that placeholders are being updated depending on Comments Count and Singular/Plural.
4.) Save and check that the frontend is applying those placeholders.
Screenshots or screencast
https://www.loom.com/share/43d3e66bde534d7dac86b2040e2a03fe