WordPress.org

Plugin Directory

Changeset 1817559


Ignore:
Timestamp:
02/07/18 17:53:00 (12 days ago)
Author:
sormano
Message:

Update textdomain

Location:
coupon-generator-for-woocommerce/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • coupon-generator-for-woocommerce/trunk/includes/admin/class-wccg-admin.php

    r1637082 r1817559  
    7474            $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 
    7575 
    76             wp_enqueue_style( 'woocommerce-coupon-generator', plugins_url( 'assets/css/woocommerce-coupon-generator-admin.css', WooCommerce_Coupon_Generator()->file ), array(), WooCommerce_Coupon_Generator()->version ); 
     76            wp_enqueue_style( 'coupon-generator-for-woocommerce', plugins_url( 'assets/css/woocommerce-coupon-generator-admin.css', WooCommerce_Coupon_Generator()->file ), array(), WooCommerce_Coupon_Generator()->version ); 
    7777 
    78             wp_enqueue_script( 'woocommerce-coupon-generator', plugins_url( 'assets/js/woocommerce-coupon-generator-admin.js', WooCommerce_Coupon_Generator()->file ), array( 'jquery' ), WooCommerce_Coupon_Generator()->version, true ); 
     78            wp_enqueue_script( 'coupon-generator-for-woocommerce', plugins_url( 'assets/js/woocommerce-coupon-generator-admin.js', WooCommerce_Coupon_Generator()->file ), array( 'jquery' ), WooCommerce_Coupon_Generator()->version, true ); 
    7979 
    8080            wp_enqueue_script( 'wc-admin-meta-boxes' ); 
     
    9595    public function add_generator_page() { 
    9696 
    97         add_submenu_page( 'woocommerce', __( 'WooCommerce Coupon Generator', 'woocommerce-coupon-generator' ), __( 'Coupon generator', 'woocommerce-coupon-generator' ), 'manage_woocommerce', 'woocommerce_coupon_generator', array( $this, 'coupon_generator_callback' ) ); 
     97        add_submenu_page( 'woocommerce', __( 'WooCommerce Coupon Generator', 'coupon-generator-for-woocommerce' ), __( 'Coupon generator', 'coupon-generator-for-woocommerce' ), 'manage_woocommerce', 'woocommerce_coupon_generator', array( $this, 'coupon_generator_callback' ) ); 
    9898 
    9999    } 
     
    152152        if ( $file == plugin_basename( WooCommerce_Coupon_Generator()->file ) ) : 
    153153            $links = array_merge( array( 
    154                 '<a href="' . esc_url( admin_url( '/admin.php?page=woocommerce_coupon_generator' ) ) . '">' . __( 'Start generating coupons', 'woocommerce-coupon-generator' ) . '</a>' 
     154                '<a href="' . esc_url( admin_url( '/admin.php?page=woocommerce_coupon_generator' ) ) . '">' . __( 'Start generating coupons', 'coupon-generator-for-woocommerce' ) . '</a>' 
    155155            ), $links ); 
    156156        endif; 
     
    175175 
    176176        if ( $file == plugin_basename( WooCommerce_Coupon_Generator()->file ) ) : 
    177             $links[] = '<a href="https://shopplugins.com/plugins/category/woocommerce/" target="_blank">' . __( 'More WooCommerce plugins by Shop Plugins', 'woocommerce-coupon-generator' ) . '</a>'; 
     177            $links[] = '<a href="https://shopplugins.com/plugins/category/woocommerce/" target="_blank">' . __( 'More WooCommerce plugins by Shop Plugins', 'coupon-generator-for-woocommerce' ) . '</a>'; 
    178178        endif; 
    179179 
  • coupon-generator-for-woocommerce/trunk/includes/admin/class-wccg-generator.php

    r1637082 r1817559  
    3333        $this->steps = array( 
    3434            '0' => array( 
    35                 'name'    => __( 'Introduction', 'woocommerce-coupon-generator' ), 
     35                'name'    => __( 'Introduction', 'coupon-generator-for-woocommerce' ), 
    3636                'handler' => 'introduction_handler', 
    3737            ), 
    3838            '1' => array( 
    39                 'name'    => __( 'Coupon options', 'woocommerce-coupon-generator' ), 
     39                'name'    => __( 'Coupon options', 'coupon-generator-for-woocommerce' ), 
    4040                'handler' => 'coupon_options_handler', 
    4141            ), 
    4242            '2' => array( 
    43                 'name'    => __( 'Generator options', 'woocommerce-coupon-generator' ), 
     43                'name'    => __( 'Generator options', 'coupon-generator-for-woocommerce' ), 
    4444                'handler' => 'generator_options_handler', 
    4545            ), 
    4646            '3' => array( 
    47                 'name'    => __( 'Generate coupons', 'woocommerce-coupon-generator' ), 
     47                'name'    => __( 'Generate coupons', 'coupon-generator-for-woocommerce' ), 
    4848                'handler' => 'generate_coupons_handler', 
    4949            ), 
     
    9797 
    9898        if ( ! is_array( $this->steps ) || ! isset( $this->steps[ $step ]['handler'] ) ) : 
    99             wp_die( __( 'I\'m trying to load a step but couldn\'t find it! Please go back and try again.', 'woocommerce-coupon-generator' ), __( 'Could not find step', 'woocommerce-coupon-generator' ) ); 
     99            wp_die( __( 'I\'m trying to load a step but couldn\'t find it! Please go back and try again.', 'coupon-generator-for-woocommerce' ), __( 'Could not find step', 'coupon-generator-for-woocommerce' ) ); 
    100100        endif; 
    101101 
    102102        if ( ! is_callable( array( $this, $this->steps[ $step ]['handler'] ) ) && ! is_callable( $this->steps[ $step ]['handler'] ) ) : 
    103             wp_die( __( 'I\'m trying to load a generator step but couldn\'t find the right callback! Please go back and try again.', 'woocommerce-coupon-generator' ), __( 'Could not find step', 'woocommerce-coupon-generator' ) ); 
     103            wp_die( __( 'I\'m trying to load a generator step but couldn\'t find the right callback! Please go back and try again.', 'coupon-generator-for-woocommerce' ), __( 'Could not find step', 'coupon-generator-for-woocommerce' ) ); 
    104104        endif; 
    105105 
  • coupon-generator-for-woocommerce/trunk/includes/admin/views/html-coupon-generator-step-0.php

    r1637082 r1817559  
    1717    <div class='wc-coupon-generator-wrap wc-coupon-generator-wrap-step-0'> 
    1818 
    19         <h2><?php _e( 'WooCommerce Coupon Generator', 'woocommerce-coupon-generator' ); ?></h2> 
     19        <h2><?php _e( 'WooCommerce Coupon Generator', 'coupon-generator-for-woocommerce' ); ?></h2> 
    2020 
    2121        <div class='steps'> 
    22             <span class='step step-0 active'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'woocommerce-coupon-generator' ); ?></a></span> 
    23             <span class='step step-1'><a href='<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>'><?php _e( '1. Coupon options', 'woocommerce-coupon-generator' ); ?></a></span> 
    24             <span class='step step-2'><?php _e( '2. Generator options', 'woocommerce-coupon-generator' ); ?></span> 
    25             <span class='step step-3'><?php _e( '3. Generating coupons', 'woocommerce-coupon-generator' ); ?></span> 
     22            <span class='step step-0 active'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'coupon-generator-for-woocommerce' ); ?></a></span> 
     23            <span class='step step-1'><a href='<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>'><?php _e( '1. Coupon options', 'coupon-generator-for-woocommerce' ); ?></a></span> 
     24            <span class='step step-2'><?php _e( '2. Generator options', 'coupon-generator-for-woocommerce' ); ?></span> 
     25            <span class='step step-3'><?php _e( '3. Generating coupons', 'coupon-generator-for-woocommerce' ); ?></span> 
    2626        </div> 
    2727 
    28         <p><?php _e( 'Hi!', 'woocommerce-coupon-generator' ); ?></p> 
    29         <p><?php _e( 'Thank you for using WooCommerce Coupon Generator. To use the coupon generator you have to go through the following steps.', 'woocommerce-coupon-generator' ); ?> 
     28        <p><?php _e( 'Hi!', 'coupon-generator-for-woocommerce' ); ?></p> 
     29        <p><?php _e( 'Thank you for using WooCommerce Coupon Generator. To use the coupon generator you have to go through the following steps.', 'coupon-generator-for-woocommerce' ); ?> 
    3030            <ul> 
    3131                <li> 
    32                     <strong><?php _e( '0. Introduction', 'woocommerce-coupon-generator' ); ?></strong>&nbsp; 
    33                     <span class='description'><?php _e( 'You are here now', 'woocommerce-coupon-generator' ); ?></span> 
     32                    <strong><?php _e( '0. Introduction', 'coupon-generator-for-woocommerce' ); ?></strong>&nbsp; 
     33                    <span class='description'><?php _e( 'You are here now', 'coupon-generator-for-woocommerce' ); ?></span> 
    3434                </li> 
    35                 <li><?php _e( '1. Coupon settings', 'woocommerce-coupon-generator' ); ?>&nbsp; 
    36                     <span class='description'><?php _e( 'Here you can set the coupon settings you\'re used to set in the default WooCommerce coupon settings.', 'woocommerce-coupon-generator' ); ?></span> 
     35                <li><?php _e( '1. Coupon settings', 'coupon-generator-for-woocommerce' ); ?>&nbsp; 
     36                    <span class='description'><?php _e( 'Here you can set the coupon settings you\'re used to set in the default WooCommerce coupon settings.', 'coupon-generator-for-woocommerce' ); ?></span> 
    3737                </li> 
    38                 <li><?php _e( '2. Generator settings', 'woocommerce-coupon-generator' ); ?>&nbsp; 
    39                     <span class='description'><?php _e( 'Set options like the amount of coupons you want to generate.', 'woocommerce-coupon-generator' ); ?></span> 
     38                <li><?php _e( '2. Generator settings', 'coupon-generator-for-woocommerce' ); ?>&nbsp; 
     39                    <span class='description'><?php _e( 'Set options like the amount of coupons you want to generate.', 'coupon-generator-for-woocommerce' ); ?></span> 
    4040                </li> 
    41                 <li><?php _e( '3. Generating coupons', 'woocommerce-coupon-generator' ); ?>&nbsp; 
    42                     <span class='description'><?php _e( 'This is the step where the coupons are actually generated.', 'woocommerce-coupon-generator' ); ?></span> 
     41                <li><?php _e( '3. Generating coupons', 'coupon-generator-for-woocommerce' ); ?>&nbsp; 
     42                    <span class='description'><?php _e( 'This is the step where the coupons are actually generated.', 'coupon-generator-for-woocommerce' ); ?></span> 
    4343                </li> 
    4444            </ul> 
     
    4747 
    4848        <a href="<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>" class="continue-button-wrap"> 
    49             <span class="continue-button"><?php _e( 'Continue to the next step', 'woocommerce-coupon-generator' ); ?></span> 
     49            <span class="continue-button"><?php _e( 'Continue to the next step', 'coupon-generator-for-woocommerce' ); ?></span> 
    5050        </a> 
    5151 
  • coupon-generator-for-woocommerce/trunk/includes/admin/views/html-coupon-generator-step-1.php

    r1637082 r1817559  
    1717    <div class='wc-coupon-generator-wrap wc-coupon-generator-wrap-step-1'> 
    1818 
    19         <h2><?php _e( 'WooCommerce Coupon Generator', 'woocommerce-coupon-generator' ); ?></h2> 
     19        <h2><?php _e( 'WooCommerce Coupon Generator', 'coupon-generator-for-woocommerce' ); ?></h2> 
    2020 
    2121        <div class='steps'> 
    22             <span class='step step-0'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'woocommerce-coupon-generator' ); ?></a></span> 
    23             <span class='step step-1 active'><?php _e( '1. Coupon options', 'woocommerce-coupon-generator' ); ?></span> 
    24             <span class='step step-2'><?php _e( '2. Generator options', 'woocommerce-coupon-generator' ); ?></span> 
    25             <span class='step step-3'><?php _e( '3. Generating coupons', 'woocommerce-coupon-generator' ); ?></span> 
     22            <span class='step step-0'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'coupon-generator-for-woocommerce' ); ?></a></span> 
     23            <span class='step step-1 active'><?php _e( '1. Coupon options', 'coupon-generator-for-woocommerce' ); ?></span> 
     24            <span class='step step-2'><?php _e( '2. Generator options', 'coupon-generator-for-woocommerce' ); ?></span> 
     25            <span class='step step-3'><?php _e( '3. Generating coupons', 'coupon-generator-for-woocommerce' ); ?></span> 
    2626        </div> 
    2727 
     
    5252 
    5353                <a href="javascript:void(0);" class="continue-button-wrap" onclick="document.getElementById('wc-coupon-generator').submit();"> 
    54                     <span class="continue-button"><?php _e( 'Continue to the next step', 'woocommerce-coupon-generator' ); ?></span> 
     54                    <span class="continue-button"><?php _e( 'Continue to the next step', 'coupon-generator-for-woocommerce' ); ?></span> 
    5555                </a> 
    5656 
  • coupon-generator-for-woocommerce/trunk/includes/admin/views/html-coupon-generator-step-2.php

    r1637082 r1817559  
    1616    <div class='wc-coupon-generator-wrap wc-coupon-generator-wrap-step-2'> 
    1717 
    18         <h2><?php _e( 'WooCommerce Coupon Generator', 'woocommerce-coupon-generator' ); ?></h2> 
     18        <h2><?php _e( 'WooCommerce Coupon Generator', 'coupon-generator-for-woocommerce' ); ?></h2> 
    1919 
    2020        <div class='steps'> 
    21             <span class='step step-0'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'woocommerce-coupon-generator' ); ?></a></span> 
    22             <span class='step step-1'><a href='<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>'><?php _e( '1. Coupon options', 'woocommerce-coupon-generator' ); ?></a></span> 
    23             <span class='step step-2 active'><?php _e( '2. Generator options', 'woocommerce-coupon-generator' ); ?></span> 
    24             <span class='step step-3'><?php _e( '3. Generating coupons', 'woocommerce-coupon-generator' ); ?></span> 
     21            <span class='step step-0'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'coupon-generator-for-woocommerce' ); ?></a></span> 
     22            <span class='step step-1'><a href='<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>'><?php _e( '1. Coupon options', 'coupon-generator-for-woocommerce' ); ?></a></span> 
     23            <span class='step step-2 active'><?php _e( '2. Generator options', 'coupon-generator-for-woocommerce' ); ?></span> 
     24            <span class='step step-3'><?php _e( '3. Generating coupons', 'coupon-generator-for-woocommerce' ); ?></span> 
    2525        </div> 
    2626 
     
    3333                    <div id="normal-sortables" class="meta-box-sortables ui-sortable"> 
    3434                        <div id="woocommerce-coupon-generator-options" class="postbox "> 
    35                             <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Generator options', 'woocommerce-coupon-generator' ); ?></span></h3> 
     35                            <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Generator options', 'coupon-generator-for-woocommerce' ); ?></span></h3> 
    3636                            <div class="inside"> 
    3737 
     
    4040 
    4141                                        <p class="form-field number_of_coupons "> 
    42                                             <label for="number_of_coupons"><?php _e( 'Number of coupons', 'woocommerce-coupon-generator' ); ?></label> 
     42                                            <label for="number_of_coupons"><?php _e( 'Number of coupons', 'coupon-generator-for-woocommerce' ); ?></label> 
    4343                                            <input type="number" min="1" autofocus class="short" style="width: 200px;" name="number_of_coupons" id="coupon_amount" value="1" placeholder="10"> 
    44                                             <img class="help_tip" data-tip='<?php _e( 'Number of coupons to generate in this batch', 'woocommerce-coupon-generator' ); ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" /> 
     44                                            <img class="help_tip" data-tip='<?php _e( 'Number of coupons to generate in this batch', 'coupon-generator-for-woocommerce' ); ?>' src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" /> 
    4545                                        </p> 
    4646 
     
    5858 
    5959            <a href="javascript:void(0);" class="continue-button-wrap" onclick="document.getElementById('woocommerce-coupon-generator').submit();"> 
    60                 <span class="continue-button"><?php _e( 'Continue and generate coupons', 'woocommerce-coupon-generator' ); ?></span> 
     60                <span class="continue-button"><?php _e( 'Continue and generate coupons', 'coupon-generator-for-woocommerce' ); ?></span> 
    6161            </a><?php 
    6262 
  • coupon-generator-for-woocommerce/trunk/includes/admin/views/html-coupon-generator-step-3.php

    r1637082 r1817559  
    1616    <div class='wc-coupon-generator-wrap wc-coupon-generator-wrap-step-3'> 
    1717 
    18         <h2><?php _e( 'WooCommerce Coupon Generator', 'woocommerce-coupon-generator' ); ?></h2> 
     18        <h2><?php _e( 'WooCommerce Coupon Generator', 'coupon-generator-for-woocommerce' ); ?></h2> 
    1919 
    2020        <div class='steps'> 
    21             <span class='step step-0'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'woocommerce-coupon-generator' ); ?></a></span> 
    22             <span class='step step-1'><a href='<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>'><?php _e( '1. Coupon options', 'woocommerce-coupon-generator' ); ?></a></span> 
    23             <span class='step step-2'><?php _e( '2. Generator options', 'woocommerce-coupon-generator' ); ?></span> 
    24             <span class='step step-3 active'><?php _e( '3. Generating coupons', 'woocommerce-coupon-generator' ); ?></span> 
     21            <span class='step step-0'><a href='<?php echo esc_url( remove_query_arg( 'step' ) ); ?>'><?php _e( '0. Introduction', 'coupon-generator-for-woocommerce' ); ?></a></span> 
     22            <span class='step step-1'><a href='<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>'><?php _e( '1. Coupon options', 'coupon-generator-for-woocommerce' ); ?></a></span> 
     23            <span class='step step-2'><?php _e( '2. Generator options', 'coupon-generator-for-woocommerce' ); ?></span> 
     24            <span class='step step-3 active'><?php _e( '3. Generating coupons', 'coupon-generator-for-woocommerce' ); ?></span> 
    2525        </div> 
    2626 
     
    3030                <div id="normal-sortables" class="meta-box-sortables ui-sortable"> 
    3131                    <div id="wc-coupon-generator-options" class="postbox "> 
    32                         <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Generating coupons', 'woocommerce-coupon-generator' ); ?></span></h3> 
     32                        <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Generating coupons', 'coupon-generator-for-woocommerce' ); ?></span></h3> 
    3333                        <div class="inside"> 
    3434 
  • coupon-generator-for-woocommerce/trunk/includes/admin/wccg-core-functions.php

    r1637082 r1817559  
    7272 
    7373    // Add/Replace data to array 
    74     $product_ids = is_array( $args['product_ids'] ) ? $args['product_ids'] : explode( ',', $args['product_ids'] ); 
    75     $exclude_ids = is_array( $args['exclude_product_ids'] ) ? $args['exclude_product_ids'] : explode( ',', $args['exclude_product_ids'] ); 
     74    $product_ids = isset( $args['product_ids'] ) ? (array) $args['product_ids'] : array(); 
     75    $exclude_ids = isset( $args['exclude_product_ids'] ) ? (array) $args['exclude_product_ids'] : array(); 
    7676    $meta_array = apply_filters( 'woocommerce_coupon_generator_coupon_meta_data', array( 
    7777        'discount_type'              => empty( $args['discount_type'] ) ? 'fixed_cart' : wc_clean( $args['discount_type'] ), 
     
    186186    if ( $coupons_generated == $total_number_coupons ) : 
    187187        $batch_step  = 'done'; 
    188         $message    .= '<strong>' . sprintf( __( 'Coupon generation completed! Created %1$d coupons.', 'woocommerce-coupon-generator' ), $coupons_generated ) . '</strong><br/>'; 
     188        $message    .= '<strong>' . sprintf( __( 'Coupon generation completed! Created %1$d coupons.', 'coupon-generator-for-woocommerce' ), $coupons_generated ) . '</strong><br/>'; 
    189189    else : 
    190190        ++$batch_step; 
     
    192192 
    193193    // Add message 
    194     $message .= sprintf( __( '%1$s coupons created in %2$s seconds', 'woocommerce-coupon-generator' ), $coupons_to_generate, round( $execution_time, 3 ) ); 
     194    $message .= sprintf( __( '%1$s coupons created in %2$s seconds', 'coupon-generator-for-woocommerce' ), $coupons_to_generate, round( $execution_time, 3 ) ); 
    195195 
    196196    // Progress 
  • coupon-generator-for-woocommerce/trunk/readme.txt

    r1762275 r1817559  
    33Tags: woocommerce coupon generator, woocommerce, woocommerce coupon, coupons, coupon importer, woocommerce automatic coupons, woocommerce random coupons 
    44Requires at least: 4.0.0 
    5 Tested up to: 4.9 
     5Tested up to: 4.7.3 
    66Stable tag: 1.0.1 
     7Requires PHP: 5.3 
    78License: GPLv3 or later 
    89License URI: http://www.gnu.org/licenses/gpl-3.0.html 
  • coupon-generator-for-woocommerce/trunk/woocommerce-coupon-generator.php

    r1637082 r1817559  
    77 * Author:          Jeroen Sormani 
    88 * Author URI:      http://jeroensormani.com/ 
    9  * Text Domain:     woocommerce-coupon-generator 
     9 * Text Domain:     coupon-generator-for-woocommerce 
    1010 */ 
    1111 
     
    133133    public function load_textdomain() { 
    134134 
    135         $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-coupon-generator' ); 
     135        $locale = apply_filters( 'plugin_locale', get_locale(), 'coupon-generator-for-woocommerce' ); 
    136136 
    137137        // Load textdomain 
    138         load_textdomain( 'woocommerce-coupon-generator', WP_LANG_DIR . '/woocommerce-coupon-generator/woocommerce-coupon-generator-' . $locale . '.mo' ); 
    139         load_plugin_textdomain( 'woocommerce-coupon-generator', false, basename( dirname( __FILE__ ) ) . '/languages' ); 
     138        load_textdomain( 'coupon-generator-for-woocommerce', WP_LANG_DIR . '/woocommerce-coupon-generator/woocommerce-coupon-generator-' . $locale . '.mo' ); 
     139        load_plugin_textdomain( 'coupon-generator-for-woocommerce', false, basename( dirname( __FILE__ ) ) . '/languages' ); 
    140140 
    141141    } 
Note: See TracChangeset for help on using the changeset viewer.