Opened 5 years ago
Closed 5 years ago
#49058 closed defect (bug) (fixed)
Twenty Twenty: Comments report
Reported by: | Parvand | Owned by: | ianbelanger |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.3.2 |
Component: | Bundled Theme | Keywords: | good-first-bug has-patch has-screenshots |
Focuses: | template | Cc: |
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)
#1
follow-up:
↓ 7
@
5 years ago
- Keywords reporter-feedback added; needs-design-feedback removed
#2
@
5 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to 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
@
5 years ago
- Keywords needs-patch added
- Resolution worksforme deleted
- Status changed from closed to 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
@
5 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
#6
@
5 years ago
- Keywords has-patch added; reporter-feedback needs-patch removed
- Milestone set to 5.5
#7
in reply to:
↑ 1
@
5 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
@
5 years ago
- Keywords has-screenshots commit added
- Owner set to audrasjb
- Status changed from reopened to 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
@
5 years ago
PS: I tested all the other themes and they are all displaying the correct translation.
#11
@
5 years ago
- Focuses coding-standards removed
- Owner changed from audrasjb to ianbelanger
- Status changed from accepted to assigned
Reviewing for commit.
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 wit translations?