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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45926 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2019-09-01 17:12:43 +00:00
parent 425d6fd925
commit a7513ac8e0
139 changed files with 1906 additions and 542 deletions

View File

@@ -531,10 +531,22 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
function wp_comment_trashnotice() {
?>
<div class="hidden" id="trash-undo-holder">
<div class="trash-undo-inside"><?php printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' ); ?> <span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
<div class="trash-undo-inside">
<?php
/* translators: %s: comment author, filled by AJAX */
printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' );
?>
<span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span>
</div>
</div>
<div class="hidden" id="spam-undo-holder">
<div class="spam-undo-inside"><?php printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' ); ?> <span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
<div class="spam-undo-inside">
<?php
/* translators: %s: comment author, filled by AJAX */
printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' );
?>
<span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span>
</div>
</div>
<?php
}
@@ -955,7 +967,14 @@ function wp_import_upload_form( $action ) {
?>
<form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>">
<p>
<label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __( 'Maximum size: %s' ), $size ); ?>)
<?php
printf(
'<label for="upload">%s</label> (%s)',
__( 'Choose a file from your computer:' ),
/* translators: %s: maximum allowed file size */
sprintf( __( 'Maximum size: %s' ), $size )
);
?>
<input type="file" id="upload" name="import" size="25" />
<input type="hidden" name="action" value="save" />
<input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
@@ -1289,7 +1308,11 @@ function do_meta_boxes( $screen, $context, $object ) {
}
echo '<button type="button" class="handlediv" aria-expanded="true">';
echo '<span class="screen-reader-text">' . sprintf( __( 'Toggle panel: %s' ), $widget_title ) . '</span>';
echo '<span class="screen-reader-text">' . sprintf(
/* translators: meta box title */
__( 'Toggle panel: %s' ),
$widget_title
) . '</span>';
echo '<span class="toggle-indicator" aria-hidden="true"></span>';
echo '</button>';
}
@@ -1489,8 +1512,8 @@ function add_settings_section( $id, $title, $callback, $page ) {
_deprecated_argument(
__FUNCTION__,
'3.0.0',
/* translators: %s: misc */
sprintf(
/* translators: %s: misc */
__( 'The "%s" options group has been removed. Use another settings group.' ),
'misc'
)
@@ -1502,8 +1525,8 @@ function add_settings_section( $id, $title, $callback, $page ) {
_deprecated_argument(
__FUNCTION__,
'3.5.0',
/* translators: %s: privacy */
sprintf(
/* translators: %s: privacy */
__( 'The "%s" options group has been removed. Use another settings group.' ),
'privacy'
)
@@ -1560,8 +1583,8 @@ function add_settings_field( $id, $title, $callback, $page, $section = 'default'
_deprecated_argument(
__FUNCTION__,
'3.0.0',
/* translators: %s: misc */
sprintf(
/* translators: %s: misc */
__( 'The "%s" options group has been removed. Use another settings group.' ),
'misc'
)
@@ -1573,8 +1596,8 @@ function add_settings_field( $id, $title, $callback, $page, $section = 'default'
_deprecated_argument(
__FUNCTION__,
'3.5.0',
/* translators: %s: privacy */
sprintf(
/* translators: %s: privacy */
__( 'The "%s" options group has been removed. Use another settings group.' ),
'privacy'
)