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/budget-tool/main.php

    r3858 r4967  
    2020            <?php endif; ?>
    2121
    22             <span>Preliminary Budget</span>
     22            <span><?php esc_html_e( 'Preliminary Budget', 'wordcamporg' ); ?></span>
    2323        </a>
    2424        <?php elseif ( $budget['status'] == 'approved' ) : ?>
     
    2727            <svg width="20" height="20" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"/></svg>
    2828
    29             <span>Approved Budget</span>
     29            <span><?php esc_html_e( 'Approved Budget', 'wordcamporg' ); ?></span>
    3030        </a>
    3131        <a href="<?php echo esc_url( add_query_arg( 'wcb-view', 'working' ) ); ?>"
    3232            class="nav-tab <?php if ( $view == 'working' ) { ?>nav-tab-active<?php } ?>">
    33             <span>Working Budget</span>
     33            <span><?php esc_html_e( 'Working Budget', 'wordcamporg' ); ?></span>
    3434        </a>
    3535        <?php endif; ?>
    36         <!--<a href="#" class="nav-tab">Working Budget</a>-->
     36        <!--<a href="#" class="nav-tab"><?php esc_html_e( 'Working Budget', 'wordcamporg' ); ?></a>-->
    3737    </h2>
    3838
    3939    <?php if ( $budget['status'] == 'draft' ) : ?>
    40     <p style="max-width: 800px;">Welcome to your WordCamp budget, it's time to crunch some numbers! When you're done with the preliminary budget, hit the "Submit for Approval" button below – a WordCamp deputy will be notified and will review your work. If you're having trouble with these numbers, or if you have any questions, don't hesitate to reach out to your mentor or Central.</p>
    41     <?php elseif ( $budget['status'] == 'pending' ) : ?>
    42     <p style="max-width: 800px;">This budget has been submitted for approval. You will be notified when it is approved. Or not.</p>
    43     <?php elseif ( $budget['status'] == 'approved' && $view == 'approved' ) : ?>
    44     <p style="max-width: 800px;">This budget has been approved and can not be modified. Use the working budget if you'd like to play around with numbers.</p>
    45     <?php elseif ( $view == 'working' ) : ?>
    46     <p style="max-width: 800px;">Welcome to your working budget. Feel free to play around with numbers here. They will not affect your approved budget.</p>
     40        <p style="max-width: 800px;"><?php esc_html_e( 'Welcome to your WordCamp budget, it\'s time to crunch some numbers! When you\'re done with the preliminary budget, hit the "Submit for Approval" button below – a WordCamp deputy will be notified and will review your work. If you\'re having trouble with these numbers, or if you have any questions, don\'t hesitate to reach out to your mentor or Central.', 'wordcamporg' ); ?></p>
     41        <?php elseif ( $budget['status'] == 'pending' ) : ?>
     42        <p style="max-width: 800px;"><?php esc_html_e( 'This budget has been submitted for approval. You will be notified when it is reviewed.', 'wordcamporg' ); ?></p>
     43        <?php elseif ( $budget['status'] == 'approved' && $view == 'approved' ) : ?>
     44        <p style="max-width: 800px;"><?php esc_html_e( "This budget has been approved and cannot be modified. Use the working budget if you'd like to play around with numbers.", 'wordcamporg' ); ?></p>
     45        <?php elseif ( $view == 'working' ) : ?>
     46        <p style="max-width: 800px;"><?php esc_html_e( 'Welcome to your working budget. Feel free to play around with numbers here. They will not affect your approved budget.', 'wordcamporg' ); ?></p>
    4747    <?php endif; ?>
    4848
    4949    <div class="left">
    50         <h2>Event Data</h2>
     50        <h2><?php esc_html_e( 'Event Data', 'wordcamporg' ); ?></h2>
    5151        <table class="wcb-budget-container">
    5252            <tbody>
    5353                <tr class="wcb-group-header">
    54                     <th style="width: 50%;">Name</th>
    55                     <th style="width: 50%;">Value</th>
     54                    <th style="width: 50%;"><?php esc_html_e( 'Name',  'wordcamporg' ); ?></th>
     55                    <th style="width: 50%;"><?php esc_html_e( 'Value', 'wordcamporg' ); ?></th>
    5656                </tr>
    5757                <tr class="wcb-meta-placeholder" style="display: none;">
     
    6262    </div>
    6363    <div class="right">
    64         <h2>Summary</h2>
     64        <h2><?php esc_html_e( 'Summary', 'wordcamporg' ); ?></h2>
    6565        <div class="wcb-summary-placeholder"></div>
    6666    </div>
     
    6868    <div class="clear"></div>
    6969
    70     <h2>Expenses</h2>
     70    <h2><?php esc_html_e( 'Expenses', 'wordcamporg' ); ?></h2>
    7171    <table class="wcb-budget-container">
    7272        <tbody>
    7373            <tr class="wcb-group-header">
    74                 <th style="width: 20%;">Category</th>
    75                 <th style="width: 40%;">Detail</th>
    76                 <th style="width: 25%;" class="amount">Amount</th>
     74                <th style="width: 20%;"><?php esc_html_e( 'Category', 'wordcamporg' ); ?></th>
     75                <th style="width: 40%;"><?php esc_html_e( 'Detail',   'wordcamporg' ); ?></th>
     76                <th style="width: 25%;" class="amount"><?php esc_html_e( 'Amount', 'wordcamporg' ); ?></th>
    7777                <th style="width: 15%;"></th>
    7878            </tr>
     
    8080            <tr class="wcb-expense-placeholder">
    8181                <?php if ( $editable ) : ?>
    82                 <td colspan="4">New Expense Item</td>
     82                <td colspan="4"><?php esc_html_e( 'New Expense Item', 'wordcamporg' ); ?></td>
    8383                <?php endif; ?>
    8484            </tr>
     
    8686    </table>
    8787
    88     <h2>Income</h2>
     88    <h2><?php esc_html_e( 'Income', 'wordcamporg' ); ?></h2>
    8989    <table class="wcb-budget-container">
    9090        <tbody>
    9191            <tr class="wcb-group-header">
    92                 <th style="width: 20%;">Category</th>
    93                 <th style="width: 40%;">Detail</th>
    94                 <th style="width: 25%;" class="amount">Amount</th>
     92                <th style="width: 20%;"><?php esc_html_e( 'Category', 'wordcamporg' ); ?></th>
     93                <th style="width: 40%;"><?php esc_html_e( 'Detail',   'wordcamporg' ); ?></th>
     94                <th style="width: 25%;" class="amount"><?php esc_html_e( 'Amount', 'wordcamporg' ); ?></th>
    9595                <th style="width: 15%;"></th>
    9696            </tr>
     
    9898            <tr class="wcb-income-placeholder">
    9999                <?php if ( $editable ) : ?>
    100                 <td colspan="4">New Income Item</td>
     100                <td colspan="4"><?php esc_html_e( 'New Income Item', 'wordcamporg' ); ?></td>
    101101                <?php endif; ?>
    102102            </tr>
     
    110110        <?php if ( $budget['status'] == 'draft' ) : ?>
    111111        <p class="submit">
    112             <?php submit_button( 'Save Draft', 'secondary', 'wcb-budget-save-draft', false ); ?>
    113             <?php submit_button( 'Save &amp; Request Review', 'secondary', 'wcb-budget-request-review', false ); ?>
    114             <a href="<?php echo admin_url( 'admin.php?page=wordcamp-budget' ); ?>" class="button">Cancel Changes</a>
    115             <?php submit_button( 'Submit for Approval', 'primary', 'wcb-budget-submit', false ); ?>
     112            <?php submit_button( esc_html__( 'Save Draft', 'wordcamporg' ), 'secondary', 'wcb-budget-save-draft', false ); ?>
     113            <?php submit_button( esc_html__( 'Save &amp; Request Review', 'wordcamporg' ), 'secondary', 'wcb-budget-request-review', false ); ?>
     114            <a href="<?php echo admin_url( 'admin.php?page=wordcamp-budget' ); ?>" class="button"><?php esc_html_e( 'Cancel Changes', 'wordcamporg' ); ?></a>
     115            <?php submit_button( esc_html__( 'Submit for Approval', 'wordcamporg' ), 'primary', 'wcb-budget-submit', false ); ?>
    116116        </p>
    117117        <?php elseif ( $budget['status'] == 'pending' && current_user_can( 'wcb_approve_budget' ) ) : ?>
    118118        <p class="submit">
    119             <?php submit_button( 'Approve', 'primary', 'wcb-budget-approve', false ); ?>
    120             <?php submit_button( 'Reject', 'primary', 'wcb-budget-reject', false ); ?>
     119            <?php submit_button( esc_html__( 'Approve', 'wordcamporg' ), 'primary', 'wcb-budget-approve', false ); ?>
     120            <?php submit_button( esc_html__( 'Reject', 'wordcamporg' ), 'primary', 'wcb-budget-reject', false ); ?>
    121121        </p>
    122122        <?php elseif ( $budget['status'] == 'approved' && $view == 'working' ) : ?>
    123123        <p class="submit">
    124             <?php submit_button( 'Update Working Budget', 'primary', 'wcb-budget-update-working', false ); ?>
    125             <a href="<?php echo admin_url( 'admin.php?page=wordcamp-budget&wcb-view=working' ); ?>" class="button">Cancel Changes</a>
    126             <?php submit_button( 'Reset to Approved Budget', 'secondary', 'wcb-budget-reset', false ); ?>
     124            <?php submit_button( esc_html__( 'Update Working Budget', 'wordcamporg' ), 'primary', 'wcb-budget-update-working', false ); ?>
     125            <a href="<?php echo admin_url( 'admin.php?page=wordcamp-budget&wcb-view=working' ); ?>" class="button"><?php esc_html_e( 'Cancel Changes', 'wordcamporg' ); ?></a>
     126            <?php submit_button( esc_html__( 'Reset to Approved Budget', 'wordcamporg' ), 'secondary', 'wcb-budget-reset', false ); ?>
    127127        </p>
    128128        <?php endif; ?>
     
    137137        </tr>
    138138        <tr>
    139             <td>Income</td>
     139            <td><?php esc_html_e( 'Income', 'wordcamporg' ); ?></td>
    140140            <td class="amount">{{data.income}}</td>
    141141        </tr>
    142142        <tr>
    143             <td>Expenses</td>
     143            <td><?php esc_html_e( 'Expenses', 'wordcamporg' ); ?></td>
    144144            <td class="amount">{{data.expenses}}</td>
    145145        </tr>
    146146        <tr>
    147             <td>Variance</td>
     147            <td><?php esc_html_e( 'Variance', 'wordcamporg' ); ?></td>
    148148            <td class="amount <# if (data.variance_raw < 0) { #>wcb-negative<# } #>">{{data.variance}}</td>
    149149        </tr>
    150150        <tr>
    151             <td>Cost Per Person Per Day</td>
     151            <td><?php esc_html_e( 'Cost Per Person Per Day', 'wordcamporg' ); ?></td>
    152152            <td class="amount">{{data.per_person}}</td>
    153153        </tr>
     
    164164            <td class="amount">
    165165                <# if (data.variance_raw < 0) { #>
    166                 <a href="#" target="_blank" class="inspire">inspire me</a>
     166                <a href="#" target="_blank" class="inspire"><?php esc_html_e( 'inspire me', 'wordcamporg' ); ?></a>
    167167                <# } #>
    168168            </td>
     
    210210            <# } else { #>
    211211            <td style="width: 20%">
    212                 Income
     212                <?php esc_html_e( 'Income', 'wordcamporg' ); ?>
    213213                <input type="hidden" class="category" value="{{data.category}}" />
    214214            </td>
     
    219219                {{wcb.categories[data.category]}}
    220220            <# } else { #>
    221                 Income
     221                <?php esc_html_e( 'Income', 'wordcamporg' ); ?>
    222222            <# } #>
    223223            </td>
     
    275275        <td style="width: 15%" class="actions">
    276276            <# if (wcb.editable) { #>
    277             <a href="#" class="move">Move</a>
    278             <a href="#" class="delete">Delete</a>
     277            <a href="#" class="move"><?php esc_html_e( 'Move', 'wordcamporg' ); ?></a>
     278            <a href="#" class="delete"><?php esc_html_e( 'Delete', 'wordcamporg' ); ?></a>
    279279            <# } #>
    280280        </td>
Note: See TracChangeset for help on using the changeset viewer.