From ed657f52c1fd7d985baf444864694e27b66716cb Mon Sep 17 00:00:00 2001 From: ulaulaman <34242086+ulaulaman@users.noreply.github.com> Date: Sat, 27 Jan 2018 17:53:08 +0100 Subject: [PATCH] 0.4 english translation --- widget-for-co-authors.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/widget-for-co-authors.php b/widget-for-co-authors.php index 2b305b1..f0c3d3d 100644 --- a/widget-for-co-authors.php +++ b/widget-for-co-authors.php @@ -1,11 +1,11 @@ ID, $coauthor->user_nicename ); + $show_profile = __( 'Show profile', 'text-domain' );; + $hide_profile = __( 'Hide profile', 'text-domain' );; $i = 0; foreach ( $coauthors as $coauthor ) { $i++; @@ -36,10 +38,10 @@ if ( function_exists( 'get_coauthors' ) ) {
__( 'Widget per mostrare avatar e nomi degli autori', 'blog_widget_domain' ), ) +array( 'description' => __( 'Show avatars and names of the authors', 'blog_widget_domain' ), ) ); } @@ -110,7 +112,7 @@ if ( isset( $instance[ 'title' ] ) ) { $title = $instance[ 'title' ]; } else { -$title = __( 'Articolo di', 'blog_widget_domain' ); +$title = __( 'Written by', 'blog_widget_domain' ); } // Widget form @@ -129,6 +131,12 @@ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_in return $instance; } } + +// Load translations +add_action('plugins_loaded', 'wan_load_textdomain'); +function wan_load_textdomain() { + load_plugin_textdomain( 'co-authors-widget', false, dirname( plugin_basename(__FILE__) ) . '/languages/' ); +} /* ------------------------------------------------------ */ ?>