Skip to content

Commit

Permalink
Show the content on search and author archives.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinsays committed Mar 16, 2015
1 parent ae0cbd2 commit e9caeb9
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 542 deletions.
22 changes: 0 additions & 22 deletions content.php
Expand Up @@ -17,35 +17,13 @@
<?php endif; ?>
</header><!-- .entry-header -->

<?php // Display excerpts for archives and search ?>
<?php if ( is_archive() || is_search() || is_author() ) :?>
<div class="entry-summary">
<?php

// Display the gallery shortcode if post format gallery
$gallery = ( 'gallery' == get_post_format() );
if ( $gallery ) {
portfoliopress_display_gallery( $post );
} else {
// Display an image if post format image
portfoliopress_display_image();
}

// Display the excerpt
the_excerpt();
?>
</div><!-- .entry-summary -->
<?php else : ?>

<?php // Otherwise show full content ?>
<div class="entry-content">
<?php if ( portfoliopress_get_option( 'portfolio_images', true ) ) {
portfoliopress_display_image();
} ?>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'portfolio-press' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'portfolio-press' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>

<?php portfoliopress_footer_meta( $post ); ?>

Expand Down
14 changes: 0 additions & 14 deletions extensions/portfolio-helpers.php
Expand Up @@ -141,18 +141,4 @@ function portfoliopress_display_image() {
</div>
<?php }
endif;
}

/**
* Helper function to display a gallery.
*
* @param object $post
*/
function portfoliopress_display_gallery( $post ) {
$pattern = get_shortcode_regex();
preg_match('/'.$pattern.'/s', $post->post_content, $matches);
if ( is_array( $matches ) && $matches[2] == 'gallery' ) {
$shortcode = $matches[0];
echo do_shortcode( $shortcode );
}
}
Binary file modified languages/pt_PT.mo
Binary file not shown.

3 comments on commit e9caeb9

@pedro-mendonca
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devinsays I've noticed that you've updated the pt_PT .po.
After checking in Poedit I found that it lacks the existent translation for "Portfolio Press is a responsive theme for (...)". I've already written it in Transifex.
Unfortunately, after opening Transifex I've found that a lot of strings were changed for a worst version of translation. I've changed some of those again but I think it get's out of control.
I've been making an effort to keep translations according WordPress guidelines and always comparing terms with the main portuguese localization. Too bad that it can b changed so easily in Transifex.
In my opinion, having a lot of people translating in Transifex might be good, but at the same time it has the potential to be translated by one that is not using the theme/plugin.
In this case, I do not agree with the last changes that were made.
I've read somewhere that you still accept GitHub pulls for translations, If you don't mind I'll prefer this as every doubt or justiifcation can happen within the theme repository.
Meanwhile, is there a way to make a snapshot of the current state of the .po file in Transifex? Can I download the current revised version?
Thanks

@devinsays
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't realize someone had overwritten you translations.

I have an automated process that regenerates the .pot files, pushes them up to Transifiex, and then pulls down the latest translations. But I believe I can exclude pt_PT from that automated if you'd prefer to work through GitHub.

Unfortunately this latest version went out today, but I can push up a follow up soon with fixes. Let me open a new ticket.

@pedro-mendonca
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a catch of using Transifex. You get a lot of atention and translation, wich is good, but translations also get easly overwritten without further comment or discussion.
Within github the commit diffs show very easly what was modified and you can discuss it clearly, and probably it's modified by people directly involved in the software.
In this case I've alerted you, there are some confusions, some translations show a misundurstanding of WordPress syntax and use, and it certainly ain't according previous and main WordPress portuguese translation. The translations should be coherent with the WordPress core translation.
I'll keep updating from github, and I'll upload it to transifex for further reference for other translators also.

Please sign in to comment.