From b059e8df3e45bbf0832e8167366d0d1bd390b23a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 15 Nov 2016 20:53:18 +0000 Subject: [PATCH] I18N: Remove `` tags from translatable strings in `wp-includes/class-wp-customize-manager.php`. Props ramiy. Fixes #38802. git-svn-id: https://develop.svn.wordpress.org/trunk@39254 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-customize-manager.php | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 3aa7ebcf90..0909f4d6aa 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -3552,18 +3552,24 @@ final class WP_Customize_Manager { $width = absint( get_theme_support( 'custom-header', 'width' ) ); $height = absint( get_theme_support( 'custom-header', 'height' ) ); if ( $width && $height ) { - /* translators: %s: header size in pixels */ - $control_description = sprintf( __( 'Upload your video in .mp4 format and minimize its file size for best results. Your theme recommends dimensions of %s pixels.' ), + $control_description = sprintf( + /* translators: 1: .mp4, 2: header size in pixels */ + __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends dimensions of %2$s pixels.' ), + '.mp4', sprintf( '%s × %s', $width, $height ) ); } elseif ( $width ) { - /* translators: %s: header width in pixels */ - $control_description = sprintf( __( 'Upload your video in .mp4 format and minimize its file size for best results. Your theme recommends a width of %s pixels.' ), + $control_description = sprintf( + /* translators: 1: .mp4, 2: header width in pixels */ + __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a width of %2$s pixels.' ), + '.mp4', sprintf( '%s', $width ) ); } else { - /* translators: %s: header height in pixels */ - $control_description = sprintf( __( 'Upload your video in .mp4 format and minimize its file size for best results. Your theme recommends a height of %s pixels.' ), + $control_description = sprintf( + /* translators: 1: .mp4, 2: header height in pixels */ + __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a height of %2$s pixels.' ), + '.mp4', sprintf( '%s', $height ) ); } @@ -3972,10 +3978,17 @@ final class WP_Customize_Manager { if ( $video ) { $size = filesize( $video ); if ( 8 < $size / pow( 1024, 2 ) ) { // Check whether the size is larger than 8MB. - $validity->add( 'size_too_large', __( 'This video file is too large to use as a header video. Try a shorter video or optimize the compression settings and re-upload a file that is less than 8MB. Or, upload your video to YouTube and link it with the option below.' ) ); + $validity->add( 'size_too_large', + __( 'This video file is too large to use as a header video. Try a shorter video or optimize the compression settings and re-upload a file that is less than 8MB. Or, upload your video to YouTube and link it with the option below.' ) + ); } if ( '.mp4' !== substr( $video, -4 ) && '.mov' !== substr( $video, -4 ) ) { // Check for .mp4 or .mov format, which (assuming h.264 encoding) are the only cross-browser-supported formats. - $validity->add( 'invalid_file_type', __( 'Only .mp4 or .mov files may be used for header video. Please convert your video file and try again, or, upload your video to YouTube and link it with the option below.' ) ); + $validity->add( 'invalid_file_type', sprintf( + /* translators: 1: .mp4, 2: .mov */ + __( 'Only %1$s or %2$s files may be used for header video. Please convert your video file and try again, or, upload your video to YouTube and link it with the option below.' ), + '.mp4', + '.mov' + ) ); } } return $validity;