WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31921 closed defect (bug) (fixed)

String not i18n and produces error

Reported by: dimadin Owned by: ocean90
Milestone: 4.2 Priority: low
Severity: normal Version: 4.2
Component: I18N Keywords: i18n-change
Focuses: Cc:
PR Number:

Description

In [31941] one string is decoupled, but one of new strings is not i18n, and it also produces error because there is one argument for printf but it assumes there should be two.

You can test this if you remove lines 1218-1222 from wp-includes/comment-template.php.

Attachments (1)

31921.patch (689 bytes) - added by dimadin 5 years ago.

Download all attachments as: .zip

Change History (7)

@dimadin
5 years ago

#1 @netweb
5 years ago

  • Keywords i18n-change added
  • Milestone changed from Awaiting Review to 4.2
  • Priority changed from normal to low

Similar to another i18n ticket about to be created I think Response should not be capitalised:

  • src/wp-includes/theme-compat/comments.php

     
    2626        <h3 id="comments">
    2727                <?php
    2828                        if ( 1 == get_comments_number() ) {
    29                                 printf( 'One Response to %2$s',  '&#8220;' . get_the_title() . '&#8221;' );
     29                                printf( __( 'One response to %s' ),  '&#8220;' . get_the_title() . '&#8221;' );
    3030                        } else {
    31                                 printf( _n( '%1$s Response to %2$s', '%1$s Responses to %2$s', get_comments_number() ),
     31                                printf( _n( '%1$s response to %2$s', '%1$s responses to %2$s', get_comments_number() ),
    3232                                        number_format_i18n( get_comments_number() ),  '&#8220;' . get_the_title() . '&#8221;' );
    3333                        }
    3434                ?>

This ticket was mentioned in Slack in #core by drew. View the logs.


5 years ago

#3 @ocean90
5 years ago

  • Owner set to ocean90
  • Status changed from new to accepted

#4 @SergeyBiryukov
5 years ago

I'd suggest fixing the bug in 4.2 and leaving capitalization correction for #31927.

#5 @ocean90
5 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 32084:

Theme Compat: Make string translatable and add translator comments. Added in [31941].

props dimadin.
see #28502.
fixes #31921.

#6 @netweb
5 years ago

Not sure why the new string in r32084 was introduced as One Response to %s :/

I added a note in #31927 to pick up the capitalisation corrections from here also.

Version 0, edited 5 years ago by netweb (next)
Note: See TracTickets for help on using tickets.