Making WordPress.org


Ignore:
Timestamp:
06/14/2018 10:02:26 AM (8 years ago)
Author:
obenland
Message:

BB Base: i18n improvements.

Updates remaining strings to be translatable.

See #2102.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/comments.php

    r1645 r7305  
    11<?php if ( post_password_required() ) : ?>
    2         <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
     2        <p class="nocomments"><?php esc_html_e( 'This post is password protected. Enter the password to view comments.', 'bborg' ); ?></p>
    33<?php return; endif; ?>
    44
     
    1818        <?php if ( comments_open() ) : ?>
    1919
    20                 <h2 id="comments">There are no comments to display</h2>
     20                <h2 id="comments"><?php esc_html_e( 'There are no comments to display', 'bborg' ); ?></h2>
    2121
    2222        <?php elseif ( !is_page() ) : ?>
    2323
    24                 <p class="nocomments">Comments are closed.</p>
     24                <p class="nocomments"><?php esc_html_e( 'Comments are closed.', 'bborg' ); ?></p>
    2525
    2626        <?php endif; ?>
     
    3131        <?php if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) : ?>
    3232
    33                 <p>You must be <a href="<?php echo site_url( '/wp-login.php' ); ?>?redirect_to=<?php echo urlencode( get_permalink() ); ?>">logged in</a> to post a comment.</p>
     33                <p><?php printf( wp_kses_post( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'bborg' ) ), esc_url( site_url( '/wp-login.php?redirect_to=' . urlencode( get_permalink() ) ) ) ); ?></p>
    3434
    3535        <?php else : ?>
     
    3838                        <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="commentform">
    3939                                <fieldset>
    40                                         <legend><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></legend>
    41                                         <p class="cancel-reply"><?php cancel_comment_reply_link("Cancel Comment Reply"); ?></p>
     40                                        <legend><?php comment_form_title( esc_html__( 'Leave a Reply', 'bborg' ), esc_html__( 'Leave a Reply to %s', 'bborg' ) ); ?></legend>
     41                                        <p class="cancel-reply"><?php cancel_comment_reply_link( esc_html__( 'Cancel Comment Reply', 'bborg' ) ); ?></p>
    4242
    4343                                        <?php if ( ! is_user_logged_in() ) : ?>
    4444
    45                                                 <p><label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label>
     45                                                <p><label for="author"><small><?php esc_html_e( 'Name', 'bborg' ); ?> <?php if ($req) esc_html_e( '(required)', 'bborg' ); ?></small></label>
    4646                                                <input type="text" name="author" id="author" value="<?php echo esc_attr( $comment_author ); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /></p>
    47                                                 <p><label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label>
     47                                                <p><label for="email"><small><?php esc_html_e( 'Mail (will not be published)', 'bborg' ); ?> <?php if ($req) esc_html_e( '(required)', 'bborg' ); ?></small></label>
    4848                                                <input type="text" name="email" id="email" value="<?php echo esc_attr( $comment_author_email ); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /></p>
    49                                                 <p><label for="url"><small>Website</small></label>
     49                                                <p><label for="url"><small><?php esc_html_e( 'Website', 'bborg' ); ?></small></label>
    5050                                                <input type="text" name="url" id="url" value="<?php echo esc_attr( $comment_author_url ); ?>" size="22" tabindex="3" /></p>
    5151
     
    5454                                        <p><textarea name="comment" id="comment" cols="70%" rows="10" tabindex="4"></textarea></p>
    5555                                        <p>
    56                                                 <input name="submit" type="submit" class="button" id="submit" tabindex="5" value="Submit Comment" />
     56                                                <input name="submit" type="submit" class="button" id="submit" tabindex="5" value="<?php esc_attr_e( 'Submit Comment', 'bborg' ); ?>" />
    5757                                                <?php comment_id_fields(); ?>
    5858                                                <?php do_action( 'comment_form', get_the_ID() ); ?>
Note: See TracChangeset for help on using the changeset viewer.