Making WordPress.org


Ignore:
Timestamp:
02/21/2017 12:03:58 AM (8 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/sponsor-payment/main.php

    r4156 r4967  
    88    <div id="content" class="wcorg-sponsor-payment" role="main">
    99
    10         <h1 class="entry-title">Sponsorship Payment</h1>
     10        <h1 class="entry-title"><?php esc_html_e( 'Sponsorship Payment', 'wordcamporg' ); ?></h1>
    1111
    1212        <?php if ( ! empty( $data['errors'] ) ) : ?>
    1313            <?php foreach ( $data['errors'] as $error ) : ?>
    14                 <p><strong>Error:</strong> <?php echo esc_html( $error ); ?></p>
     14                <p><strong><?php esc_html_e( 'Error:', 'wordcamporg' ); ?></strong> <?php echo esc_html( $error ); ?></p>
    1515            <?php endforeach; ?>
    1616        <?php endif; ?>
     
    1818        <?php if ( $data['step'] == STEP_SELECT_INVOICE ) : ?>
    1919
    20             <p>Use this form to pay your WordCamp sponsorship fee to WordPress Community Support, PBC. If you did not receive an invoice ID yet, please get in touch with the event's Sponsorships Coordinator for more information.</p>
     20            <p><?php esc_html_e( 'Use this form to pay your WordCamp sponsorship fee to WordPress Community Support, PBC. If you did not receive an invoice ID yet, please get in touch with the event\'s Sponsorships Coordinator for more information.', 'wordcamporg' ); ?></p>
    2121
    2222            <form method="POST">
     
    2424                <input type="hidden" name="sponsor_payment_submit" value="1" />
    2525
    26                 <label>Event</label>
     26                <label><?php esc_html_e( 'Event', 'wordcamporg' ); ?></label>
    2727                <div class="control">
    2828                    <select name="wordcamp_id">
    29                         <option value="" disabled selected>Select a WordCamp</option>
     29                        <option value="" disabled selected><?php esc_html_e( 'Select a WordCamp', 'wordcamporg' ); ?></option>
    3030                        <?php foreach ( $data['wordcamps'] as $wordcamp ) : ?>
    3131                        <option value="<?php echo esc_attr( $wordcamp->ID ); ?>"><?php echo esc_html( $wordcamp->post_title ); ?></option>
     
    3434                </div>
    3535
    36                 <label>Invoice ID</label>
     36                <label><?php esc_html_e( 'Invoice ID', 'wordcamporg' ); ?></label>
    3737                <div class="control">
    3838                    <input type="text" name="invoice_id" />
    3939                </div>
    4040
    41                 <label>Currency</label>
     41                <label><?php esc_html_e( 'Currency', 'wordcamporg' ); ?></label>
    4242                <div class="control">
    4343                    <select name="currency">
    44                         <option value="" disabled selected>Select a Currency</option>
     44                        <option value="" disabled selected><?php esc_html_e( 'Select a Currency', 'wordcamporg' ); ?></option>
    4545                        <?php foreach ( $data['currencies'] as $currency_key => $currency_name ) : ?>
    4646                        <option value="<?php echo esc_attr( $currency_key ); ?>">
     
    5151                </div>
    5252
    53                 <label>Amount</label>
     53                <label><?php esc_html_e( 'Amount', 'wordcamporg' ); ?></label>
    5454                <div class="control">
    5555                    <input type="text" name="amount" />
     
    5858                <div class="clear"></div>
    5959
    60                 <input type="submit" value="Continue" />
     60                <input type="submit" value="<?php esc_attr_e( 'Continue', 'wordcamporg' ); ?>" />
    6161            </form>
    6262
    6363        <?php elseif ( $data['step'] == STEP_PAYMENT_DETAILS ) : ?>
    6464
    65             <p>Please review the details below and hit "Make a Payment" when you're ready.</p>
     65            <p><?php esc_html_e( 'Please review the details below and hit "Make a Payment" when you\'re ready.', 'wordcamporg' ); ?></p>
    6666
    6767            <table>
    6868                <tr>
    69                     <td>Invoice</td>
     69                    <td><?php esc_html_e( 'Invoice', 'wordcamporg' ); ?></td>
    7070                    <td><?php echo esc_html( $data['payment']['invoice_id'] ); ?></td>
    7171                </tr>
    7272                <tr>
    73                     <td>Event</td>
     73                    <td><?php esc_html_e( 'Event', 'wordcamporg' ); ?></td>
    7474                    <td><?php echo esc_html( $data['payment']['wordcamp_obj']->post_title ); ?></td>
    7575                </tr>
    7676                <tr>
    77                     <td>Currency</td>
     77                    <td><?php esc_html_e( 'Currency', 'wordcamporg' ); ?></td>
    7878                    <td><?php echo esc_html( $data['payment']['currency'] ); ?></td>
    7979                </tr>
    8080                <tr>
    81                     <td>Amount</td>
     81                    <td><?php esc_html_e( 'Amount', 'wordcamporg' ); ?></td>
    8282                    <td><?php echo number_format( round( $data['payment']['amount'], 2 ), 2, '.', ' ' ); ?></td>
    8383                </tr>
     
    9595                    data-currency="<?php echo esc_attr( $data['payment']['currency'] ); ?>"
    9696                    data-name="WordPress Community Support, PBC"
    97                     data-description="Event Sponsorship Payment"
     97                    data-description="<?php esc_attr_e( 'Event Sponsorship Payment', 'wordcamporg' ); ?>"
    9898                    data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
    9999                    data-locale="auto"
    100                     data-panel-label="Pay"
    101                     data-label="Make a Payment"
     100                    data-panel-label="<?php esc_attr_e( 'Pay', 'wordcamporg' ); ?>"
     101                    data-label="<?php esc_attr_e( 'Make a Payment', 'wordcamporg' ); ?>"
    102102                    data-zip-code="true">
    103103                </script>
     
    106106        <?php elseif ( $data['step'] == STEP_PAYMENT_SUCCESS ) : ?>
    107107
    108             <p><strong>Success!</strong> Your payment has been received, thank you!</p>
     108            <p><strong><?php esc_html_e( 'Success!', 'wordcamporg' ); ?></strong> <?php esc_html_e( 'Your payment has been received, thank you!', 'wordcamporg' ); ?></p>
    109109
    110110            <ul>
    111                 <li><a href="<?php echo esc_url( add_query_arg( 'again', 1 ) ); ?>">Make another payment</a></li>
    112                 <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Go back to Central</a></li>
     111                <li><a href="<?php echo esc_url( add_query_arg( 'again', 1 ) ); ?>"><?php esc_html_e( 'Make another payment', 'wordcamporg' ); ?></a></li>
     112                <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Go back to Central', 'wordcamporg' ); ?></a></li>
    113113            </ul>
    114114
Note: See TracChangeset for help on using the changeset viewer.