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/payment-request/metabox-general.php

    r2700 r4967  
    11<table class="form-table">
    22    <?php
    3         $this->render_textarea_input( $post, 'Description', 'description' );
    4         $this->render_text_input( $post, 'Invoice Number', 'invoice_number' );
    5         $this->render_text_input( $post, 'Invoice date', 'invoice_date', '', 'date' );
    6         $this->render_text_input( $post, 'Requested date for payment/due by', 'due_by', '', 'date' );
    7         $this->render_text_input( $post, 'Amount', 'payment_amount', 'No commas, thousands separators or currency symbols. Ex. 1234.56' );
    8         $this->render_select_input( $post, 'Currency', 'currency' );
    9         $this->render_select_input( $post, 'Category', 'payment_category' );
     3        $this->render_textarea_input( $post, esc_html__( 'Description', 'wordcamporg' ), 'description' );
     4        $this->render_text_input( $post, esc_html__( 'Invoice Number', 'wordcamporg' ), 'invoice_number' );
     5        $this->render_text_input( $post, esc_html__( 'Invoice date', 'wordcamporg' ), 'invoice_date', '', 'date' );
     6        $this->render_text_input( $post, esc_html__( 'Requested date for payment/due by', 'wordcamporg' ), 'due_by', '', 'date' );
     7        $this->render_text_input( $post, esc_html__( 'Amount', 'wordcamporg' ), 'payment_amount', esc_html__( 'No commas, thousands separators or currency symbols. Ex. 1234.56', 'wordcamporg' ) );
     8        $this->render_select_input( $post, esc_html__( 'Currency', 'wordcamporg' ), 'currency' );
     9        $this->render_select_input( $post, esc_html__( 'Category', 'wordcamporg' ), 'payment_category' );
    1010    ?>
    1111
     
    1313        $this->render_text_input(
    1414            $post,
    15             'Other Category',
     15            esc_html__( 'Other Category', 'wordcamporg' ),
    1616            'other_category_explanation',
    17             __( 'Please describe what category this request fits under.', 'wordcamporg' ),
     17            esc_html__( 'Please describe what category this request fits under.', 'wordcamporg' ),
    1818            'text',
    1919            isset( $assigned_category->name ) && 'Other' == $assigned_category->name ? array() : array( 'hidden')    // todo i18n, see notes in insert_default_terms()
     
    2121    ?>
    2222
    23     <?php $this->render_files_input( $post, 'Files', 'files', __( 'Attach supporting documentation including invoices, contracts, or other vendor correspondence. If no supporting documentation is available, please indicate the reason in the notes below.', 'wordcamporg' ) ); ?>
    24     <?php $this->render_textarea_input( $post, 'Notes', 'general_notes', 'Any other details you want to share.', false ); ?>
     23    <?php $this->render_files_input(
     24        $post,
     25        esc_html__( 'Files', 'wordcamporg' ),
     26        'files',
     27        esc_html__( 'Attach supporting documentation including invoices, contracts, or other vendor correspondence. If no supporting documentation is available, please indicate the reason in the notes below.', 'wordcamporg' )
     28    ); ?>
     29
     30    <?php $this->render_textarea_input(
     31        $post,
     32        esc_html__( 'Notes', 'wordcamporg' ),
     33        'general_notes',
     34        esc_html__( 'Any other details you want to share.', 'wordcamporg' ),
     35        false
     36    ); ?>
    2537</table>
    2638
    2739<p class="wcb-form-required">
    28     <?php _e( '* required', 'wordcamporg' ); ?>
     40    <?php esc_html_e( '* required', 'wordcamporg' ); ?>
    2941</p>
Note: See TracChangeset for help on using the changeset viewer.