Plugin Directory

Changeset 1444846


Ignore:
Timestamp:
06/28/2016 09:52:24 AM (10 years ago)
Author:
wadvisor
Message:

Localisation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-wadvisor/trunk/widget-wadvisor.php

    r1444809 r1444846  
    66Author: JF Lefebvre
    77Version: 1.0
     8Requires at least: 3.9
    89Author URI: https://wadvisor.com/jeff
     10Text Domain: wp-wadvisor
    911*/
    1012
     
    1719     register_widget( 'Wadvisor_Page_Widget' );
    1820});
     21
    1922
    2023/**
     
    3134        parent::__construct(
    3235            'Wadvisor_Page_Widget', // Base ID
    33             __('wadvisor-page-widget-name', 'wp-wadvisor'), // Widget name will appear in UI
    34             array( 'description' => __('wadvisor-page-widget-description', 'wp-wadvisor'), ) // Args
     36            __('Wadvisor page widget', 'wp-wadvisor'), // Widget name will appear in UI
     37            array( 'description' => __('Generates a Wadvisor Page feed in your widget area.', 'wp-wadvisor'), ) // Args
    3538        );
    3639
     
    140143            $title = $instance[ 'title' ];
    141144        } else {
    142             $title = __('wadvisor-page-widget-default-title', 'wp-wadvisor');
     145            $title = __('Widget Wadvisor', 'wp-wadvisor');
    143146        }
    144147        if ( isset( $instance[ 'id' ] ) ) {
     
    179182        ?>
    180183        <p>
    181             <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('wadvisor-page-widget-label-title', 'wp-wadvisor'); ?></label>
     184            <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title:', 'wp-wadvisor'); ?></label>
    182185            <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 ); ?>"
    183186        </p>
    184187        <p>
    185             <label for="<?php echo $this->get_field_id( 'id' ); ?>"><?php _e('wadvisor-page-widget-label-id', 'wp-wadvisor'); ?></label>
     188            <label for="<?php echo $this->get_field_id( 'id' ); ?>"><?php _e('Page id*:', 'wp-wadvisor'); ?></label>
    186189            <input class="widefat" id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" type="text" value="<?php echo esc_attr( $id ); ?>" required="required">
    187190        </p>
    188191        <p>
    189             <label for="<?php echo $this->get_field_id( 'default_lang' ); ?>"><?php _e('wadvisor-page-widget-label-default-language', 'wp-wadvisor'); ?></label>
     192            <label for="<?php echo $this->get_field_id( 'default_lang' ); ?>"><?php _e('Default language:', 'wp-wadvisor'); ?></label>
    190193            <select class="widefat" id="<?php echo $this->get_field_id( 'default_lang' ); ?>" name="<?php echo $this->get_field_name( 'default_lang' ); ?>">
    191                 <option value=""><?php _e('wadvisor-page-widget-label-language-auto', 'wp-wadvisor'); ?></option>
    192                 <option value="fr-fr" <?php echo ($default_lang=='fr-fr')?'selected':''; ?>><?php _e('wadvisor-page-widget-label-language-fr-fr', 'wp-wadvisor'); ?></option>
    193                 <option value="en-us" <?php echo ($default_lang=='en-us')?'selected':''; ?>><?php _e('wadvisor-page-widget-label-language-en-us', 'wp-wadvisor'); ?></option>
    194                 <option value="en-gb" <?php echo ($default_lang=='en-gb')?'selected':''; ?>><?php _e('wadvisor-page-widget-label-language-en-gb', 'wp-wadvisor'); ?></option>
     194                <option value=""><?php _e('Auto', 'wp-wadvisor'); ?></option>
     195                <option value="fr-fr" <?php echo ($default_lang=='fr-fr')?'selected':''; ?>><?php _e('French (France)', 'wp-wadvisor'); ?></option>
     196                <option value="en-us" <?php echo ($default_lang=='en-us')?'selected':''; ?>><?php _e('English (US)', 'wp-wadvisor'); ?></option>
     197                <option value="en-gb" <?php echo ($default_lang=='en-gb')?'selected':''; ?>><?php _e('English (GB)', 'wp-wadvisor'); ?></option>
    195198            </select>
    196199        </p>
    197200        <p>
    198             <label for="<?php echo $this->get_field_id( 'show_covers' ); ?>"><?php _e('wadvisor-page-widget-label-show-covers', 'wp-wadvisor'); ?></label>
     201            <label for="<?php echo $this->get_field_id( 'show_covers' ); ?>"><?php _e('Show covers:', 'wp-wadvisor'); ?></label>
    199202            <input class="widefat" id="<?php echo $this->get_field_id( 'show_covers' ); ?>" name="<?php echo $this->get_field_name( 'show_covers' ); ?>" type="checkbox" value="true" <?php echo ($show_covers=='true')?'checked':''; ?>>
    200203        </p>
    201204        <p>
    202             <label for="<?php echo $this->get_field_id( 'show_followers' ); ?>"><?php _e('wadvisor-page-widget-label-show-followers', 'wp-wadvisor'); ?></label>
     205            <label for="<?php echo $this->get_field_id( 'show_followers' ); ?>"><?php _e('Show followers:', 'wp-wadvisor'); ?></label>
    203206            <input class="widefat" id="<?php echo $this->get_field_id( 'show_followers' ); ?>" name="<?php echo $this->get_field_name( 'show_followers' ); ?>" type="checkbox" value="true" <?php echo ($show_followers=='true')?'checked':''; ?>>
    204207        </p>
    205208        <p>
    206             <label for="<?php echo $this->get_field_id( 'show_questions' ); ?>"><?php _e('wadvisor-page-widget-label-show-questions', 'wp-wadvisor'); ?></label>
     209            <label for="<?php echo $this->get_field_id( 'show_questions' ); ?>"><?php _e('Show questions:', 'wp-wadvisor'); ?></label>
    207210            <input class="widefat" id="<?php echo $this->get_field_id( 'show_questions' ); ?>" name="<?php echo $this->get_field_name( 'show_questions' ); ?>" type="checkbox" value="true" <?php echo ($show_questions=='true')?'checked':''; ?>>
    208211        </p>
    209212        <p>
    210             <label for="<?php echo $this->get_field_id( 'questions_limit' ); ?>"><?php _e('wadvisor-page-widget-label-questions-limit', 'wp-wadvisor'); ?></label>
     213            <label for="<?php echo $this->get_field_id( 'questions_limit' ); ?>"><?php _e('Questions limit:', 'wp-wadvisor'); ?></label>
    211214            <input class="widefat" id="<?php echo $this->get_field_id( 'questions_limit' ); ?>" name="<?php echo $this->get_field_name( 'questions_limit' ); ?>" type="text" value="<?php echo esc_attr( $questions_limit ); ?>">
    212215        </p>
    213216        <p>
    214             <label for="<?php echo $this->get_field_id( 'questions_max_height' ); ?>"><?php _e('wadvisor-page-widget-label-max-height', 'wp-wadvisor'); ?></label>
     217            <label for="<?php echo $this->get_field_id( 'questions_max_height' ); ?>"><?php _e('Questions max height:', 'wp-wadvisor'); ?></label>
    215218            <input class="widefat" id="<?php echo $this->get_field_id( 'questions_max_height' ); ?>" name="<?php echo $this->get_field_name( 'questions_max_height' ); ?>" type="text" value="<?php echo esc_attr( $questions_max_height ); ?>">
    216219        </p>
Note: See TracChangeset for help on using the changeset viewer.