Opened 7 years ago
Closed 6 years ago
#49058 closed defect (bug) (fixed)
Twenty Twenty: Comments report
| Reported by: | Parvand | Owned by: | ianbelanger |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.5 |
| Component: | Bundled Theme | Version: | 5.3.2 |
| Severity: | normal | Keywords: | good-first-bug has-patch has-screenshots |
| Cc: | Focuses: | template |
Description
problem in comments.php
at line 35 where it starts:
} elseif ( '1' === $comments_number ) {
its not work for translate. I think it should be as follows:
} elseif ( '1' == $comments_number ) {
i change and it work now.
in twentynineteen its :
if ( '1' == $discussion->responses ) {
is that problem or not?
Attachments (9)
Change History (23)
#2
@
7 years ago
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → closed
@Parvand I am going to close this out because the lines you mentioned are correct from a code standpoint.
If you are still experiencing issues, please reopen the ticket and add more details about the problem with translations so it can be troubleshooted further.
#3
@
6 years ago
- Keywords needs-patch added
- Resolution worksforme
- Status closed → reopened
Hey there
The issue is still there, but here is the real bug :
Line 26 : $comments_number = absint( get_comments_number() );
Line 36 : } elseif ( '1' === $comments_number ) {
This is why this if can't be triggered.
The patch is : } elseif ( 1 === $comments_number ) {
Have a good day
#5
@
6 years ago
Hey,
This is my first contribution, i applied the patch proposed by Julio.
I added screenshots before/after applying patch, it seems ok.
Could someone check if everything is ok ?
Thanks
#7
in reply to: ↑ 1
@
6 years ago
Replying to SergeyBiryukov:
Hi there, welcome to WordPress Trac! Thanks for the report.
That condition is correct as is, since
get_comments_number()returns a numeric string, not an integer. It's also the same in other bundled themes (except for Twenty Nineteen). See #38369 for more details.
Could you clarify what exactly is the problem with translations?
#9
@
6 years ago
- Keywords has-screenshots commit added
- Owner set to
- Status reopened → accepted
@SergeyBiryukov I think the previous commenters are right, Twenty Twenty will never apply this translation.
The current patch fixes the issue on my side.
Marking this ticket for commit.
#10
@
6 years ago
PS: I tested all the other themes and they are all displaying the correct translation.
#11
@
6 years ago
- Focuses coding-standards removed
- Owner changed from to
- Status accepted → assigned
Reviewing for commit.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, welcome to WordPress Trac! Thanks for the report.
That condition is correct as is, since
get_comments_number()returns a numeric string, not an integer. It's also the same in other bundled themes (except for Twenty Nineteen). See #38369 for more details.Could you clarify what exactly is the problem with translations?