I18N: Remove `<code>` tags from translatable strings in `wp-includes/class-wp-customize-manager.php`.

Props ramiy.
Fixes #38802.
Built from https://develop.svn.wordpress.org/trunk@39254


git-svn-id: http://core.svn.wordpress.org/trunk@39194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-11-15 20:54:30 +00:00
parent a45e419926
commit ec0043c279
2 changed files with 22 additions and 9 deletions

View File

@ -3552,18 +3552,24 @@ final class WP_Customize_Manager {
$width = absint( get_theme_support( 'custom-header', 'width' ) ); $width = absint( get_theme_support( 'custom-header', 'width' ) );
$height = absint( get_theme_support( 'custom-header', 'height' ) ); $height = absint( get_theme_support( 'custom-header', 'height' ) );
if ( $width && $height ) { if ( $width && $height ) {
/* translators: %s: header size in pixels */ $control_description = sprintf(
$control_description = sprintf( __( 'Upload your video in <code>.mp4</code> format and minimize its file size for best results. Your theme recommends dimensions of %s pixels.' ), /* 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.' ),
'<code>.mp4</code>',
sprintf( '<strong>%s &times; %s</strong>', $width, $height ) sprintf( '<strong>%s &times; %s</strong>', $width, $height )
); );
} elseif ( $width ) { } elseif ( $width ) {
/* translators: %s: header width in pixels */ $control_description = sprintf(
$control_description = sprintf( __( 'Upload your video in <code>.mp4</code> format and minimize its file size for best results. Your theme recommends a width of %s pixels.' ), /* 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.' ),
'<code>.mp4</code>',
sprintf( '<strong>%s</strong>', $width ) sprintf( '<strong>%s</strong>', $width )
); );
} else { } else {
/* translators: %s: header height in pixels */ $control_description = sprintf(
$control_description = sprintf( __( 'Upload your video in <code>.mp4</code> format and minimize its file size for best results. Your theme recommends a height of %s pixels.' ), /* 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.' ),
'<code>.mp4</code>',
sprintf( '<strong>%s</strong>', $height ) sprintf( '<strong>%s</strong>', $height )
); );
} }
@ -3972,10 +3978,17 @@ final class WP_Customize_Manager {
if ( $video ) { if ( $video ) {
$size = filesize( $video ); $size = filesize( $video );
if ( 8 < $size / pow( 1024, 2 ) ) { // Check whether the size is larger than 8MB. 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. 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 <code>.mp4</code> or <code>.mov</code> 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.' ),
'<code>.mp4</code>',
'<code>.mov</code>'
) );
} }
} }
return $validity; return $validity;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-beta3-39253'; $wp_version = '4.7-beta3-39254';
/** /**
* 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.