Make WordPress Core

Changeset 34352


Ignore:
Timestamp:
09/20/2015 08:58:27 AM (9 years ago)
Author:
ocean90
Message:

Upgrader: Avoid using an HTML tag in a translation string, add translator comments.

Props ramiy for initial patch.
Fixes #31860.

File:
1 edited

Legend:

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

    r33645 r34352  
    282282    public function add_strings() {
    283283        $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');
    284         $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: <strong>%2$s</strong>');
     284        /* translators: 1: Title of an update, 2: Error message */
     285        $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s');
     286        /* translators: 1: Title of an update */
    285287        $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
     288        /* translators: 1: Title of an update */
    286289        $this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' ) . ' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>' . __( 'Show Details' ) . '</span><span class="hidden">' . __( 'Hide Details' ) . '</span></a>';
    287290        $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
     
    380383        echo '</p></div>';
    381384        if ( $this->error || ! $this->result ) {
    382             if ( $this->error )
    383                 echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, $this->error) . '</p></div>';
    384             else
     385            if ( $this->error ) {
     386                echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ) . '</p></div>';
     387            } else {
    385388                echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed'], $title) . '</p></div>';
     389            }
    386390
    387391            echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').show();</script>';
Note: See TracChangeset for help on using the changeset viewer.