WordPress.org

Making WordPress.org

Ticket #2235: 2235.diff

File 2235.diff, 3.4 KB (added by Thomas Vitale, 4 years ago)

Added translation functions for most of the hard-coded string, corrected a translation functions in order to add html escaping and corrected a couple of code standards errors.

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

    diff --git a/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-general.php b/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-general.php
    index 0a8ab61..c58c64e 100644
    a b  
    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, __( 'Description', 'wordcamporg' ), 'description' );
     4                $this->render_text_input( $post, __( 'Invoice Number', 'wordcamporg' ), 'invoice_number' );
     5                $this->render_text_input( $post, __( 'Invoice date', 'wordcamporg' ), 'invoice_date', '', 'date' );
     6                $this->render_text_input( $post, __( 'Requested date for payment/due by', 'wordcamporg' ), 'due_by', '', 'date' );
     7                $this->render_text_input( $post, __( 'Amount', 'wordcamporg' ), 'payment_amount', __( 'No commas, thousands separators or currency symbols. Ex. 1234.56', 'wordcamporg' ) );
     8                $this->render_select_input( $post, __( 'Currency', 'wordcamporg' ), 'currency' );
     9                $this->render_select_input( $post, __( 'Category', 'wordcamporg' ), 'payment_category' );
    1010        ?>
    1111
    1212        <?php
    1313                $this->render_text_input(
    1414                        $post,
    15                         'Other Category',
     15                        __( 'Other Category', 'wordcamporg' ),
    1616                        'other_category_explanation',
    1717                        __( 'Please describe what category this request fits under.', 'wordcamporg' ),
    1818                        'text',
    19                         isset( $assigned_category->name ) && 'Other' == $assigned_category->name ? array() : array( 'hidden')    // todo i18n, see notes in insert_default_terms()
     19                        isset( $assigned_category->name ) && 'Other' == $assigned_category->name ? array() : array( 'hidden' ) // todo i18n, see notes in insert_default_terms().
    2020                );
    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( $post, __( 'Files', 'wordcamporg' ), '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', 'wordcamporg' ), 'general_notes', __( 'Any other details you want to share.', 'wordcamporg' ), false ); ?>
    2525</table>
    2626
    2727<p class="wcb-form-required">
    28         <?php _e( '* required', 'wordcamporg' ); ?>
     28        <?php esc_html_e( '* required', 'wordcamporg' ); ?>
    2929</p>