WordPress.org

Make WordPress Core

Ticket #10005: entities-in-feeds.diff

File entities-in-feeds.diff, 3.5 KB (added by xibe, 5 years ago)

Translator comments; warning about use of HTML entities in feeds

  • feed-atom-comments.php

     
    1616> 
    1717        <title type="text"><?php 
    1818                if ( is_singular() ) 
     19      /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    1920                        printf(ent2ncr(__('Comments on: %s')), get_the_title_rss()); 
    2021                elseif ( is_search() ) 
     22      /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    2123                        printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss( 'name' ), esc_attr(get_search_query())); 
    2224                else 
     25      /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    2326                        printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); 
    2427        ?></title> 
    2528        <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle> 
     
    5154                        if ( !is_singular() ) { 
    5255                                $title = get_the_title($comment_post->ID); 
    5356                                $title = apply_filters('the_title_rss', $title); 
     57        /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    5458                                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); 
    5559                        } else { 
     60        /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    5661                                printf(ent2ncr(__('By: %s')), get_comment_author_rss()); 
    5762                        } 
    5863                ?></title> 
  • feed-rss2-comments.php

     
    1919<channel> 
    2020        <title><?php 
    2121                if ( is_singular() ) 
     22      /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    2223                        printf(ent2ncr(__('Comments on: %s')), get_the_title_rss()); 
    2324                elseif ( is_search() ) 
     25      /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    2426                        printf(ent2ncr(__('Comments for %s searching on %s')), get_bloginfo_rss( 'name' ), esc_attr($wp_query->query_vars['s'])); 
    2527                else 
     28      /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    2629                        printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); 
    2730        ?></title> 
    2831        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 
     
    4346                        if ( !is_singular() ) { 
    4447                                $title = get_the_title($comment_post->ID); 
    4548                                $title = apply_filters('the_title_rss', $title); 
     49        /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    4650                                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); 
    4751                        } else { 
     52        /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    4853                                printf(ent2ncr(__('By: %s')), get_comment_author_rss()); 
    4954                        } 
    5055                ?></title> 
     
    5358                <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true, false), false); ?></pubDate> 
    5459                <guid isPermaLink="false"><?php comment_guid() ?></guid> 
    5560<?php if ( post_password_required($comment_post) ) : ?> 
     61    /* translators: do not use HTML entities (&nbsp;, etc.): string is used in XML feeds */ 
    5662                <description><?php echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?></description> 
    5763                <content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded> 
    5864<?php else : // post pass ?>