WordPress.org

Making WordPress.org

Changeset 8532


Ignore:
Timestamp:
03/26/2019 05:17:55 PM (5 months ago)
Author:
vedjain
Message:

WordCamp: Remove large chunks of HTML to make it translatable

Some strings in wordcamp-base-v2 have large chunks of HTML that doesn't need to be translated and looks like a remnant of the older themes wordcamp-base-v2 was based on.

props obenland
fixes #2886

Location:
sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/image.php

    r8332 r8532  
    2222                            <?php
    2323                                $metadata = wp_get_attachment_metadata();
    24                                 printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'wordcamporg' ),
    25                                     esc_attr( get_the_date( 'c' ) ),
    26                                     esc_html( get_the_date() ),
    27                                     wp_get_attachment_url(),
    28                                     $metadata['width']  ?? 0,
    29                                     $metadata['height'] ?? 0,
    30                                     get_permalink( $post->post_parent ),
    31                                     get_the_title( $post->post_parent )
     24                                /* translators: 1: attachment date, 2: link to full-size image, 3: link to parent post */
     25                                printf( __( 'Published %1$s at %2$s in %3$s', 'wordcamporg' ),
     26                                    sprintf( '<span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span>',
     27                                        esc_attr( get_the_date( 'c' ) ),
     28                                        esc_html( get_the_date() )
     29                                    ),
     30                                    sprintf( '<a href="%1$s">%2$s &times; %3$s</a>',
     31                                        wp_get_attachment_url(),
     32
     33                                        $metadata['width'] ?? 0,
     34                                        $metadata['height'] ?? 0
     35                                    ),
     36                                    sprintf( '<a href="%1$s" rel="gallery">%2$s</a>',
     37                                        get_permalink( $post->post_parent ),
     38                                        get_the_title( $post->post_parent )
     39                                    )
    3240                                );
    3341                            ?>
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/inc/template-tags.php

    r3275 r8532  
    114114 */
    115115function wcbs_posted_on() {
    116     printf( __( 'Posted on <a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'wordcamporg' ),
    117         esc_url( get_permalink() ),
    118         esc_attr( get_the_time() ),
    119         esc_attr( get_the_date( 'c' ) ),
    120         esc_html( get_the_date() ),
    121         esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    122         esc_attr( sprintf( __( 'View all posts by %s', 'wordcamporg' ), get_the_author() ) ),
    123         esc_html( get_the_author() )
     116    /* translators: 1: post date, 2: post author link */
     117    printf( __( 'Posted on %1$s <span class="byline">by %2$s</span>', 'wordcamporg' ),
     118        sprintf( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a>',
     119            esc_url( get_permalink() ),
     120            esc_attr( get_the_date( 'c' ) ),
     121            esc_html( get_the_date() )
     122        ),
     123        sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" rel="author">%2$s</a></span>',
     124            esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
     125            esc_html( get_the_author() )
     126        )
    124127    );
    125128}
Note: See TracChangeset for help on using the changeset viewer.