Make WordPress Core

Ticket #41438: 41438.diff

File 41438.diff, 1.6 KB (added by pedromendonca, 8 years ago)

Patch to add context to the editors tabs labels

  • wp-includes/class-wp-editor.php

    diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php
    index b48770b783a..84564028f92 100644
    a b public static function editor( $content, $editor_id, $settings = array() ) { 
    179179                                }
    180180
    181181                                $buttons .= '<button type="button" id="' . $editor_id_attr . '-tmce" class="wp-switch-editor switch-tmce"' .
    182                                         ' data-wp-editor-id="' . $editor_id_attr . '">' . __('Visual') . "</button>\n";
     182                                        ' data-wp-editor-id="' . $editor_id_attr . '">' . _x( 'Visual', 'Name for the Text editor tab' ) . "</button>\n";
    183183                                $buttons .= '<button type="button" id="' . $editor_id_attr . '-html" class="wp-switch-editor switch-html"' .
    184184                                        ' data-wp-editor-id="' . $editor_id_attr . '">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</button>\n";
    185185                        } else {
    private static function get_translation() { 
    12571257                        'Paste URL or type to search' => __( 'Paste URL or type to search' ), // Placeholder for the inline link dialog
    12581258                        'Apply'  => __( 'Apply' ), // Tooltip for the 'apply' button in the inline link dialog
    12591259                        'Link options'  => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog
    1260                         'Visual' => __( 'Visual' ), // Editor switch tab label
    1261                         'Text' => __( 'Text' ), // Editor switch tab label
     1260                        'Visual' => _x( 'Visual' , 'Name for the Text editor tab' ), // Editor switch tab label
     1261                        'Text' => _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ), // Editor switch tab label
    12621262
    12631263                        // Shortcuts help modal
    12641264                        'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ),