Making WordPress.org


Ignore:
Timestamp:
02/21/2017 12:03:58 AM (5 years ago)
Author:
iandunn
Message:

WordCamp Payments: Internationalize strings

I also converted uses of non-escapted i18n functions -- e.g., __() -- to their escaped counterparts -- e.g., esc_html__().

Fixes 2229
Props thomas-vitale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-payment.php

    r2701 r4967  
    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, esc_html__( 'Did the vendor request a specific type of payment?', 'wordcamporg' ), 'vendor_requested_payment_method', esc_html__( '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, esc_html__( 'Payment Method', 'wordcamporg' ), 'payment_method' ); ?>
    1515    </table>
    1616
    1717    <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' ); ?>
     18        <?php $this->render_text_input(  $post, esc_html__( 'Bank Name',           'wordcamporg' ), 'ach_bank_name'          ); ?>
     19        <?php $this->render_radio_input( $post, esc_html__( 'Account Type',        'wordcamporg' ), 'ach_account_type'        ); ?>
     20        <?php $this->render_text_input(  $post, esc_html__( 'Routing Number',      'wordcamporg' ), 'ach_routing_number'      ); ?>
     21        <?php $this->render_text_input(  $post, esc_html__( 'Account Number',      'wordcamporg' ), 'ach_account_number'      ); ?>
     22        <?php $this->render_text_input(  $post, esc_html__( 'Account Holder Name', 'wordcamporg' ), 'ach_account_holder_name' ); ?>
    2323    </table>
    2424
    2525    <div id="payment_method_check_fields" class="form-table payment_method_fields <?php echo 'Check' == $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, esc_html__( 'Payable To',        'wordcamporg' ), 'payable_to'          ); ?>
     28            <?php $this->render_text_input(    $post, esc_html__( 'Street Address',    'wordcamporg' ), 'check_street_address' ); ?>
     29            <?php $this->render_text_input(    $post, esc_html__( 'City',              'wordcamporg' ), 'check_city'           ); ?>
     30            <?php $this->render_text_input(    $post, esc_html__( 'State / Province',  'wordcamporg' ), 'check_state'          ); ?>
     31            <?php $this->render_text_input(    $post, esc_html__( 'ZIP / Postal Code', 'wordcamporg' ), 'check_zip_code'       ); ?>
     32            <?php $this->render_country_input( $post, esc_html__( 'Country',           'wordcamporg' ), 'check_country'        ); ?>
    3333        </table>
    3434    </div>
    3535
    3636    <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' ); ?>
     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
    4040    <div id="payment_method_wire_fields" class="form-table payment_method_fields <?php echo 'Wire' == $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, esc_html__( 'Beneficiary’s Bank Name', 'wordcamporg' ),              'bank_name' ); ?>
     47            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s Bank Street Address', 'wordcamporg' ),    'bank_street_address' ); ?>
     48            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s Bank City', 'wordcamporg' ),              'bank_city' ); ?>
     49            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s Bank State / Province', 'wordcamporg' ),  'bank_state' ); ?>
     50            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s Bank ZIP / Postal Code', 'wordcamporg' ), 'bank_zip_code' ); ?>
     51            <?php $this->render_country_input( $post, esc_html__( 'Beneficiary’s Bank Country', 'wordcamporg' ),        'bank_country_iso3166' ); ?>
     52            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s Bank SWIFT BIC', 'wordcamporg' ),         'bank_bic' ); ?>
     53            <?php $this->render_text_input( $post, esc_html__( '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(
    6262            $post,
    63             __( 'Send this payment through an intermediary bank', 'wordcamporg' ),
     63            esc_html__( 'Send this payment through an intermediary bank', 'wordcamporg' ),
    6464            'needs_intermediary_bank'
    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, esc_html__( 'Intermediary Bank Name', 'wordcamporg' ),              'interm_bank_name' ); ?>
     69            <?php $this->render_text_input( $post, esc_html__( 'Intermediary Bank Street Address', 'wordcamporg' ),    'interm_bank_street_address' ); ?>
     70            <?php $this->render_text_input( $post, esc_html__( 'Intermediary Bank City', 'wordcamporg' ),              'interm_bank_city' ); ?>
     71            <?php $this->render_text_input( $post, esc_html__( 'Intermediary Bank State / Province', 'wordcamporg' ),  'interm_bank_state' ); ?>
     72            <?php $this->render_text_input( $post, esc_html__( 'Intermediary Bank ZIP / Postal Code', 'wordcamporg' ), 'interm_bank_zip_code' ); ?>
     73            <?php $this->render_country_input( $post, esc_html__( 'Intermediary Bank Country', 'wordcamporg' ),        'interm_bank_country_iso3166' ); ?>
     74            <?php $this->render_text_input( $post, esc_html__( 'Intermediary Bank SWIFT BIC', 'wordcamporg' ),         'interm_bank_swift' ); ?>
     75            <?php $this->render_text_input( $post, esc_html__( '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, esc_html__( 'Beneficiary’s Name', 'wordcamporg' ),              'beneficiary_name' ); ?>
     85            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s Street Address', 'wordcamporg' ),    'beneficiary_street_address' ); ?>
     86            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s City', 'wordcamporg' ),              'beneficiary_city' ); ?>
     87            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s State / Province', 'wordcamporg' ),  'beneficiary_state' ); ?>
     88            <?php $this->render_text_input( $post, esc_html__( 'Beneficiary’s ZIP / Postal Code', 'wordcamporg' ), 'beneficiary_zip_code' ); ?>
     89            <?php $this->render_country_input( $post, esc_html__( 'Beneficiary’s Country', 'wordcamporg' ),        'beneficiary_country_iso3166' ); ?>
    9090        </table>
    9191    </div>
     
    9393
    9494<p class="wcb-form-required">
    95     <?php _e( '* required', 'wordcamporg' ); ?>
     95    <?php esc_html_e( '* required', 'wordcamporg' ); ?>
    9696</p>
Note: See TracChangeset for help on using the changeset viewer.