progress on #24 to add i18n and wpml support

This commit is contained in:
Ben Word
2011-04-30 20:22:06 -06:00
parent e5d81e5d06
commit 119c20704f
12 changed files with 59 additions and 59 deletions

View File

@@ -4,14 +4,14 @@
<article id="comment-<?php comment_ID(); ?>">
<header class="comment-author vcard">
<?php echo get_avatar($comment,$size='32'); ?>
<?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()) ?>
<time datetime="<?php echo comment_date('c') ?>"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>
<?php edit_comment_link(__('(Edit)'),' ','') ?>
<?php printf(__('<cite class="fn">%s</cite>', 'roots'), get_comment_author_link()) ?>
<time datetime="<?php echo comment_date('c') ?>"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s', 'roots'), get_comment_date(), get_comment_time()) ?></a></time>
<?php edit_comment_link(__('(Edit)', 'roots'), '', '') ?>
</header>
<?php if ($comment->comment_approved == '0') : ?>
<div class="notice">
<p class="bottom"><?php _e('Your comment is awaiting moderation.') ?></p>
<p class="bottom"><?php _e('Your comment is awaiting moderation.', 'roots') ?></p>
</div>
<?php endif; ?>
@@ -28,12 +28,12 @@
<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
die (__('Please do not load this page directly. Thanks!', 'roots'));
if ( post_password_required() ) { ?>
<section id="comments">
<div class="notice">
<p class="bottom">This post is password protected. Enter the password to view comments.</p>
<p class="bottom"><?php _e('This post is password protected. Enter the password to view comments.', 'roots'); ?></p>
</div>
</section>
<?php
@@ -43,7 +43,7 @@
<?php // You can start editing here. ?>
<?php if ( have_comments() ) : ?>
<section id="comments">
<h3><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
<h3><?php comments_number(__('No Responses to', 'roots'), __('One Response to', 'roots'), __('% Responses to', 'roots') ); ?> &#8220;<?php the_title(); ?>&#8221;</h3>
<ol class="commentlist">
<?php wp_list_comments('type=comment&callback=roots_comments'); ?>
<?php // wp_list_comments(); ?>
@@ -60,37 +60,40 @@
<?php else : // comments are closed ?>
<section id="comments">
<div class="notice">
<p class="bottom">Comments are closed.</p>
<p class="bottom"><?php _e('Comments are closed.', 'roots') ?></p>
</div>
</section>
<?php endif; ?>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<section id="respond">
<h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
<h3><?php comment_form_title( __('Leave a Reply', 'roots'), __('Leave a Reply to %s', 'roots') ); ?></h3>
<p class="cancel-comment-reply"><?php cancel_comment_reply_link(); ?></p>
<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
<p>You must be <a href="<?php echo wp_login_url( get_permalink() ); ?>">logged in</a> to post a comment.</p>
<p><?php printf( __('You must be <a href="%s">logged in</a> to post a comment.', 'roots'), wp_login_url( get_permalink() ) ); ?></p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( is_user_logged_in() ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
<p><?php printf(__('Logged in as <a href="%s"/wp-admin/profile.php">%s</a>.', 'roots'), get_option('siteurl'), $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php __('Log out of this account', 'roots'); ?>"><?php _e('Log out &raquo;', 'roots'); ?></a></p>
<?php else : ?>
<p>
<label for="author">Name <?php if ($req) echo "(required)"; ?></label>
<label for="author"><?php _e('Name', 'roots'); if ($req) _e(' (required)', 'roots'); ?></label>
<input type="text" class="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?>>
</p>
<p>
<label for="email">Email (will not be published) <?php if ($req) echo "(required)"; ?></label>
<label for="email"><?php _e('Email (will not be published)', 'roots'); if ($req) _e(' (required)', 'roots'); ?></label>
<input type="email" class="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>
<p>
<label for="url">Website</label>
<label for="url"><?php _e('Website', 'roots'); ?></label>
<input type="url" class="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="22" tabindex="3">
</p>
<?php endif; ?>
<p><textarea name="comment" id="comment" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" class="button" type="submit" id="submit" tabindex="5" value="Submit Comment"></p>
<p>
<label for="comment"><?php _e('Comment', 'roots'); ?></label>
<textarea name="comment" id="comment" tabindex="4"></textarea>
</p>
<p><input name="submit" class="button" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'roots'); ?>"></p>
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>
</form>