Skip to content

Instantly share code, notes, and snippets.

@epicdaze
Created June 15, 2011 07:16
Show Gist options
  • Save epicdaze/1026630 to your computer and use it in GitHub Desktop.
Save epicdaze/1026630 to your computer and use it in GitHub Desktop.
#wordpress - correct comments link title translation #localization #L10n #comments #title #correction
<!-- /*
Correction for the french localization of comments_popup_link() function in WordPress 3.1 core:
Official translation: « Comment on get_the_title() » becomes « Commentaire sur get_the_title() »
I would instead prefer: « Commentaires sur get_the_title() » or « Commentez sur get_the_title() »
Reference:
wp-includes/comment-template.php:1014
msgid "Comment on %s"
msgstr "Commentaire sur %s"
Instead of comments_popup_link() function, use comments_number() and wrap in if/else statement (in comments are closed).
*/ -->
<span class="article-comments"><?php comments_open();
if ('closed' == $post->comment_status)
{ _e('Comments are closed','themedomain'); }
else
{ ?><a href="<?php the_permalink(); ?>#comments" rel="nofollow" title="<?php _e('Comment on ',themedomain).the_title(); ?>"><?php
comments_number(__('no comments',themedomain), __('1 comment',themedomain), __('% comments', themedomain)); ?></a><?php
} ?></span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment