Changeset 4967 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/reimbursement-request.php
- Timestamp:
- 02/21/2017 12:03:58 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/reimbursement-request.php
r3868 r4967 34 34 function register_post_type() { 35 35 $labels = array( 36 'name' => _x( 'Reimbursement Requests', 'general reimbursement requests', 'wordcamporg' ),37 'singular_name' => _x( 'Reimbursement Request', 'post type singular name', 'wordcamporg' ),38 'menu_name' => _x( 'Reimbursement Requests', 'admin menu', 'wordcamporg' ),39 'name_admin_bar' => _x( 'Reimbursement Requests', 'add new on admin bar', 'wordcamporg' ),40 'add_new' => _x( 'Add New', 'reimbursement request', 'wordcamporg' ),41 42 'add_new_item' => __( 'Add New Reimbursement Request', 'wordcamporg' ),43 'new_item' => __( 'New Reimbursement Request', 'wordcamporg' ),44 'edit_item' => __( 'Edit Reimbursement Request', 'wordcamporg' ),45 'view_item' => __( 'View Reimbursement Request', 'wordcamporg' ),46 'all_items' => __( 'Reimbursements', 'wordcamporg' ),47 'search_items' => __( 'Search Reimbursement Requests', 'wordcamporg' ),48 'not_found' => __( 'No Reimbursement Requests found.', 'wordcamporg' ),49 'not_found_in_trash' => __( 'No Reimbursement Requests found in Trash.', 'wordcamporg' ),36 'name' => esc_html_x( 'Reimbursement Requests', 'general reimbursement requests', 'wordcamporg' ), 37 'singular_name' => esc_html_x( 'Reimbursement Request', 'post type singular name', 'wordcamporg' ), 38 'menu_name' => esc_html_x( 'Reimbursement Requests', 'admin menu', 'wordcamporg' ), 39 'name_admin_bar' => esc_html_x( 'Reimbursement Requests', 'add new on admin bar', 'wordcamporg' ), 40 'add_new' => esc_html_x( 'Add New', 'reimbursement request', 'wordcamporg' ), 41 42 'add_new_item' => esc_html__( 'Add New Reimbursement Request', 'wordcamporg' ), 43 'new_item' => esc_html__( 'New Reimbursement Request', 'wordcamporg' ), 44 'edit_item' => esc_html__( 'Edit Reimbursement Request', 'wordcamporg' ), 45 'view_item' => esc_html__( 'View Reimbursement Request', 'wordcamporg' ), 46 'all_items' => esc_html__( 'Reimbursements', 'wordcamporg' ), 47 'search_items' => esc_html__( 'Search Reimbursement Requests', 'wordcamporg' ), 48 'not_found' => esc_html__( 'No Reimbursement Requests found.', 'wordcamporg' ), 49 'not_found_in_trash' => esc_html__( 'No Reimbursement Requests found in Trash.', 'wordcamporg' ), 50 50 ); 51 51 … … 89 89 'wcbrr_submitted', 90 90 array( 91 'label' => _x( 'Submitted', 'post', 'wordcamporg' ),91 'label' => esc_html_x( 'Submitted', 'post', 'wordcamporg' ), 92 92 'label_count' => _nx_noop( 'Submitted <span class="count">(%s)</span>', 'Submitted <span class="count">(%s)</span>', 'wordcamporg' ), 93 93 'public' => true, … … 99 99 'wcbrr_info_requested', 100 100 array( 101 'label' => _x( 'Information Requested', 'post', 'wordcamporg' ),101 'label' => esc_html_x( 'Information Requested', 'post', 'wordcamporg' ), 102 102 'label_count' => _nx_noop( 'Information Requested <span class="count">(%s)</span>', 'Information Requested <span class="count">(%s)</span>', 'wordcamporg' ), 103 103 'public' => true, … … 109 109 'wcbrr_rejected', 110 110 array( 111 'label' => _x( 'Rejected', 'post', 'wordcamporg' ),111 'label' => esc_html_x( 'Rejected', 'post', 'wordcamporg' ), 112 112 'label_count' => _nx_noop( 'Rejected <span class="count">(%s)</span>', 'Rejected <span class="count">(%s)</span>', 'wordcamporg' ), 113 113 'public' => true, … … 119 119 'wcbrr_in_process', 120 120 array( 121 'label' => _x( 'Payment in Process', 'post', 'wordcamporg' ),121 'label' => esc_html_x( 'Payment in Process', 'post', 'wordcamporg' ), 122 122 'label_count' => _nx_noop( 'Payment in Process <span class="count">(%s)</span>', 'Payment in Process <span class="count">(%s)</span>', 'wordcamporg' ), 123 123 'public' => true, … … 129 129 'wcbrr_paid', 130 130 array( 131 'label' => _x( 'Paid', 'post', 'wordcamporg' ),131 'label' => esc_html_x( 'Paid', 'post', 'wordcamporg' ), 132 132 'label_count' => _nx_noop( 'Paid <span class="count">(%s)</span>', 'Paid <span class="count">(%s)</span>', 'wordcamporg' ), 133 133 'public' => true, … … 148 148 add_meta_box( 149 149 'submitdiv', 150 __( 'Status', 'wordcamporg' ),150 esc_html__( 'Status', 'wordcamporg' ), 151 151 __NAMESPACE__ . '\render_status_metabox', 152 152 POST_TYPE, … … 157 157 add_meta_box( 158 158 'wcbrr_notes', 159 __( 'Notes', 'wordcamporg' ),159 esc_html__( 'Notes', 'wordcamporg' ), 160 160 __NAMESPACE__ . '\render_notes_metabox', 161 161 POST_TYPE, … … 166 166 add_meta_box( 167 167 'wcbrr_general_information', 168 __( 'General Information', 'wordcamporg' ),168 esc_html__( 'General Information', 'wordcamporg' ), 169 169 __NAMESPACE__ . '\render_general_information_metabox', 170 170 POST_TYPE, … … 175 175 $introduction_message = sprintf( 176 176 '<p>%s</p> <p>%s</p>', 177 __( 'This is where you can give us information on how we can reimburse you for approved expenses that you paid out-of-pocket.', 'wordcamporg' ),178 __( 'Each wire transfer and check costs us processing fees, so if you have multiple out-of-pocket expenses, please try to group them into one reimbursement request.', 'wordcamporg' )177 esc_html__( 'This is where you can give us information on how we can reimburse you for approved expenses that you paid out-of-pocket.', 'wordcamporg' ), 178 esc_html__( 'Each wire transfer and check costs us processing fees, so if you have multiple out-of-pocket expenses, please try to group them into one reimbursement request.', 'wordcamporg' ) 179 179 ); 180 180 181 181 add_meta_box( 182 182 'wcbrr_payment_information', 183 __( 'Payment Information', 'wordcamporg' ),183 esc_html__( 'Payment Information', 'wordcamporg' ), 184 184 array( $wcp_payment_request, 'render_payment_metabox' ), // todo centralize this instead of using directly from another module 185 185 POST_TYPE, … … 196 196 add_meta_box( 197 197 'wcbrr_expenses', 198 __( 'Expenses', 'wordcamporg' ),198 esc_html__( 'Expenses', 'wordcamporg' ), 199 199 __NAMESPACE__ . '\render_expenses_metabox', 200 200 POST_TYPE, … … 205 205 add_meta_box( 206 206 'wcp_log', 207 __( 'Log', 'wordcamporg' ),207 esc_html__( 'Log', 'wordcamporg' ), 208 208 __NAMESPACE__ . '\render_log_metabox', 209 209 POST_TYPE, … … 281 281 $editable_statuses = array( 'auto-draft', 'draft', 'wcb-incomplete' ); 282 282 $current_user_can_edit_request = false; 283 $submit_text = _x( 'Update', 'payment request', 'wordcamporg' );283 $submit_text = esc_html_x( 'Update', 'payment request', 'wordcamporg' ); 284 284 $submit_note = ''; 285 285 … … 287 287 $current_user_can_edit_request = true; 288 288 } elseif ( in_array( $post->post_status, $editable_statuses ) ) { 289 $submit_text = __( 'Submit for Review', 'wordcamporg' );290 $submit_note = __( 'Once submitted for review, this request can not be edited.', 'wordcamporg' );289 $submit_text = esc_html__( 'Submit for Review', 'wordcamporg' ); 290 $submit_note = esc_html__( 'Once submitted for review, this request can not be edited.', 'wordcamporg' ); 291 291 $current_user_can_edit_request = true; 292 292 } … … 297 297 $request_id = get_current_blog_id() . '-' . $post->ID; 298 298 $requested_by = \WordCamp_Budgets::get_requester_name( $post->post_author ); 299 $update_text = current_user_can( 'manage_network' ) ? __( 'Update Request', 'wordcamporg' ) :__( 'Send Request', 'wordcamporg' );299 $update_text = current_user_can( 'manage_network' ) ? esc_html__( 'Update Request', 'wordcamporg' ) : esc_html__( 'Send Request', 'wordcamporg' ); 300 300 301 301 require_once( dirname( __DIR__ ) . '/views/reimbursement-request/metabox-status.php' ); … … 350 350 function get_reimbursement_reasons() { 351 351 return array( 352 'last-minute-purchase' => __( 'Last-minute purchase', 'wordcamporg' ),353 'vendor-required-cash' => __( 'Vendor required cash payment', 'wordcamporg' ),354 'payment-on-delivery' => __( 'Vendor required payment at delivery', 'wordcamporg' ),355 'convenience' => __( 'Organizer convenience', 'wordcamporg' ),356 'central-missed-payment' => __( "Payment by Central didn't come through", 'wordcamporg' ),357 'other' => __( 'Other (describe in next field)', 'wordcamporg' ),352 'last-minute-purchase' => esc_html__( 'Last-minute purchase', 'wordcamporg' ), 353 'vendor-required-cash' => esc_html__( 'Vendor required cash payment', 'wordcamporg' ), 354 'payment-on-delivery' => esc_html__( 'Vendor required payment at delivery', 'wordcamporg' ), 355 'convenience' => esc_html__( 'Organizer convenience', 'wordcamporg' ), 356 'central-missed-payment' => esc_html__( "Payment by Central didn't come through", 'wordcamporg' ), 357 'other' => esc_html__( 'Other (describe in next field)', 'wordcamporg' ), 358 358 ); 359 359 }
Note: See TracChangeset
for help on using the changeset viewer.