WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

I18N: Improve translator comments.

  • Add missing translator comments.
  • Fix placement of some translator comments. Translator 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 translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-discussion.php

    r45674 r45926  
    8080<?php
    8181printf(
     82    /* translators: %s: number of days */
    8283    __( 'Automatically close comments on posts older than %s days' ),
    8384    '</label> <label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr( get_option( 'close_comments_days_old' ) ) . '" class="small-text" />'
     
    115116$thread_comments_depth .= '</select>';
    116117
     118/* translators: %s: number of levels */
    117119printf( __( 'Enable threaded (nested) comments %s levels deep' ), $thread_comments_depth );
    118120
     
    154156$comment_order .= '>' . __( 'newer' ) . '</option></select>';
    155157
     158/* translators: %s: Form field control for 'older' or 'newer' comments */
    156159printf( __( 'Comments should be displayed with the %s comments at the top of each page' ), $comment_order );
    157160
     
    185188<th scope="row"><?php _e( 'Comment Moderation' ); ?></th>
    186189<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Moderation' ); ?></span></legend>
    187 <p><label for="comment_max_links"><?php printf( __( 'Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)' ), '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="' . esc_attr( get_option( 'comment_max_links' ) ) . '" class="small-text" />' ); ?></label></p>
     190<p><label for="comment_max_links">
     191<?php
     192printf(
     193    /* translators: %s: number of links */
     194    __( 'Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)' ),
     195    '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="' . esc_attr( get_option( 'comment_max_links' ) ) . '" class="small-text" />'
     196);
     197?>
     198</label></p>
    188199
    189200<p><label for="moderation_keys"><?php _e( 'When a comment contains any of these words in its content, name, URL, email, or IP address, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
Note: See TracChangeset for help on using the changeset viewer.