• Resolved Guillermo77

    (@guillermo77)


    Hi Tom, just like inform that no take the translation in spanish in the part of the date: “by USER XXX” and when hover the mouse in “USER XXX” write “view all post by” but in spanish is “ver todos los artículos de”
    inc/template-tags.php:187
    msgid
    I verify the archive .po and .mo and are correct.
    It is strange behavior, I download the files manually, but it is the same.

    • This topic was modified 7 years, 4 months ago by Guillermo77.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Tom

    (@edge22)

    That’s very strange – do you have any custom functions added to your site? Possibly overwriting the generate_posted_on() function?

    Thread Starter Guillermo77

    (@guillermo77)

    Yes Tom, thanks is true.
    I have one function for quit the link in date, and some text in english.
    Can be good quit the link, and left the text in natural language in multilanguages.
    Maybe i need another child theme for the other language.
    Thanks!

    Theme Author Tom

    (@edge22)

    Can you share the function you’re using?

    Thread Starter Guillermo77

    (@guillermo77)

    Thanks, this is what you send me some time ago:

    if ( ! function_exists( 'generate_posted_on' ) ) :
    	// Prints HTML with meta information for the current post-date/time and author.
    	function generate_posted_on() {
    
    		if ( 'post' !== get_post_type() ) 
    			return;
    		
    		$date = apply_filters( 'generate_post_date', true );
    		$author = apply_filters( 'generate_post_author', true );
    			
    		$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
    		if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) )
    			$time_string .= '<time class="updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
    
    		$time_string = sprintf( $time_string,
    			esc_attr( get_the_date( 'c' ) ),
    			esc_html( get_the_date() ),
    			esc_attr( get_the_modified_date( 'c' ) ),
    			esc_html( get_the_modified_date() )
    		);
    		
    		// If our date is enabled, show it
    		if ( $date ) :
    			printf( '<span class="posted-on">%1$s</span>',
    				$time_string
    			);
    		endif;
    		
    		// If our author is enabled, show it
    		if ( $author ) :
    			printf( ' <span class="byline">%1$s</span>',
    				sprintf( '<span class="author vcard" itemtype="https://schema.org/Person" itemscope="itemscope" itemprop="author">%1$s <a class="url fn n" href="%2$s" title="%3$s" rel="author" itemprop="url"><span class="author-name" itemprop="name">%4$s</span></a></span>',
    					__( 'por','generate'),
    					esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    					esc_attr( sprintf( __( 'Ver todas las entradas de %s', 'generate' ), get_the_author() ) ),
    					esc_html( get_the_author() )
    				)
    			);
    		endif;
    		
    	}
    endif;
    Theme Author Tom

    (@edge22)

    Replace this part: __( 'por','generate'),

    With: __( 'por','generatepress'),

    Thread Starter Guillermo77

    (@guillermo77)

    I think no will answer me more…

    Also change: __( 'View all posts by %s', 'generatepress' )

    I am very happy!
    GENIUS! Many many Thanks! ??

    • This reply was modified 7 years, 3 months ago by Guillermo77.
    Theme Author Tom

    (@edge22)

    You’re very welcome ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Spanish “by” in date no translated’ is closed to new replies.