Title: 0 comment&#8221;s&#8221;
Last modified: October 26, 2017

---

# 0 comment”s”

 *  Resolved [camillepatisserie](https://wordpress.org/support/users/camillepatisserie/)
 * (@camillepatisserie)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/0-comments-2/)
 * Hello team,
 * You gave me such a good and quick answer the other day that I would ask for help
   again.
 * I use the Kale pro theme and there is a problem when I have no comment.
 * It’s translated the text in french but I think there’s a problem in the code 
   that I can’t correct :
 * if ( ! post_password_required() && comments_open() && $kale_blog_feed_comments_show
   == 1)
    $kale_temp[] = ‘<div class=”entry-comments”>[‘. sprintf( _nx( ‘1 Commentaire’, ‘%1$s Commentaires’, get_comments_number(), ‘titre des commentaires’, ‘kale’ ), number_format_i18n( get_comments_number() ) ) .’](https://wordpress.org/support/topic/0-comments-2/&apos;.get_comments_link().&apos;?output_format=md)
   </div>’;
 * There is only two possibilies : there’s 1 comment or not 1 (which displays “comments”).
   So when I have no comment, the template displays “0 comments” (or in french “
   0 commentaires” which is not correct).
 * Could you tell me how correct it?
 * Thanks a lot,
 * Camille
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2F0-comments-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [jarektheme](https://wordpress.org/support/users/jarektheme/)
 * (@jarektheme)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/0-comments-2/#post-9628838)
 * Hi Camille,
 * Thank you for getting in touch with us.
 * The only way to change it is by theme customization. Please open kale/parts/entry.
   php file and find these lines:
 *     ```
       if ( ! post_password_required() && comments_open() && $kale_blog_feed_comments_show == 1)  
           $kale_temp[] = '<div class="entry-comments"><a href="'.get_comments_link().'">'. sprintf( _nx( '1 Comment', '%1$s Comments', get_comments_number(), 'comments title', 'kale' ), number_format_i18n( get_comments_number() ) ) .'</a></div>';
       ```
   
 * and replace it with this:
 *     ```
       if ( ! post_password_required() && comments_open() && $kale_blog_feed_comments_show == 1) {
           $num_of_comments = (int) get_comments_number();
           $comment = '<div class="entry-comments"><a href="'.get_comments_link().'">';
           switch ($num_of_comments) {
               case $num_of_comments === 1: // 1 comment
                   $comment .= sprintf( __( '%1$s Comment', 'kale' ), $num_of_comments );
                   break;
       	case  $num_of_comments > 1: // more than 1 comment
       	    $comment .= sprintf( __( '%1$s Comments', 'kale' ), $num_of_comments );
       	    break;
       	default: // 0 comment
       	    $comment .= sprintf( __( '%1$s Comment', 'kale' ), $num_of_comments );
       	    break;
           }
           $comment .= '</a></div>';
           $kale_temp[] = $comment;
       }
       ```
   
 * Please change your text as you wish.
    Please note also that these changes will
   be removed after next theme update so the best way would be to add them to Child
   Theme.
 * Hope that helps.
 * Thank you for your time in this.
 * Best regards
    -  This reply was modified 8 years, 7 months ago by [jarektheme](https://wordpress.org/support/users/jarektheme/).
    -  This reply was modified 8 years, 7 months ago by [jarektheme](https://wordpress.org/support/users/jarektheme/).
 *  Thread Starter [camillepatisserie](https://wordpress.org/support/users/camillepatisserie/)
 * (@camillepatisserie)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/0-comments-2/#post-9662145)
 * Hello,
 * Thanks for your answer. It took me time to test it but I did. I created a child
   theme with your change and it’s… half-working.
 * As you can see at [http://www.camille-patisserie.com](http://www.camille-patisserie.com)
   it works on featured articles but I hadn’t be able to translate it in french 
   and it doesn’t work on the slider (but it still in French).
 * I did try to translate it on the code you gave me, but I guess I missed something
   somewhere…
 *     ```
       if ( ! post_password_required() && comments_open() && $kale_blog_feed_comments_show == 1) {
                       $num_of_comments = (int) get_comments_number();
                       $comment = '<div class="entry-comments"><a href="'.get_comments_link().'">';
                       switch ($num_of_comments) {
                           case $num_of_comments === 1: // 1 commentaire
                               $comment .= sprintf( __( '%1$s Commentaire', 'kale' ), $num_of_comments );
                               break;
                       case  $num_of_comments > 1: // more than 1 comment
                           $comment .= sprintf( __( '%1$s Commentaires', 'kale' ), $num_of_comments );
                           break;
                       default: // 0 comment
                           $comment .= sprintf( __( '%1$s Commentaire', 'kale' ), $num_of_comments );
                           break;
                       }
                       $comment .= '</a></div>';
                       $kale_temp[] = $comment;
                   }
       ```
   
 * Thanks for your help,
 * Camille
 *  [jarektheme](https://wordpress.org/support/users/jarektheme/)
 * (@jarektheme)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/0-comments-2/#post-9664441)
 * Hi Camille,
 * The comments in slider need more changes in parts/frontpage-banner.php file.
 * In order to translate comments you need one of the plugin translation like Loco
   translate: [https://wordpress.org/plugins/loco-translate/](https://wordpress.org/plugins/loco-translate/)
   or Poedit App: [https://poedit.net/](https://poedit.net/)
 * Please, contact us via our support system here: [https://www.lyrathemes.com/support/](https://www.lyrathemes.com/support/).
   We are not allowed to ask for your site’s details here, which would let us help
   you out.
 * We’ll try to resolve it as soon as possible.
 * Best

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘0 comment”s”’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/kale/2.8.2/screenshot.jpg)
 * Kale
 * [Support Threads](https://wordpress.org/support/theme/kale/)
 * [Active Topics](https://wordpress.org/support/theme/kale/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/kale/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/kale/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [jarektheme](https://wordpress.org/support/users/jarektheme/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/0-comments-2/#post-9664441)
 * Status: resolved