Changeset 1530861
- Timestamp:
- 11/09/2016 08:48:16 AM (9 years ago)
- Location:
- menupublisher-4-wp/branches/releaseMerge
- Files:
-
- 4 edited
- 1 copied
-
. (modified) (1 prop)
-
assets/templates/menupublisher-4-wp-settings.php (modified) (27 diffs)
-
assets/templates/menupublisher-4-wp-startcode.php (modified) (4 diffs)
-
languages (copied) (copied from menupublisher-4-wp/trunk/languages)
-
menupublisher-4-wp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
menupublisher-4-wp/branches/releaseMerge
-
Property
svn:mergeinfo
set to
/menupublisher-4-wp/trunk merged eligible
-
Property
svn:mergeinfo
set to
-
menupublisher-4-wp/branches/releaseMerge/assets/templates/menupublisher-4-wp-settings.php
r1527910 r1530861 10 10 add_options_page( 11 11 sprintf( 12 __( '%s options', self::$constants['TEXT_DOMAIN']),12 __( '%s options', 'menupublisher-4-wp' ), 13 13 self::$constants['PLUGIN_NAME'] 14 14 ), … … 84 84 $errors = array(); 85 85 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' ); 87 87 } else { 88 88 // check if that sRestaurantInlineHash is valid … … 98 98 $check_response = file_get_contents($restaurnt_inline_hash_check_url); 99 99 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' ); 101 101 } 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' ); 103 103 } 104 104 }//else if ( $_POST['sRestaurantInlineHash'] != '' ) … … 134 134 135 135 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' ); 137 137 } 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' ); 139 139 } else { 140 140 // check for $snippet_name uniqueness … … 149 149 }//foreach ( $settings['aSnippets'] ) 150 150 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' ); 152 152 } 153 153 }//else if ( $snippet_name != '' ) … … 212 212 class="button button-primary" 213 213 > 214 < <?php echo _e( 'back', self::$constants['TEXT_DOMAIN']); ?>214 < <?php echo _e( 'back', 'menupublisher-4-wp' ); ?> 215 215 </a> 216 216 <h1> 217 <?php _e( 'Snippet setup', self::$constants['TEXT_DOMAIN']); ?>217 <?php _e( 'Snippet setup', 'menupublisher-4-wp' ); ?> 218 218 </h1> 219 219 <?php if ( $settings_saved ): ?> … … 221 221 <p> 222 222 <strong> 223 <?php _e( 'Settings saved.', self::$constants['TEXT_DOMAIN']); ?>223 <?php _e( 'Settings saved.', 'menupublisher-4-wp' ); ?> 224 224 </strong> 225 225 </p> 226 226 <button class="notice-dismiss" type="button"> 227 227 <span class="screen-reader-text"> 228 <?php _e( 'Dismiss this notice.', self::$constants['TEXT_DOMAIN']); ?>228 <?php _e( 'Dismiss this notice.', 'menupublisher-4-wp' ); ?> 229 229 </span> 230 230 </button> … … 236 236 <th scope="row"> 237 237 <label> 238 <?php _e( 'Snippet name:', self::$constants['TEXT_DOMAIN']); ?>238 <?php _e( 'Snippet name:', 'menupublisher-4-wp' ); ?> 239 239 </label> 240 240 </th> … … 254 254 <?php else:?> 255 255 <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' ); ?> 257 257 </p> 258 258 <?php endif;?> … … 262 262 <th scope="row"> 263 263 <label> 264 <?php _e( 'Layout:', self::$constants['TEXT_DOMAIN']); ?>264 <?php _e( 'Layout:', 'menupublisher-4-wp' ); ?> 265 265 </label> 266 266 </th> … … 276 276 checked="checked" 277 277 <?php endif; ?> 278 /> <?php _e( 'one column', self::$constants['TEXT_DOMAIN']); ?>278 /> <?php _e( 'one column', 'menupublisher-4-wp' ); ?> 279 279 </label> 280 280 <br /> … … 289 289 checked="checked" 290 290 <?php endif; ?> 291 /> <?php _e( 'two columns', self::$constants['TEXT_DOMAIN']); ?>291 /> <?php _e( 'two columns', 'menupublisher-4-wp' ); ?> 292 292 </label> 293 293 </td> … … 296 296 <th scope="row"> 297 297 <label> 298 <?php _e( 'Lunch card:', self::$constants['TEXT_DOMAIN']); ?>298 <?php _e( 'Lunch card:', 'menupublisher-4-wp' ); ?> 299 299 </label> 300 300 </th> … … 311 311 checked="checked" 312 312 <?php endif; ?> 313 /> <?php echo _e( 'Show lunch dishes', self::$constants['TEXT_DOMAIN']); ?>313 /> <?php echo _e( 'Show lunch dishes', 'menupublisher-4-wp' ); ?> 314 314 </label> 315 315 <br /> … … 323 323 checked="checked" 324 324 <?php endif; ?> 325 /> <?php echo _e( 'show whole week', self::$constants['TEXT_DOMAIN']); ?>325 /> <?php echo _e( 'show whole week', 'menupublisher-4-wp' ); ?> 326 326 </label> 327 327 </div> 328 328 <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' ); ?> 330 330 </p> 331 331 </td> … … 334 334 <th scope="row"> 335 335 <label> 336 <?php _e( 'Menu (à la carte):', self::$constants['TEXT_DOMAIN']); ?>336 <?php _e( 'Menu (à la carte):', 'menupublisher-4-wp' ); ?> 337 337 </label> 338 338 </th> … … 346 346 checked="checked" 347 347 <?php endif; ?> 348 /> <?php echo _e( 'Show à la carte dishes', self::$constants['TEXT_DOMAIN']); ?>348 /> <?php echo _e( 'Show à la carte dishes', 'menupublisher-4-wp' ); ?> 349 349 </label> 350 350 </div> … … 357 357 <input 358 358 type="submit" 359 value="<?php esc_attr_e( 'save', self::$constants['TEXT_DOMAIN']) ?>"359 value="<?php esc_attr_e( 'save', 'menupublisher-4-wp' ) ?>" 360 360 class="button button-primary" 361 361 id="submit" … … 383 383 <h1><?php 384 384 printf( 385 __( '%s setup', self::$constants['TEXT_DOMAIN']),385 __( '%s setup', 'menupublisher-4-wp' ), 386 386 self::$constants['PLUGIN_NAME'] 387 387 ); … … 391 391 <p> 392 392 <strong> 393 <?php _e( 'Settings saved.', self::$constants['TEXT_DOMAIN']); ?>393 <?php _e( 'Settings saved.', 'menupublisher-4-wp' ); ?> 394 394 </strong> 395 395 </p> 396 396 <button class="notice-dismiss" type="button"> 397 397 <span class="screen-reader-text"> 398 <?php _e( 'Dismiss this notice.', self::$constants['TEXT_DOMAIN']); ?>398 <?php _e( 'Dismiss this notice.', 'menupublisher-4-wp' ); ?> 399 399 </span> 400 400 </button> … … 406 406 <th scope="row"> 407 407 <label> 408 <?php _e( 'RestaurantCode:', self::$constants['TEXT_DOMAIN']); ?>408 <?php _e( 'RestaurantCode:', 'menupublisher-4-wp' ); ?> 409 409 </label> 410 410 </th> … … 420 420 <div class="mmlt-ipoint"> 421 421 <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' ); ?> 423 423 </div> 424 424 </div> … … 435 435 <th scope="row"> 436 436 <label> 437 <?php _e( 'Powered info:', self::$constants['TEXT_DOMAIN']); ?>437 <?php _e( 'Powered info:', 'menupublisher-4-wp' ); ?> 438 438 </label> 439 439 </th> … … 447 447 checked="checked" 448 448 <?php endif; ?> 449 /> <?php echo _e( 'Show powered info', self::$constants['TEXT_DOMAIN']); ?>449 /> <?php echo _e( 'Show powered info', 'menupublisher-4-wp' ); ?> 450 450 </label> 451 451 </div> … … 461 461 $selected_properties = ''; 462 462 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' ); 464 464 } else { 465 $selected_properties = __( '1-column layout', self::$constants['TEXT_DOMAIN']);465 $selected_properties = __( '1-column layout', 'menupublisher-4-wp' ); 466 466 } 467 467 foreach ( explode( ', ', $loop_snippet_setup['card_types']) as $card_type ) { 468 468 if ($card_type == 0) { 469 $selected_properties .= ', ' . __( 'shows lunch dishes', self::$constants['TEXT_DOMAIN']);469 $selected_properties .= ', ' . __( 'shows lunch dishes', 'menupublisher-4-wp' ); 470 470 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' ); 472 472 } 473 473 } 474 474 } 475 475 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' ); 477 477 } 478 478 echo $selected_properties; … … 484 484 class="button button-primary" 485 485 > 486 <?php _e( 'edit', self::$constants['TEXT_DOMAIN']); ?>486 <?php _e( 'edit', 'menupublisher-4-wp' ); ?> 487 487 </a> 488 488 </td> … … 499 499 style="float: right;" 500 500 > 501 <?php _e( '+add code snippet', self::$constants['TEXT_DOMAIN']); ?>501 <?php _e( '+add code snippet', 'menupublisher-4-wp' ); ?> 502 502 </a> 503 503 <?php endif; ?> 504 504 <input 505 505 type="submit" 506 value="<?php esc_attr_e( 'save', self::$constants['TEXT_DOMAIN']) ?>"506 value="<?php esc_attr_e( 'save', 'menupublisher-4-wp' ) ?>" 507 507 class="button button-primary" 508 508 id="submit" -
menupublisher-4-wp/branches/releaseMerge/assets/templates/menupublisher-4-wp-startcode.php
r1527910 r1530861 4 4 if (defined('MENUPUBLISHER_4_WP_STARTCODE_DEFINED')) { 5 5 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' ), 7 7 self::$constants['SHORT_CODE_NAME'] 8 8 ); … … 24 24 <?php 25 25 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' ), 27 27 self::$constants['PLUGIN_NAME'], 28 28 menu_page_url( self::$constants['ADMIN_MENU_SLUG'] ) … … 50 50 <?php 51 51 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' ), 53 53 self::$constants['PLUGIN_NAME'], 54 54 menu_page_url( self::$constants['ADMIN_MENU_SLUG'] ) … … 121 121 { //oTranslations: 122 122 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( '≫ 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( '≫ 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' ); ?>' 139 133 }, 140 134 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' ); ?>' 148 142 ], 149 143 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' ); ?>' 162 156 ] 163 157 },//oTranslations -
menupublisher-4-wp/branches/releaseMerge/menupublisher-4-wp.php
r1527910 r1530861 26 26 'PLUGIN_SLUG' => 'menupublisher_4_wp', 27 27 '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 28 32 'TEXT_DOMAIN' => 'menupublisher-4-wp', 29 33 'TMCE_PLUGIN_NAME' => 'menupublisher_4_wp_plugin', … … 66 70 } 67 71 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' ); 69 73 70 74 self::register_script_style(); 71 75 72 76 // 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/' ); 74 78 add_action( 75 79 'wp_enqueue_scripts',
Note: See TracChangeset
for help on using the changeset viewer.