Skip to content

Commit

Permalink
Added context for some of "Regenerate Thumbnails" strings
Browse files Browse the repository at this point in the history
This helps proper translate this plugin, since for some languages don't make sense translate the name of the plugin, but still needed to translate the "Action of regenerate thumbnails".
  • Loading branch information
claudiosanches authored Jun 11, 2016
1 parent ed98574 commit 8030261
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions regenerate-thumbnails.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function add_media_row_action( $actions, $post ) {
return $actions;

$url = wp_nonce_url( admin_url( 'tools.php?page=regenerate-thumbnails&goback=1&ids=' . $post->ID ), 'regenerate-thumbnails' );
$actions['regenerate_thumbnails'] = '<a href="' . esc_url( $url ) . '" title="' . esc_attr( __( "Regenerate the thumbnails for this single image", 'regenerate-thumbnails' ) ) . '">' . __( 'Regenerate Thumbnails', 'regenerate-thumbnails' ) . '</a>';
$actions['regenerate_thumbnails'] = '<a href="' . esc_url( $url ) . '" title="' . esc_attr( __( "Regenerate the thumbnails for this single image", 'regenerate-thumbnails' ) ) . '">' . _x( 'Regenerate Thumbnails', 'action of regenerate thumbnails', 'regenerate-thumbnails' ) . '</a>';

return $actions;
}
Expand All @@ -92,7 +92,7 @@ public function add_bulk_actions( $actions ) {
unset( $actions['delete'] );
}

$actions['bulk_regenerate_thumbnails'] = __( 'Regenerate Thumbnails', 'regenerate-thumbnails' );
$actions['bulk_regenerate_thumbnails'] = _x( 'Regenerate Thumbnails', 'action of regenerate thumbnails', 'regenerate-thumbnails' );

if ( $delete )
$actions['delete'] = $delete;
Expand All @@ -109,7 +109,7 @@ public function add_bulk_actions_via_javascript() {
?>
<script type="text/javascript">
jQuery(document).ready(function($){
$('select[name^="action"] option:last-child').before('<option value="bulk_regenerate_thumbnails"><?php echo esc_attr( __( 'Regenerate Thumbnails', 'regenerate-thumbnails' ) ); ?></option>');
$('select[name^="action"] option:last-child').before('<option value="bulk_regenerate_thumbnails"><?php echo esc_attr( _x( 'Regenerate Thumbnails', 'action of regenerate thumbnails', 'regenerate-thumbnails' ) ); ?></option>');
});
</script>
<?php
Expand Down Expand Up @@ -402,4 +402,4 @@ function RegenerateThumbnails() {
$RegenerateThumbnails = new RegenerateThumbnails();
}

?>
?>

0 comments on commit 8030261

Please sign in to comment.