Plugin Directory

Changeset 1530861


Ignore:
Timestamp:
11/09/2016 08:48:16 AM (9 years ago)
Author:
akrwp
Message:

merged fix

Location:
menupublisher-4-wp/branches/releaseMerge
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • menupublisher-4-wp/branches/releaseMerge

  • menupublisher-4-wp/branches/releaseMerge/assets/templates/menupublisher-4-wp-settings.php

    r1527910 r1530861  
    1010            add_options_page(
    1111                sprintf(
    12                     __( '%s options', self::$constants['TEXT_DOMAIN'] ),
     12                    __( '%s options', 'menupublisher-4-wp' ),
    1313                    self::$constants['PLUGIN_NAME']
    1414                ),
     
    8484            $errors = array();
    8585            if ( ! isset( $_POST['sRestaurantInlineHash'] ) || ( $_POST['sRestaurantInlineHash'] == '' ) ) {
    86                 $errors['sRestaurantInlineHash'] = __( 'You must enter a RestaurantCode', self::$constants['TEXT_DOMAIN'] );
     86                $errors['sRestaurantInlineHash'] = __( 'You must enter a RestaurantCode', 'menupublisher-4-wp' );
    8787            } else {
    8888                // check if that sRestaurantInlineHash is valid
     
    9898                $check_response = file_get_contents($restaurnt_inline_hash_check_url);
    9999                if ( ( $check_response === '' ) || ( $check_response === null ) ) {
    100                     $errors['sRestaurantInlineHash'] = __( 'RestaurantCode cannot be validated currently, since the Server seems to be down. Try again later.', self::$constants['TEXT_DOMAIN'] );
     100                    $errors['sRestaurantInlineHash'] = __( 'RestaurantCode cannot be validated currently, since the Server seems to be down. Try again later.', 'menupublisher-4-wp' );
    101101                } else if ( ! $check_response ) {
    102                     $errors['sRestaurantInlineHash'] = __( 'RestaurantCode is invalid, please get the correct RestaurantCode from your MenuPublisher backend.', self::$constants['TEXT_DOMAIN'] );
     102                    $errors['sRestaurantInlineHash'] = __( 'RestaurantCode is invalid, please get the correct RestaurantCode from your MenuPublisher backend.', 'menupublisher-4-wp' );
    103103                }
    104104            }//else if ( $_POST['sRestaurantInlineHash'] != '' )
     
    134134
    135135            if ( $snippet_name == '' ) {
    136                 $errors['snippet_name'] = __( 'You must enter a unique snippet name.', self::$constants['TEXT_DOMAIN'] );
     136                $errors['snippet_name'] = __( 'You must enter a unique snippet name.', 'menupublisher-4-wp' );
    137137            } else if ( preg_match( '/[^0-9a-zA-Z_\-]/', $snippet_name ) ) {
    138                 $errors['snippet_name'] = __( 'You may only use numbers, upper and lower case letters (a-zA-Z), underscore "_" and minus "-" for snippet name.', self::$constants['TEXT_DOMAIN'] );
     138                $errors['snippet_name'] = __( 'You may only use numbers, upper and lower case letters (a-zA-Z), underscore "_" and minus "-" for snippet name.', 'menupublisher-4-wp' );
    139139            } else {
    140140                // check for $snippet_name uniqueness
     
    149149                }//foreach ( $settings['aSnippets'] )
    150150                if ( $snippet_name_duplicate ) {
    151                     $errors['snippet_name'] = __( 'This snippet name is already used, choose another one', self::$constants['TEXT_DOMAIN'] );
     151                    $errors['snippet_name'] = __( 'This snippet name is already used, choose another one', 'menupublisher-4-wp' );
    152152                }
    153153            }//else if ( $snippet_name != '' )
     
    212212                            class="button button-primary"
    213213                        >
    214                             &lt; <?php echo _e( 'back', self::$constants['TEXT_DOMAIN'] ); ?>
     214                            &lt; <?php echo _e( 'back', 'menupublisher-4-wp' ); ?>
    215215                        </a>
    216216                        <h1>
    217                             <?php _e( 'Snippet setup',  self::$constants['TEXT_DOMAIN'] ); ?>
     217                            <?php _e( 'Snippet setup',  'menupublisher-4-wp' ); ?>
    218218                        </h1>
    219219                        <?php if ( $settings_saved ): ?>
     
    221221                                <p>
    222222                                    <strong>
    223                                         <?php _e( 'Settings saved.', self::$constants['TEXT_DOMAIN'] ); ?>
     223                                        <?php _e( 'Settings saved.', 'menupublisher-4-wp' ); ?>
    224224                                    </strong>
    225225                                </p>
    226226                                <button class="notice-dismiss" type="button">
    227227                                    <span class="screen-reader-text">
    228                                         <?php _e( 'Dismiss this notice.', self::$constants['TEXT_DOMAIN'] ); ?>
     228                                        <?php _e( 'Dismiss this notice.', 'menupublisher-4-wp' ); ?>
    229229                                    </span>
    230230                                </button>
     
    236236                                    <th scope="row">
    237237                                        <label>
    238                                             <?php _e( 'Snippet name:',  self::$constants['TEXT_DOMAIN'] ); ?>
     238                                            <?php _e( 'Snippet name:',  'menupublisher-4-wp' ); ?>
    239239                                        </label>
    240240                                    </th>
     
    254254                                        <?php   else:?>
    255255                                            <p class="description">
    256                                                 <?php _e( 'Must be unique among all snippets.',  self::$constants['TEXT_DOMAIN'] ); ?>
     256                                                <?php _e( 'Must be unique among all snippets.',  'menupublisher-4-wp' ); ?>
    257257                                            </p>
    258258                                        <?php   endif;?>
     
    262262                                    <th scope="row">
    263263                                        <label>
    264                                             <?php _e( 'Layout:',  self::$constants['TEXT_DOMAIN'] ); ?>
     264                                            <?php _e( 'Layout:',  'menupublisher-4-wp' ); ?>
    265265                                        </label>
    266266                                    </th>
     
    276276                                                    checked="checked"
    277277                                                <?php endif; ?>
    278                                             />&nbsp;<?php _e( 'one column',  self::$constants['TEXT_DOMAIN'] ); ?>
     278                                            />&nbsp;<?php _e( 'one column',  'menupublisher-4-wp' ); ?>
    279279                                        </label>
    280280                                        <br />
     
    289289                                                    checked="checked"
    290290                                                <?php endif; ?>
    291                                             />&nbsp;<?php _e( 'two columns',  self::$constants['TEXT_DOMAIN'] ); ?>
     291                                            />&nbsp;<?php _e( 'two columns',  'menupublisher-4-wp' ); ?>
    292292                                        </label>
    293293                                    </td>
     
    296296                                    <th scope="row">
    297297                                        <label>
    298                                             <?php _e( 'Lunch card:',  self::$constants['TEXT_DOMAIN'] ); ?>
     298                                            <?php _e( 'Lunch card:',  'menupublisher-4-wp' ); ?>
    299299                                        </label>
    300300                                    </th>
     
    311311                                                        checked="checked"
    312312                                                    <?php endif; ?>
    313                                                 />&nbsp;<?php echo _e( 'Show lunch dishes',  self::$constants['TEXT_DOMAIN'] ); ?>
     313                                                />&nbsp;<?php echo _e( 'Show lunch dishes',  'menupublisher-4-wp' ); ?>
    314314                                            </label>
    315315                                            <br />
     
    323323                                                        checked="checked"
    324324                                                    <?php endif; ?>
    325                                                 />&nbsp;<?php echo _e( 'show whole week',  self::$constants['TEXT_DOMAIN'] ); ?>
     325                                                />&nbsp;<?php echo _e( 'show whole week',  'menupublisher-4-wp' ); ?>
    326326                                            </label>
    327327                                        </div>
    328328                                        <p class="description">
    329                                             <?php echo _e( 'if you unselect whole week, then only dishes from today till sunday will be displayed',  self::$constants['TEXT_DOMAIN'] ); ?>
     329                                            <?php echo _e( 'if you unselect whole week, then only dishes from today till sunday will be displayed',  'menupublisher-4-wp' ); ?>
    330330                                        </p>
    331331                                    </td>
     
    334334                                    <th scope="row">
    335335                                        <label>
    336                                             <?php _e( 'Menu (à la carte):',  self::$constants['TEXT_DOMAIN'] ); ?>
     336                                            <?php _e( 'Menu (à la carte):',  'menupublisher-4-wp' ); ?>
    337337                                        </label>
    338338                                    </th>
     
    346346                                                        checked="checked"
    347347                                                    <?php endif; ?>
    348                                                 />&nbsp;<?php echo _e( 'Show à la carte dishes',  self::$constants['TEXT_DOMAIN'] ); ?>
     348                                                />&nbsp;<?php echo _e( 'Show à la carte dishes',  'menupublisher-4-wp' ); ?>
    349349                                            </label>
    350350                                        </div>
     
    357357                            <input
    358358                                type="submit"
    359                                 value="<?php esc_attr_e( 'save', self::$constants['TEXT_DOMAIN'] ) ?>"
     359                                value="<?php esc_attr_e( 'save', 'menupublisher-4-wp' ) ?>"
    360360                                class="button button-primary"
    361361                                id="submit"
     
    383383                        <h1><?php
    384384                            printf(
    385                                 __( '%s setup',  self::$constants['TEXT_DOMAIN'] ),
     385                                __( '%s setup',  'menupublisher-4-wp' ),
    386386                                self::$constants['PLUGIN_NAME']
    387387                            );
     
    391391                                <p>
    392392                                    <strong>
    393                                         <?php _e( 'Settings saved.', self::$constants['TEXT_DOMAIN'] ); ?>
     393                                        <?php _e( 'Settings saved.', 'menupublisher-4-wp' ); ?>
    394394                                    </strong>
    395395                                </p>
    396396                                <button class="notice-dismiss" type="button">
    397397                                    <span class="screen-reader-text">
    398                                         <?php _e( 'Dismiss this notice.', self::$constants['TEXT_DOMAIN'] ); ?>
     398                                        <?php _e( 'Dismiss this notice.', 'menupublisher-4-wp' ); ?>
    399399                                    </span>
    400400                                </button>
     
    406406                                    <th scope="row">
    407407                                        <label>
    408                                             <?php _e( 'RestaurantCode:',  self::$constants['TEXT_DOMAIN'] ); ?>
     408                                            <?php _e( 'RestaurantCode:',  'menupublisher-4-wp' ); ?>
    409409                                        </label>
    410410                                    </th>
     
    420420                                        <div class="mmlt-ipoint">
    421421                                            <div class="mmlt-payload">
    422                                                 <?php _e( 'You can find this in your MenuPublisher backend, navigate there to DISTRIBUTION => HOMEPAGE and search for <b>RestaurantCode</b>',  self::$constants['TEXT_DOMAIN'] ); ?>
     422                                                <?php _e( 'You can find this in your MenuPublisher backend, navigate there to DISTRIBUTION => HOMEPAGE and search for <b>RestaurantCode</b>',  'menupublisher-4-wp' ); ?>
    423423                                            </div>
    424424                                        </div>
     
    435435                                    <th scope="row">
    436436                                        <label>
    437                                             <?php _e( 'Powered info:',  self::$constants['TEXT_DOMAIN'] ); ?>
     437                                            <?php _e( 'Powered info:',  'menupublisher-4-wp' ); ?>
    438438                                        </label>
    439439                                    </th>
     
    447447                                                        checked="checked"
    448448                                                    <?php endif; ?>
    449                                                 />&nbsp;<?php echo _e( 'Show powered info', self::$constants['TEXT_DOMAIN'] ); ?>
     449                                                />&nbsp;<?php echo _e( 'Show powered info', 'menupublisher-4-wp' ); ?>
    450450                                            </label>
    451451                                        </div>
     
    461461                                                $selected_properties = '';
    462462                                                if ($loop_snippet_setup['snippet_layout'] == self::$constants['LAYOUT_2_COLUMNS']) {
    463                                                     $selected_properties = __( '2-columns layout', self::$constants['TEXT_DOMAIN'] );
     463                                                    $selected_properties = __( '2-columns layout', 'menupublisher-4-wp' );
    464464                                                } else {
    465                                                     $selected_properties = __( '1-column layout', self::$constants['TEXT_DOMAIN'] );
     465                                                    $selected_properties = __( '1-column layout', 'menupublisher-4-wp' );
    466466                                                }
    467467                                                foreach ( explode( ', ', $loop_snippet_setup['card_types']) as $card_type ) {
    468468                                                    if ($card_type == 0) {
    469                                                         $selected_properties .= ', ' . __( 'shows lunch dishes', self::$constants['TEXT_DOMAIN'] );
     469                                                        $selected_properties .= ', ' . __( 'shows lunch dishes', 'menupublisher-4-wp' );
    470470                                                        if ($loop_snippet_setup['whole_week']) {
    471                                                             $selected_properties .=  ' ' . __( 'of whole week ', self::$constants['TEXT_DOMAIN'] );
     471                                                            $selected_properties .=  ' ' . __( 'of whole week ', 'menupublisher-4-wp' );
    472472                                                        }
    473473                                                    }
    474474                                                }
    475475                                                if ($loop_snippet_setup['collections']) {
    476                                                     $selected_properties .= ', ' . __( 'shows à la carte dishes', self::$constants['TEXT_DOMAIN'] );
     476                                                    $selected_properties .= ', ' . __( 'shows à la carte dishes', 'menupublisher-4-wp' );
    477477                                                }
    478478                                                echo $selected_properties;
     
    484484                                                class="button button-primary"
    485485                                            >
    486                                                 <?php _e( 'edit', self::$constants['TEXT_DOMAIN'] ); ?>
     486                                                <?php _e( 'edit', 'menupublisher-4-wp' ); ?>
    487487                                            </a>
    488488                                        </td>
     
    499499                                    style="float: right;"
    500500                                >
    501                                     <?php _e( '+add code snippet',  self::$constants['TEXT_DOMAIN'] ); ?>
     501                                    <?php _e( '+add code snippet',  'menupublisher-4-wp' ); ?>
    502502                                </a>
    503503                            <?php   endif; ?>
    504504                            <input
    505505                                type="submit"
    506                                 value="<?php esc_attr_e( 'save', self::$constants['TEXT_DOMAIN'] ) ?>"
     506                                value="<?php esc_attr_e( 'save', 'menupublisher-4-wp' ) ?>"
    507507                                class="button button-primary"
    508508                                id="submit"
  • menupublisher-4-wp/branches/releaseMerge/assets/templates/menupublisher-4-wp-startcode.php

    r1527910 r1530861  
    44    if (defined('MENUPUBLISHER_4_WP_STARTCODE_DEFINED')) {
    55        printf(
    6             __( '<div style="color: red;">You may only use %s once on a page</div>', self::$constants['TEXT_DOMAIN'] ),
     6            __( '<div style="color: red;">You may only use %s once on a page</div>', 'menupublisher-4-wp' ),
    77            self::$constants['SHORT_CODE_NAME']
    88        );
     
    2424                        <?php
    2525                            printf(
    26                                 __( 'Please setup %s <a href="%s">here</a> before using this shortcode.', self::$constants['TEXT_DOMAIN'] ),
     26                                __( 'Please setup %s <a href="%s">here</a> before using this shortcode.', 'menupublisher-4-wp' ),
    2727                                self::$constants['PLUGIN_NAME'],
    2828                                menu_page_url( self::$constants['ADMIN_MENU_SLUG'] )
     
    5050                        <?php
    5151                            printf(
    52                                 __( 'Please setup %s <a href="%s">here</a> before using this shortcode.', self::$constants['TEXT_DOMAIN'] ),
     52                                __( 'Please setup %s <a href="%s">here</a> before using this shortcode.', 'menupublisher-4-wp' ),
    5353                                self::$constants['PLUGIN_NAME'],
    5454                                menu_page_url( self::$constants['ADMIN_MENU_SLUG'] )
     
    121121                        { //oTranslations:
    122122                            oFixedStrings: {
    123                                 additAllergText: '<?php _e( 'Here you have the possibility to ' .
    124                                                  'exclude dishes that contain specific allergens ' .
    125                                                  'or additives. If you wish to hide a menu with ' .
    126                                                  'a certain allergen, then simply uncheck the ' .
    127                                                  'corresponding checkbox. The same applies to ' .
    128                                                  'additives.',                            self::$constants['TEXT_DOMAIN'] ); ?>',
    129                                 additives:       '<?php _e( 'Additives',                  self::$constants['TEXT_DOMAIN'] ); ?>',
    130                                 additAndAllerg:  '<?php _e( 'Additives and allergens',    self::$constants['TEXT_DOMAIN'] ); ?>',
    131                                 allergens:       '<?php _e( 'Allergens',                  self::$constants['TEXT_DOMAIN'] ); ?>',
    132                                 downloadPdf:     '<?php _e( '&gg; download card as PDF ', self::$constants['TEXT_DOMAIN'] ); ?>',
    133                                 from:            '<?php _e( 'from',                       self::$constants['TEXT_DOMAIN'] ); ?>',
    134                                 lunch:           '<?php _e( 'Lunch',                      self::$constants['TEXT_DOMAIN'] ); ?>',
    135                                 menus:           '<?php _e( 'Menu',                       self::$constants['TEXT_DOMAIN'] ); ?>',
    136                                 noData:          '<?php _e( 'Currently the restaurant has ' .
    137                                                  'no menu setup, try again later.',       self::$constants['TEXT_DOMAIN'] ); ?>',
    138                                 or:              '<?php _e( 'or',                         self::$constants['TEXT_DOMAIN'] ); ?>'
     123                                additAllergText: '<?php _e( 'Here you have the possibility to exclude dishes that contain specific allergens or additives. If you wish to hide a menu with a certain allergen, then simply uncheck the corresponding checkbox. The same applies to additives.', 'menupublisher-4-wp' ); ?>',
     124                                additives:       '<?php _e( 'Additives',                  'menupublisher-4-wp' ); ?>',
     125                                additAndAllerg:  '<?php _e( 'Additives and allergens',    'menupublisher-4-wp' ); ?>',
     126                                allergens:       '<?php _e( 'Allergens',                  'menupublisher-4-wp' ); ?>',
     127                                downloadPdf:     '<?php _e( '&gg; download card as PDF ', 'menupublisher-4-wp' ); ?>',
     128                                from:            '<?php _e( 'from',                       'menupublisher-4-wp' ); ?>',
     129                                lunch:           '<?php _e( 'Lunch',                      'menupublisher-4-wp' ); ?>',
     130                                menus:           '<?php _e( 'Menu',                       'menupublisher-4-wp' ); ?>',
     131                                noData:          '<?php _e( 'Currently the restaurant has no menu setup, try again later.', 'menupublisher-4-wp' ); ?>',
     132                                or:              '<?php _e( 'or',                         'menupublisher-4-wp' ); ?>'
    139133                            },
    140134                            aWeekDayNames: [
    141                                 '<?php _e( 'Monday',    self::$constants['TEXT_DOMAIN'] ); ?>',
    142                                 '<?php _e( 'Tuesday',   self::$constants['TEXT_DOMAIN'] ); ?>',
    143                                 '<?php _e( 'Wednesday', self::$constants['TEXT_DOMAIN'] ); ?>',
    144                                 '<?php _e( 'Thursday',  self::$constants['TEXT_DOMAIN'] ); ?>',
    145                                 '<?php _e( 'Friday',    self::$constants['TEXT_DOMAIN'] ); ?>',
    146                                 '<?php _e( 'Saturday',  self::$constants['TEXT_DOMAIN'] ); ?>',
    147                                 '<?php _e( 'Sunday',    self::$constants['TEXT_DOMAIN'] ); ?>'
     135                                '<?php _e( 'Monday',    'menupublisher-4-wp' ); ?>',
     136                                '<?php _e( 'Tuesday',   'menupublisher-4-wp' ); ?>',
     137                                '<?php _e( 'Wednesday', 'menupublisher-4-wp' ); ?>',
     138                                '<?php _e( 'Thursday',  'menupublisher-4-wp' ); ?>',
     139                                '<?php _e( 'Friday',    'menupublisher-4-wp' ); ?>',
     140                                '<?php _e( 'Saturday',  'menupublisher-4-wp' ); ?>',
     141                                '<?php _e( 'Sunday',    'menupublisher-4-wp' ); ?>'
    148142                            ],
    149143                            aMonthNames: [
    150                                 '<?php _e( 'January',   self::$constants['TEXT_DOMAIN'] ); ?>',
    151                                 '<?php _e( 'February',  self::$constants['TEXT_DOMAIN'] ); ?>',
    152                                 '<?php _e( 'March',     self::$constants['TEXT_DOMAIN'] ); ?>',
    153                                 '<?php _e( 'April',     self::$constants['TEXT_DOMAIN'] ); ?>',
    154                                 '<?php _e( 'May',       self::$constants['TEXT_DOMAIN'] ); ?>',
    155                                 '<?php _e( 'June',      self::$constants['TEXT_DOMAIN'] ); ?>',
    156                                 '<?php _e( 'July',      self::$constants['TEXT_DOMAIN'] ); ?>',
    157                                 '<?php _e( 'August',    self::$constants['TEXT_DOMAIN'] ); ?>',
    158                                 '<?php _e( 'September', self::$constants['TEXT_DOMAIN'] ); ?>',
    159                                 '<?php _e( 'October',   self::$constants['TEXT_DOMAIN'] ); ?>',
    160                                 '<?php _e( 'November',  self::$constants['TEXT_DOMAIN'] ); ?>',
    161                                 '<?php _e( 'December',  self::$constants['TEXT_DOMAIN'] ); ?>'
     144                                '<?php _e( 'January',   'menupublisher-4-wp' ); ?>',
     145                                '<?php _e( 'February',  'menupublisher-4-wp' ); ?>',
     146                                '<?php _e( 'March',     'menupublisher-4-wp' ); ?>',
     147                                '<?php _e( 'April',     'menupublisher-4-wp' ); ?>',
     148                                '<?php _e( 'May',       'menupublisher-4-wp' ); ?>',
     149                                '<?php _e( 'June',      'menupublisher-4-wp' ); ?>',
     150                                '<?php _e( 'July',      'menupublisher-4-wp' ); ?>',
     151                                '<?php _e( 'August',    'menupublisher-4-wp' ); ?>',
     152                                '<?php _e( 'September', 'menupublisher-4-wp' ); ?>',
     153                                '<?php _e( 'October',   'menupublisher-4-wp' ); ?>',
     154                                '<?php _e( 'November',  'menupublisher-4-wp' ); ?>',
     155                                '<?php _e( 'December',  'menupublisher-4-wp' ); ?>'
    162156                            ]
    163157                        },//oTranslations
  • menupublisher-4-wp/branches/releaseMerge/menupublisher-4-wp.php

    r1527910 r1530861  
    2626            'PLUGIN_SLUG'           => 'menupublisher_4_wp',
    2727            'SHORT_CODE_NAME'       => 'menupublisher-4-wp',
     28
     29            // WordPress translation docs advise:
     30            // DO NOT USE this constant inside the __() functions
     31            // this constant is only for lookup
    2832            'TEXT_DOMAIN'           => 'menupublisher-4-wp',
    2933            'TMCE_PLUGIN_NAME'      => 'menupublisher_4_wp_plugin',
     
    6670            }
    6771
    68             self::$constants['TMCE_PLUGIN_BTN_TEXT'] = __( 'Insert InlineCode', self::$constants['TEXT_DOMAIN'] );
     72            self::$constants['TMCE_PLUGIN_BTN_TEXT'] = __( 'Insert InlineCode', 'menupublisher-4-wp' );
    6973
    7074            self::register_script_style();
    7175
    7276            // trailing slash after languages is here IMPORTANT
    73             load_plugin_textdomain( self::$constants['TEXT_DOMAIN'], false, basename( dirname( __FILE__ ) ) . '/languages/' );
     77            load_plugin_textdomain( 'menupublisher-4-wp', false, basename( dirname( __FILE__ ) ) . '/languages/' );
    7478            add_action(
    7579                'wp_enqueue_scripts',
Note: See TracChangeset for help on using the changeset viewer.