Make WordPress Core


Ignore:
Timestamp:
08/30/2018 01:35:27 PM (6 years ago)
Author:
jrf
Message:

I18n: Improve translators comments [3].

  • Add missing translators comments.
  • Fix placement of some translators comments. Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various .pot file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Includes minor code layout fixes.

Patch 44360-wp-admin-includes-dir.patch of the series.

Props flipkeijzer, alvarogois, michielatyoast
See #44360

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-theme-installer-skin.php

    r43571 r43598  
    7676
    7777        if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
    78             $customize_url              = add_query_arg(
     78            $customize_url               = add_query_arg(
    7979                array(
    8080                    'theme'  => urlencode( $stylesheet ),
     
    8383                admin_url( 'customize.php' )
    8484            );
    85             $install_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
     85            $install_actions['preview']  = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize">';
     86            $install_actions['preview'] .= '<span aria-hidden="true">' . __( 'Live Preview' ) . '</span>';
     87            /* translators: %s: theme name */
     88            $install_actions['preview'] .= '<span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
    8689        }
    87         $install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
     90        $install_actions['activate']  = '<a href="' . esc_url( $activate_link ) . '" class="activatelink">';
     91        $install_actions['activate'] .= '<span aria-hidden="true">' . __( 'Activate' ) . '</span>';
     92        /* translators: %s: theme name */
     93        $install_actions['activate'] .= '<span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
    8894
    8995        if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) {
Note: See TracChangeset for help on using the changeset viewer.