WordPress.org

Making WordPress.org

Ticket #2237: 2237.diff

File 2237.diff, 10.9 KB (added by Thomas Vitale, 4 years ago)

Added translation functions for most of the hard-coded string, corrected some translation functions in order to add html escaping plus minor adjustments regarding code standards.

  • wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-payment.php

    diff --git a/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-payment.php b/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-payment.php
    index 0b24279..825d444 100644
    a b  
    88
    99        <table class="form-table">
    1010                <?php if ( $box['args']['show_vendor_requested_payment_method'] ) : ?>
    11                         <?php $this->render_textarea_input( $post, 'Did the vendor request a specific type of payment?', 'vendor_requested_payment_method', 'Add any relevant details', false ); ?>
     11                        <?php $this->render_textarea_input( $post, __( 'Did the vendor request a specific type of payment?', 'wordcamporg' ), 'vendor_requested_payment_method', __( 'Add any relevant details', 'wordcamporg' ), false ); ?>
    1212                <?php endif;?>
    1313
    14                 <?php $this->render_radio_input( $post, 'Payment Method', 'payment_method' ); ?>
     14                <?php $this->render_radio_input( $post, __( 'Payment Method', 'wordcamporg' ), 'payment_method' ); ?>
    1515        </table>
    1616
    17         <table id="payment_method_direct_deposit_fields" class="form-table payment_method_fields <?php echo 'Direct Deposit' == $selected_payment_method ? 'active' : 'hidden'; ?>">
    18                 <?php $this->render_text_input( $post, 'Bank Name', 'ach_bank_name' ); ?>
    19                 <?php $this->render_radio_input( $post, 'Account Type', 'ach_account_type' ); ?>
    20                 <?php $this->render_text_input( $post, 'Routing Number', 'ach_routing_number' ); ?>
    21                 <?php $this->render_text_input( $post, 'Account Number', 'ach_account_number' ); ?>
    22                 <?php $this->render_text_input( $post, 'Account Holder Name', 'ach_account_holder_name' ); ?>
     17        <table id="payment_method_direct_deposit_fields" class="form-table payment_method_fields <?php echo __( 'Direct Deposit', 'wordcamporg' ) == $selected_payment_method ? 'active' : 'hidden'; ?>">
     18                <?php $this->render_text_input( $post, __( 'Bank Name', 'wordcamporg' ),                                                        'ach_bank_name' ); ?>
     19                <?php $this->render_radio_input( $post, __( 'Account Type', 'wordcamporg' ),                                    'ach_account_type' ); ?>
     20                <?php $this->render_text_input( $post, __( 'Routing Number', 'wordcamporg' ),                                   'ach_routing_number' ); ?>
     21                <?php $this->render_text_input( $post, __( 'Account Number', 'wordcamporg' ),                                   'ach_account_number' ); ?>
     22                <?php $this->render_text_input( $post, __( 'Account Holder Name', 'wordcamporg' ),              'ach_account_holder_name' ); ?>
    2323        </table>
    2424
    25         <div id="payment_method_check_fields" class="form-table payment_method_fields <?php echo 'Check' == $selected_payment_method ? 'active' : 'hidden'; ?>">
     25        <div id="payment_method_check_fields" class="form-table payment_method_fields <?php echo __( 'Check', 'wordcamporg' ) == $selected_payment_method ? 'active' : 'hidden'; ?>">
    2626                <table>
    27                         <?php $this->render_text_input( $post, 'Payable To', 'payable_to' ); ?>
    28                         <?php $this->render_text_input(    $post, 'Street Address',    'check_street_address' ); ?>
    29                         <?php $this->render_text_input(    $post, 'City',              'check_city'          ); ?>
    30                         <?php $this->render_text_input(    $post, 'State / Province',  'check_state'          ); ?>
    31                         <?php $this->render_text_input(    $post, 'ZIP / Postal Code', 'check_zip_code'      ); ?>
    32                         <?php $this->render_country_input( $post, 'Country',           'check_country'        ); ?>
     27                        <?php $this->render_text_input( $post, __( 'Payable To', 'wordcamporg' ),                               'payable_to' ); ?>
     28                        <?php $this->render_text_input( $post, __( 'Street Address', 'wordcamporg' ),           'check_street_address' ); ?>
     29                        <?php $this->render_text_input( $post, __( 'City', 'wordcamporg' ),                                                     'check_city' ); ?>
     30                        <?php $this->render_text_input( $post, __( 'State / Province', 'wordcamporg' ),         'check_state' ); ?>
     31                        <?php $this->render_text_input( $post, __( 'ZIP / Postal Code', 'wordcamporg' ),        'check_zip_code' ); ?>
     32                        <?php $this->render_country_input( $post, __( 'Country', 'wordcamporg' ),                               'check_country' ); ?>
    3333                </table>
    3434        </div>
    3535
    36         <p id="payment_method_credit_card_fields" class="description payment_method_fields <?php echo 'Credit Card' == $selected_payment_method ? 'active' : 'hidden'; ?>">
    37                 <?php _e( 'Please make sure that you upload an authorization form above, if one is required by the vendor.', 'wordcamporg' ); ?>
     36        <p id="payment_method_credit_card_fields" class="description payment_method_fields <?php echo __( 'Credit Card', 'wordcamporg' ) == $selected_payment_method ? 'active' : 'hidden'; ?>">
     37                <?php esc_html_e( 'Please make sure that you upload an authorization form above, if one is required by the vendor.', 'wordcamporg' ); ?>
    3838        </p>
    3939
    40         <div id="payment_method_wire_fields" class="form-table payment_method_fields <?php echo 'Wire' == $selected_payment_method ? 'active' : 'hidden'; ?>">
     40        <div id="payment_method_wire_fields" class="form-table payment_method_fields <?php echo __( 'Wire', 'wordcamporg' ) == $selected_payment_method ? 'active' : 'hidden'; ?>">
    4141                <h3>
    42                         <?php _e( "Beneficiary's Bank", 'wordcamporg' ); ?>
     42                        <?php esc_html_e( 'Beneficiary’s Bank', 'wordcamporg' ); ?>
    4343                </h3>
    4444
    4545                <table>
    46                         <?php $this->render_text_input( $post, 'Beneficiary’s Bank Name',              'bank_name' ); ?>
    47                         <?php $this->render_text_input( $post, 'Beneficiary’s Bank Street Address',    'bank_street_address' ); ?>
    48                         <?php $this->render_text_input( $post, 'Beneficiary’s Bank City',              'bank_city' ); ?>
    49                         <?php $this->render_text_input( $post, 'Beneficiary’s Bank State / Province',  'bank_state' ); ?>
    50                         <?php $this->render_text_input( $post, 'Beneficiary’s Bank ZIP / Postal Code', 'bank_zip_code' ); ?>
    51                         <?php $this->render_country_input( $post, 'Beneficiary’s Bank Country',        'bank_country_iso3166' ); ?>
    52                         <?php $this->render_text_input( $post, 'Beneficiary’s Bank SWIFT BIC',         'bank_bic' ); ?>
    53                         <?php $this->render_text_input( $post, 'Beneficiary’s Account Number or IBAN', 'beneficiary_account_number' ); ?>
     46                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Bank Name', 'wordcamporg' ),              'bank_name' ); ?>
     47                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Bank Street Address', 'wordcamporg' ),    'bank_street_address' ); ?>
     48                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Bank City', 'wordcamporg' ),              'bank_city' ); ?>
     49                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Bank State / Province', 'wordcamporg' ),  'bank_state' ); ?>
     50                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Bank ZIP / Postal Code', 'wordcamporg' ), 'bank_zip_code' ); ?>
     51                        <?php $this->render_country_input( $post, __( 'Beneficiary’s Bank Country', 'wordcamporg' ),        'bank_country_iso3166' ); ?>
     52                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Bank SWIFT BIC', 'wordcamporg' ),         'bank_bic' ); ?>
     53                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Account Number or IBAN', 'wordcamporg' ), 'beneficiary_account_number' ); ?>
    5454                </table>
    5555
    5656                <hr />
    5757                <h3>
    58                         <?php _e( "Intermediary Bank", 'wordcamporg' ); ?>
     58                        <?php esc_html_e( 'Intermediary Bank', 'wordcamporg' ); ?>
    5959                </h3>
    6060
    6161                <?php $this->render_checkbox_input(
     
    6565                ); ?>
    6666
    6767                <table id="intermediary_bank_fields">
    68                         <?php $this->render_text_input( $post, 'Intermediary Bank Name',              'interm_bank_name' ); ?>
    69                         <?php $this->render_text_input( $post, 'Intermediary Bank Street Address',    'interm_bank_street_address' ); ?>
    70                         <?php $this->render_text_input( $post, 'Intermediary Bank City',              'interm_bank_city' ); ?>
    71                         <?php $this->render_text_input( $post, 'Intermediary Bank State / Province',  'interm_bank_state' ); ?>
    72                         <?php $this->render_text_input( $post, 'Intermediary Bank ZIP / Postal Code', 'interm_bank_zip_code' ); ?>
    73                         <?php $this->render_country_input( $post, 'Intermediary Bank Country',        'interm_bank_country_iso3166' ); ?>
    74                         <?php $this->render_text_input( $post, 'Intermediary Bank SWIFT BIC',         'interm_bank_swift' ); ?>
    75                         <?php $this->render_text_input( $post, 'Intermediary Bank Account',           'interm_bank_account' ); ?>
     68                        <?php $this->render_text_input( $post, __( 'Intermediary Bank Name', 'wordcamporg' ),              'interm_bank_name' ); ?>
     69                        <?php $this->render_text_input( $post, __( 'Intermediary Bank Street Address', 'wordcamporg' ),    'interm_bank_street_address' ); ?>
     70                        <?php $this->render_text_input( $post, __( 'Intermediary Bank City', 'wordcamporg' ),              'interm_bank_city' ); ?>
     71                        <?php $this->render_text_input( $post, __( 'Intermediary Bank State / Province', 'wordcamporg' ),  'interm_bank_state' ); ?>
     72                        <?php $this->render_text_input( $post, __( 'Intermediary Bank ZIP / Postal Code', 'wordcamporg' ), 'interm_bank_zip_code' ); ?>
     73                        <?php $this->render_country_input( $post, __( 'Intermediary Bank Country', 'wordcamporg' ),        'interm_bank_country_iso3166' ); ?>
     74                        <?php $this->render_text_input( $post, __( 'Intermediary Bank SWIFT BIC', 'wordcamporg' ),         'interm_bank_swift' ); ?>
     75                        <?php $this->render_text_input( $post, __( 'Intermediary Bank Account', 'wordcamporg' ),           'interm_bank_account' ); ?>
    7676                </table>
    7777
    7878                <hr />
    7979                <h3>
    80                         <?php _e( "Beneficiary", 'wordcamporg' ); ?>
     80                        <?php esc_html_e( 'Beneficiary', 'wordcamporg' ); ?>
    8181                </h3>
    8282
    8383                <table>
    84                         <?php $this->render_text_input( $post, 'Beneficiary’s Name',              'beneficiary_name' ); ?>
    85                         <?php $this->render_text_input( $post, 'Beneficiary’s Street Address',    'beneficiary_street_address' ); ?>
    86                         <?php $this->render_text_input( $post, 'Beneficiary’s City',              'beneficiary_city' ); ?>
    87                         <?php $this->render_text_input( $post, 'Beneficiary’s State / Province',  'beneficiary_state' ); ?>
    88                         <?php $this->render_text_input( $post, 'Beneficiary’s ZIP / Postal Code', 'beneficiary_zip_code' ); ?>
    89                         <?php $this->render_country_input( $post, 'Beneficiary’s Country',        'beneficiary_country_iso3166' ); ?>
     84                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Name', 'wordcamporg' ),              'beneficiary_name' ); ?>
     85                        <?php $this->render_text_input( $post, __( 'Beneficiary’s Street Address', 'wordcamporg' ),    'beneficiary_street_address' ); ?>
     86                        <?php $this->render_text_input( $post, __( 'Beneficiary’s City', 'wordcamporg' ),              'beneficiary_city' ); ?>
     87                        <?php $this->render_text_input( $post, __( 'Beneficiary’s State / Province', 'wordcamporg' ),  'beneficiary_state' ); ?>
     88                        <?php $this->render_text_input( $post, __( 'Beneficiary’s ZIP / Postal Code', 'wordcamporg' ), 'beneficiary_zip_code' ); ?>
     89                        <?php $this->render_country_input( $post, __( 'Beneficiary’s Country', 'wordcamporg' ),        'beneficiary_country_iso3166' ); ?>
    9090                </table>
    9191        </div>
    9292</fieldset>
    9393
    9494<p class="wcb-form-required">
    95         <?php _e( '* required', 'wordcamporg' ); ?>
     95        <?php esc_html_e( '* required', 'wordcamporg' ); ?>
    9696</p>