Make WordPress Core

Changeset 35551


Ignore:
Timestamp:
11/06/2015 12:40:09 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Remove <code> tags from translatable strings in wp-admin/includes/class-wp-upgrader.php.

Add translator comments.

Props ramiy.
Fixes #34580.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r35170 r35551  
    16501650
    16511651                // A proper archive should have a style.css file in the single subdirectory
    1652                 if ( ! file_exists( $working_directory . 'style.css' ) )
    1653                         return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'], __( 'The theme is missing the <code>style.css</code> stylesheet.' ) );
     1652                if ( ! file_exists( $working_directory . 'style.css' ) ) {
     1653                        return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'],
     1654                                /* translators: %s: style.css */
     1655                                sprintf( __( 'The theme is missing the %s stylesheet.' ),
     1656                                        '<code>style.css</code>'
     1657                                )
     1658                        );
     1659                }
    16541660
    16551661                $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) );
    16561662
    1657                 if ( empty( $info['Name'] ) )
    1658                         return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'], __( "The <code>style.css</code> stylesheet doesn't contain a valid theme header." ) );
     1663                if ( empty( $info['Name'] ) ) {
     1664                        return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'],
     1665                                /* translators: %s: style.css */
     1666                                sprintf( __( 'The %s stylesheet doesn&#8217;t contain a valid theme header.' ),
     1667                                        '<code>style.css</code>'
     1668                                )
     1669                        );
     1670                }
    16591671
    16601672                // If it's not a child theme, it must have at least an index.php to be legit.
    1661                 if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) )
    1662                         return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'], __( 'The theme is missing the <code>index.php</code> file.' ) );
     1673                if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) {
     1674                        return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'],
     1675                                /* translators: %s: index.php */
     1676                                sprintf( __( 'The theme is missing the %s file.' ),
     1677                                        '<code>index.php</code>'
     1678                                )
     1679                        );
     1680                }
    16631681
    16641682                return $source;
    … …  
    20852103                }
    20862104
    2087                 if ( ! $mo || ! $po )
     2105                if ( ! $mo || ! $po ) {
    20882106                        return new WP_Error( 'incompatible_archive_pomo', $this->strings['incompatible_archive'],
    2089                                 __( 'The language pack is missing either the <code>.po</code> or <code>.mo</code> files.' ) );
     2107                                /* translators: 1: .po 2: .mo */
     2108                                sprintf( __( 'The language pack is missing either the %1$s or %2$s files.' ),
     2109                                        '<code>.po</code>',
     2110                                        '<code>.mo</code>'
     2111                                )
     2112                        );
     2113                }
    20902114
    20912115                return $source;
Note: See TracChangeset for help on using the changeset viewer.