Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#34249 closed defect (bug) (fixed)

Some issues with _doing_it_wrong()

Reported by: pavelevap's profile pavelevap Owned by: drewapicture's profile DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: I18N Keywords: has-patch needs-refresh
Focuses: Cc:

Description

$message in _doing_it_wrong() function calls should always end with point, because it is part of the whole paragraph, see attached screenshot.

$version in _doing_it_wrong() function calls should always be only WordPress version, because it is part of other sentence This message was added in version %s.

For missing callable function it would be helpfull refering to add_shortcode() instead of do_shortcode_tag(), I guess.

We are also missing some translators comments (not part of current patch). For example %s must set a database connection for use with escaping. is hard for translators when they do not know what is %s.

Attachments (2)

Error_message_without_point.png (6.2 KB) - added by pavelevap 9 years ago.
34249.patch (2.6 KB) - added by pavelevap 9 years ago.

Download all attachments as: .zip

Change History (7)

@pavelevap
9 years ago

#1 follow-up: @swissspidy
9 years ago

  • Keywords has-patch needs-refresh added
  • Milestone changed from Awaiting Review to 4.4

+1 for adding fullstops and removing spaces.

+1 for changing WPAPI-2.0 to 4.4.0. Perhaps in a separate ticket though. (ping @rmccue)

-1 to changing __FUNCTION__ to 'add_shortcode'

Note: The _doing_it_wrong for the shortcode was added in [32867] (see #32445).

+1 for adding a translator comment to that message you mentioned. In that message, %s refers to the database access abstraction class (usually wpdb or a class extending wpdb).

#2 in reply to: ↑ 1 @SergeyBiryukov
9 years ago

Replying to swissspidy:

+1 for changing WPAPI-2.0 to 4.4.0. Perhaps in a separate ticket though. (ping @rmccue)

See #34490.

#3 @DrewAPicture
9 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 35542:

I18N: Add translator comments to three _doing_it_wrong() messages added for 4.3 and 4.4.

Also adds a full-stop to an invalid taxonomy message introduced in [34745] and later modified in [35428] for wp_insert_post().

Props pavelevap.
Fixes #34249.

#4 @SergeyBiryukov
9 years ago

In 35543:

Use correct placeholders in translator comments added in [35542].

See #34249.

#5 @SergeyBiryukov
9 years ago

In 35544:

I18N: Add a translator comment for the string introduced in [24758] and made translatable in [29840].

Props swissspidy.
See #34249.

Note: See TracTickets for help on using tickets.