Database: Add translators comment for error message in `wpdb::prepare()`.

Props felipeelia.
Fixes #42142.

Built from https://develop.svn.wordpress.org/trunk@41828


git-svn-id: http://core.svn.wordpress.org/trunk@41662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2017-10-11 08:35:47 +00:00
parent 3ba66a0030
commit 8b4a8b6c15
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-beta1-41827'; $wp_version = '4.9-beta1-41828';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -1261,6 +1261,7 @@ class wpdb {
if ( count ( $args ) !== $placeholders ) { if ( count ( $args ) !== $placeholders ) {
wp_load_translations_early(); wp_load_translations_early();
_doing_it_wrong( 'wpdb::prepare', _doing_it_wrong( 'wpdb::prepare',
/* translators: 1: number of placeholders, 2: number of arguments passed */
sprintf( __( 'The query does not contain the correct number of placeholders (%1$d) for the number of arguments passed (%2$d).' ), sprintf( __( 'The query does not contain the correct number of placeholders (%1$d) for the number of arguments passed (%2$d).' ),
$placeholders, $placeholders,
count( $args ) ), count( $args ) ),