Making WordPress.org


Ignore:
Timestamp:
09/29/2016 06:37:42 PM (8 years ago)
Author:
iandunn
Message:

WordCamp Fonts: Internationalize strings

Fixes #1902
Props claudiosanches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-fonts/wc-fonts.php

    r4169 r4170  
    8181        add_settings_field(
    8282            'dashicons',
    83             __( 'Dashicons', 'wordcamporg' ),
     83            esc_html__( 'Dashicons', 'wordcamporg' ),
    8484            array( $this, 'field_dashicons' ),
    8585            'wc-fonts-options',
     
    9292     */
    9393    function admin_menu() {
    94         $fonts = add_theme_page( 'Fonts', 'Fonts', 'edit_theme_options', 'wc-fonts-options', array( $this, 'render_admin_page' ) );
     94        $fonts = add_theme_page(
     95            esc_html__( 'Fonts', 'wordcamporg' ),
     96            esc_html__( 'Fonts', 'wordcamporg' ),
     97            'edit_theme_options',
     98            'wc-fonts-options',
     99            array( $this, 'render_admin_page' )
     100        );
    95101    }
    96102
     
    102108        <div class="wrap">
    103109            <?php screen_icon(); ?>
    104             <h1>Fonts</h1>
     110            <h1><?php esc_html_e( 'Fonts', 'wordcamporg' ); ?></h1>
    105111            <?php settings_errors(); ?>
    106112            <form method="post" action="options.php" enctype="multipart/form-data">
     
    121127        $value = isset( $this->options['typekit-id'] ) ? $this->options['typekit-id'] : '';
    122128        ?>
     129
    123130        <input type="text" name="wc-fonts-options[typekit-id]" value="<?php echo esc_attr( $value ); ?>" class="regular-text code" />
    124         <p class="description">Enter your Typekit Kit ID. No links, no javascript, just the id, we'll handle the rest for you.</p>
     131        <p class="description">
     132            <?php esc_html_e( "Enter your Typekit Kit ID only. Do not add any URLs or JavaScript.", 'wordcamporg' ); ?>
     133        </p>
     134
    125135        <?php
    126136    }
     
    132142        $value = isset( $this->options['google-web-fonts'] ) ? $this->options['google-web-fonts'] : '';
    133143        ?>
    134         <textarea rows="5" name="wc-fonts-options[google-web-fonts]" class="large-text code"><?php echo esc_textarea( $value ); ?></textarea>
    135         <p class="description">Paste the Google Web Fonts @import URLs in this area, each one on a separate line.</p>
     144
     145        <textarea rows="5" name="wc-fonts-options[google-web-fonts]" class="large-text code"><?php
     146            echo esc_textarea( $value );
     147        ?></textarea>
     148
     149        <p class="description">
     150            <?php esc_html_e( 'Paste the Google Web Fonts @import URLs in this area, each one on a separate line.', 'wordcamporg' ); ?>
     151        </p>
     152
    136153        <?php
    137154    }
     
    145162
    146163        <input type="text" name="wc-fonts-options[font-awesome-url]" value="<?php echo esc_url( $value ); ?>" class="large-text code" />
    147         <p class="description">Enter the BootstrapCDN URL for the version you want.</p>
     164        <p class="description">
     165            <?php esc_html_e( 'Enter the BootstrapCDN URL for the version you want.', 'wordcamporg' ); ?>
     166        </p>
    148167
    149168        <?php
     
    159178        <label>
    160179            <input type="checkbox" name="wc-fonts-options[dashicons]" <?php checked( $value ); ?> />
    161             <?php _e( 'Enqueue Dashicons', 'wordcamporg' ); ?>
     180            <?php esc_html_e( 'Enqueue Dashicons', 'wordcamporg' ); ?>
    162181        </label>
    163182
Note: See TracChangeset for help on using the changeset viewer.