Skip to content

Commit

Permalink
Fixed translation text domain
Browse files Browse the repository at this point in the history
  • Loading branch information
rahularyan committed Sep 20, 2017
1 parent 5f236db commit fc1fd2b
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions addons/free/category/widget.php
Expand Up @@ -24,7 +24,7 @@ public function __construct() {
parent::__construct(
'AnsPress_Category_Widget',
'(AnsPress) Categories',
array( 'description', __( 'Display AnsPress categories', 'categories-for-anspress' ) ) );
array( 'description', __( 'Display AnsPress categories', 'anspress-question-answer' ) ) );
}

public function widget( $args, $instance ) {
Expand Down Expand Up @@ -65,9 +65,9 @@ public function widget( $args, $instance ) {
<?php echo $category->name; ?>
</a>
<div class="ap-cat-count">
<span><?php printf(_n('%d Question', '%d Questions', $category->count, 'categories-for-anspress' ), $category->count ); ?></span>
<span><?php printf(_n('%d Question', '%d Questions', $category->count, 'anspress-question-answer' ), $category->count ); ?></span>
<?php if ( $sub_cat_count > 0 ) : ?>
<span><?php printf(__('%d Child', 'categories-for-anspress' ), $sub_cat_count ); ?></span>
<span><?php printf(__('%d Child', 'anspress-question-answer' ), $sub_cat_count ); ?></span>
<?php endif; ?>
</div>
</li>
Expand All @@ -78,7 +78,7 @@ public function widget( $args, $instance ) {
}

public function form( $instance ) {
$title = ! empty( $instance[ 'title' ] ) ? $instance[ 'title' ] : __( 'Categories', 'categories-for-anspress' );
$title = ! empty( $instance[ 'title' ] ) ? $instance[ 'title' ] : __( 'Categories', 'anspress-question-answer' );
$hide_empty = ! empty( $instance[ 'hide_empty' ] ) ? $instance[ 'hide_empty' ] : false;
$parent = ! empty( $instance[ 'parent' ] ) ? $instance[ 'parent' ] : 0;
$number = ! empty( $instance[ 'number' ] ) ? $instance[ 'number' ] : 10;
Expand All @@ -96,19 +96,19 @@ public function form( $instance ) {
$categories = get_terms( 'question_category' , $cat_args );
?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'anspress-question-answer' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>"
type="text" value="<?php echo esc_attr( $title ); ?>">
</p>
<p>
<label for="<?php echo $this->get_field_id( 'hide_empty' ); ?>"><?php _e( 'Hide empty:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'hide_empty' ); ?>"><?php _e( 'Hide empty:', 'anspress-question-answer' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'hide_empty' ); ?>" name="<?php echo $this->get_field_name( 'hide_empty' ); ?>"
type="checkbox" value="1" <?php checked( true, $hide_empty );?>>
</p>
<p>
<label for="<?php echo $this->get_field_id( 'parent' ); ?>"><?php _e( 'Parent:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'parent' ); ?>"><?php _e( 'Parent:', 'anspress-question-answer' ); ?></label>
<select class="widefat" id="<?php echo $this->get_field_id( 'parent' ); ?>" name="<?php echo $this->get_field_name( 'parent' ); ?>">
<option value="0"><?php _e('Top level', 'categories-for-anspress' ); ?></option>
<option value="0"><?php _e('Top level', 'anspress-question-answer' ); ?></option>
<?php
if ( $categories ) {
foreach ( $categories as $c ) {
Expand All @@ -119,35 +119,35 @@ public function form( $instance ) {
</select>
</p>
<p>
<label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number:', 'anspress-question-answer' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>"
type="text" value="<?php echo esc_attr( $number ); ?>">
</p>
<p>
<label for="<?php echo $this->get_field_id( 'orderby' ); ?>"><?php _e( 'Order By:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'orderby' ); ?>"><?php _e( 'Order By:', 'anspress-question-answer' ); ?></label>
<select class="widefat" id="<?php echo $this->get_field_id( 'orderby' ); ?>" name="<?php echo $this->get_field_name( 'orderby' ); ?>">
<option value="none" <?php echo selected($orderby, 'none' ); ?>><?php _e('None', 'categories-for-anspress' ); ?></option>
<option value="count" <?php echo selected($orderby, 'count' ); ?>><?php _e('Count', 'categories-for-anspress' ); ?></option>
<option value="id" <?php echo selected($orderby, 'id' ); ?>><?php _e('ID', 'categories-for-anspress' ); ?></option>
<option value="name" <?php echo selected($orderby, 'name' ); ?>><?php _e('Name', 'categories-for-anspress' ); ?></option>
<option value="slug" <?php echo selected($orderby, 'slug' ); ?>><?php _e('Slug', 'categories-for-anspress' ); ?></option>
<option value="term_group" <?php echo selected($orderby, 'term_group' ); ?>><?php _e('Term group', 'categories-for-anspress' ); ?></option>
<option value="none" <?php echo selected($orderby, 'none' ); ?>><?php _e('None', 'anspress-question-answer' ); ?></option>
<option value="count" <?php echo selected($orderby, 'count' ); ?>><?php _e('Count', 'anspress-question-answer' ); ?></option>
<option value="id" <?php echo selected($orderby, 'id' ); ?>><?php _e('ID', 'anspress-question-answer' ); ?></option>
<option value="name" <?php echo selected($orderby, 'name' ); ?>><?php _e('Name', 'anspress-question-answer' ); ?></option>
<option value="slug" <?php echo selected($orderby, 'slug' ); ?>><?php _e('Slug', 'anspress-question-answer' ); ?></option>
<option value="term_group" <?php echo selected($orderby, 'term_group' ); ?>><?php _e('Term group', 'anspress-question-answer' ); ?></option>
</select>
</p>
<p>
<label for="<?php echo $this->get_field_id( 'order' ); ?>"><?php _e( 'Order:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'order' ); ?>"><?php _e( 'Order:', 'anspress-question-answer' ); ?></label>
<select class="widefat" id="<?php echo $this->get_field_id( 'order' ); ?>" name="<?php echo $this->get_field_name( 'order' ); ?>">
<option value="DESC" <?php echo selected($order, 'DESC' ); ?>><?php _e('DESC', 'categories-for-anspress' ); ?></option>
<option value="ASC" <?php echo selected($order, 'ASC' ); ?>><?php _e('ASC', 'categories-for-anspress' ); ?></option>
<option value="DESC" <?php echo selected($order, 'DESC' ); ?>><?php _e('DESC', 'anspress-question-answer' ); ?></option>
<option value="ASC" <?php echo selected($order, 'ASC' ); ?>><?php _e('ASC', 'anspress-question-answer' ); ?></option>
</select>
</p>
<p>
<label for="<?php echo $this->get_field_id( 'icon_width' ); ?>"><?php _e( 'Icon width:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'icon_width' ); ?>"><?php _e( 'Icon width:', 'anspress-question-answer' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'icon_width' ); ?>" name="<?php echo $this->get_field_name( 'icon_width' ); ?>"
type="text" value="<?php echo esc_attr( $icon_width ); ?>">
</p>
<p>
<label for="<?php echo $this->get_field_id( 'icon_height' ); ?>"><?php _e( 'Icon height:', 'categories-for-anspress' ); ?></label>
<label for="<?php echo $this->get_field_id( 'icon_height' ); ?>"><?php _e( 'Icon height:', 'anspress-question-answer' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'icon_height' ); ?>" name="<?php echo $this->get_field_name( 'icon_height' ); ?>"
type="text" value="<?php echo esc_attr( $icon_height ); ?>">
</p>
Expand Down

0 comments on commit fc1fd2b

Please sign in to comment.