WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/03/2019 12:39:13 AM (7 weeks ago)
Author:
SergeyBiryukov
Message:

I18N: Capitalize translator comments consistently, add trailing punctuation.

Includes minor code layout fixes.

See #44360.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r45926 r45932  
    196196                $post_title = $post->post_title;
    197197                if ( '' === $post_title ) {
    198                     /* translators: %d: ID of a post */
     198                    /* translators: %d: ID of a post. */
    199199                    $post_title = sprintf( __( '#%d (no title)' ), $post->ID );
    200200                }
     
    349349            $post_title = $post->post_title;
    350350            if ( '' === $post_title ) {
    351                 /* translators: %d: ID of a post */
     351                /* translators: %d: ID of a post. */
    352352                $post_title = sprintf( __( '#%d (no title)' ), $post->ID );
    353353            }
     
    434434            $locations_description = __( 'Your theme can display menus in one location.' );
    435435        } else {
    436             /* translators: %s: number of menu locations */
     436            /* translators: %s: Number of menu locations. */
    437437            $locations_description = sprintf( _n( 'Your theme can display menus in %s location.', 'Your theme can display menus in %s locations.', $num_locations ), number_format_i18n( $num_locations ) );
    438438        }
     
    447447                'custom_label'           => __( 'Custom Link' ),
    448448                'page_label'             => get_post_type_object( 'page' )->labels->singular_name,
    449                 /* translators: %s:      menu location */
     449                /* translators: %s: Menu location. */
    450450                'menuLocation'           => _x( '(Currently set to: %s)', 'menu' ),
    451451                'locationsTitle'         => 1 === $num_locations ? __( 'Menu Location' ) : __( 'Menu Locations' ),
     
    461461                'movedLeft'              => __( 'Menu item moved out of submenu' ),
    462462                'movedRight'             => __( 'Menu item is now a sub-item' ),
    463                 /* translators: ▸ is the unicode right-pointing triangle, and %s is the section title in the Customizer */
     463                /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */
    464464                'customizingMenus'       => sprintf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'nav_menus' )->title ) ),
    465                 /* translators: %s: title of menu item which is invalid */
     465                /* translators: %s: Title of an invalid menu item. */
    466466                'invalidTitleTpl'        => __( '%s (Invalid)' ),
    467                 /* translators: %s: title of menu item in draft status */
     467                /* translators: %s: Title of a menu item in draft status. */
    468468                'pendingTitleTpl'        => __( '%s (Pending)' ),
    469                 /* translators: %d: number of menu items found */
     469                /* translators: %d: Number of menu items found. */
    470470                'itemsFound'             => __( 'Number of items found: %d' ),
    471                 /* translators: %d: number of additional menu items found */
     471                /* translators: %d: Number of additional menu items found. */
    472472                'itemsFoundMore'         => __( 'Additional items found: %d' ),
    473473                'itemsLoadingMore'       => __( 'Loading more results... please wait.' ),
     
    495495            'moveDown'                => __( 'Move down one' ),
    496496            'moveToTop'               => __( 'Move to the top' ),
    497             /* translators: %s: previous item name */
     497            /* translators: %s: Previous item name. */
    498498            'moveUnder'               => __( 'Move under %s' ),
    499             /* translators: %s: previous item name */
     499            /* translators: %s: Previous item name. */
    500500            'moveOutFrom'             => __( 'Move out from under %s' ),
    501             /* translators: %s: previous item name */
     501            /* translators: %s: Previous item name. */
    502502            'under'                   => __( 'Under %s' ),
    503             /* translators: %s: previous item name */
     503            /* translators: %s: Previous item name. */
    504504            'outFrom'                 => __( 'Out from under %s' ),
    505             /* translators: 1: item name, 2: item position, 3: total number of items */
     505            /* translators: 1: Item name, 2: Item position, 3: Total number of items. */
    506506            'menuFocus'               => __( '%1$s. Menu item %2$d of %3$d.' ),
    507             /* translators: 1: item name, 2: item position, 3: parent item name */
     507            /* translators: 1: Item name, 2: Item position, 3: Parent item name. */
    508508            'subMenuFocus'            => __( '%1$s. Sub item number %2$d under %3$s.' ),
    509509        );
     
    594594        if ( current_theme_supports( 'widgets' ) ) {
    595595            $description .= '<p>' . sprintf(
    596                 /* translators: %s: URL to the widgets panel of the customizer */
     596                /* translators: %s: URL to the Widgets panel of the Customizer. */
    597597                __( 'Menus can be displayed in locations defined by your theme or in <a href="%s">widget areas</a> by adding a &#8220;Navigation Menu&#8221; widget.' ),
    598598                "javascript:wp.customize.panel( 'widgets' ).focus();"
     
    625625            $description = '<p>' . __( 'Your theme can display menus in one location. Select which menu you would like to use.' ) . '</p>';
    626626        } else {
    627             /* translators: %s: number of menu locations */
     627            /* translators: %s: Number of menu locations. */
    628628            $description = '<p>' . sprintf( _n( 'Your theme can display menus in %s location. Select which menu you would like to use.', 'Your theme can display menus in %s locations. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '</p>';
    629629        }
    630630
    631631        if ( current_theme_supports( 'widgets' ) ) {
    632             /* translators: URL to the widgets panel of the customizer */
     632            /* translators: URL to the Widgets panel of the Customizer. */
    633633            $description .= '<p>' . sprintf( __( 'If your theme has widget areas, you can also add menus there. Visit the <a href="%s">Widgets panel</a> and add a &#8220;Navigation Menu widget&#8221; to display a menu in a sidebar or footer.' ), "javascript:wp.customize.panel( 'widgets' ).focus();" ) . '</p>';
    634634        }
     
    977977
    978978            $data = array(
    979                 /* translators: 1: post type name, 2: error message */
     979                /* translators: 1: Post type name, 2: Error message. */
    980980                'message' => sprintf( __( '%1$s could not be created: %2$s' ), $singular_name, $error->get_error_message() ),
    981981            );
     
    10111011                            <span class="screen-reader-text">
    10121012                            <?php
    1013                                 /* translators: 1: title of a menu item, 2: type of a menu item */
     1013                                /* translators: 1: Title of a menu item, 2: Type of a menu item. */
    10141014                                printf( __( 'Add to menu: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.type_label }}' );
    10151015                            ?>
     
    10841084                    <span class="customize-action">
    10851085                        <?php
    1086                             /* translators: &#9656; is the unicode right-pointing triangle, and %s is the section title in the Customizer */
     1086                            /* translators: &#9656; is the unicode right-pointing triangle. %s: Section title in the Customizer. */
    10871087                            printf( __( 'Customizing &#9656; %s' ), esc_html( $this->manager->get_panel( 'nav_menus' )->title ) );
    10881088                        ?>
     
    11481148                    <span class="screen-reader-text">
    11491149                    <?php
    1150                         /* translators: %s: Title of a section with menu items */
     1150                        /* translators: %s: Title of a section with menu items. */
    11511151                        printf( __( 'Toggle section: %s' ), esc_html( $available_item_type['title'] ) );
    11521152                    ?>
Note: See TracChangeset for help on using the changeset viewer.