Making WordPress.org

Changeset 2186


Ignore:
Timestamp:
12/12/2015 12:12:06 AM (9 years ago)
Author:
iandunn
Message:

WordCamp Coming Soon Page: Internationalize all strings.

Fixes #1441
Props zodiac1978

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php

    r382 r2186  
    7373        add_submenu_page(
    7474            'options-general.php',
    75             'Coming Soon',
    76             'Coming Soon',
     75            __( 'Coming Soon', 'wordcamporg' ),
     76            __( 'Coming Soon', 'wordcamporg' ),
    7777            self::REQUIRED_CAPABILITY,
    7878            'wccsp_settings',
     
    8888            require_once( dirname( __DIR__ ) . '/views/settings-screen.php' );
    8989        } else {
    90             wp_die( 'Access denied.' );
     90            wp_die( __( 'Access denied.', 'wordcamporg' ) );
    9191        }
    9292    }
     
    106106        add_settings_field(
    107107            'wccsp_enabled',
    108             'Enabled',
     108            __( 'Enabled', 'wordcamporg' ),
    109109            array( $this, 'markup_fields' ),
    110110            'wccsp_settings',
     
    115115        add_settings_field(
    116116            'wccsp_body_background_color',
    117             'Body Background Color',
     117            __( 'Body Background Color', 'wordcamporg' ),
    118118            array( $this, 'markup_fields' ),
    119119            'wccsp_settings',
     
    124124        add_settings_field(
    125125            'wccsp_container_background_color',
    126             'Container Background Color',
     126            __( 'Container Background Color', 'wordcamporg' ),
    127127            array( $this, 'markup_fields' ),
    128128            'wccsp_settings',
     
    133133        add_settings_field(
    134134            'wccsp_text_color',
    135             'Text Color',
     135            __( 'Text Color', 'wordcamporg' ),
    136136            array( $this, 'markup_fields' ),
    137137            'wccsp_settings',
     
    142142        add_settings_field(
    143143            'wccsp_image_id',
    144             'Image',
     144            __( 'Image', 'wordcamporg' ),
    145145            array( $this, 'markup_fields' ),
    146146            'wccsp_settings',
     
    226226        $inactive_required_modules = array();
    227227        $required_modules          = array(
    228             'subscriptions' => 'Subscriptions',
    229             'contact-form'  => 'Contact Form',
     228            'subscriptions' => __( 'Subscriptions', 'wordcamporg' ),
     229            'contact-form'  => __( 'Contact Form',  'wordcamporg' ),
    230230        );
    231231       
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php

    r1672 r2186  
    164164        if ( isset( $wordcamp_post->ID ) ) {
    165165            if ( ! empty( $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] ) ) {
    166                 $dates = date( 'l, F jS Y', $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] );
     166                // translators: date format, see https://php.net/date
     167                $dates = date_i18n( __( 'l, F jS Y' , 'wordcamporg' ), $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] );
    167168
    168169                if ( ! empty( $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] ) ) {
    169170                    if ( $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] !== $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] ) {
    170                         $dates .= ' - ' . date( 'l, F jS Y', $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] );
     171                        // translators: date format, see https://php.net/date
     172                        $dates .= ' - ' . date_i18n( __( 'l, F jS Y' , 'wordcamporg' ), $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] );
    171173                    }
    172174                }
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-admin-notices.php

    r381 r2186  
    22    <ul>
    33        <?php foreach ( $inactive_required_modules as $module ) : ?>
    4             <li>Please activate Jetpack's <?php echo esc_html( $module ); ?> module.</li>
     4            <li>
     5                <?php // translators: %s is the name of the jetpack module ?>
     6                <?php printf( __( "Please activate Jetpack's %s module.", 'wordcamporg' ), esc_html( $module ) ); ?>
     7            </li>
    58        <?php endforeach; ?>
    69    </ul>
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-fields.php

    r384 r2186  
    11<?php if ( 'wccsp_enabled_true' == $field['label_for'] ) : ?>
    22    <input id="wccsp_enabled_true" name="wccsp_settings[enabled]" type="radio" value="on" <?php checked( $this->settings['enabled'], 'on' ); ?> />
    3     <span class="example"> On</span><br />
     3    <span class="example">
     4        <?php // translators: If Coming Soon plugin is enabled ?>
     5        <?php _e( 'On', 'wordcamporg' ); ?>
     6    </span><br />
    47   
    58    <input id="wccsp_enabled_false" name="wccsp_settings[enabled]" type="radio" value="off" <?php checked( $this->settings['enabled'], 'off' ); ?> />
    6     <span class="example"> Off</span>
     9    <span class="example">
     10        <?php // translators: If Coming Soon plugin is disabled ?>
     11        <?php _e( 'Off', 'wordcamporg' ); ?>
     12    </span>
    713<?php endif; ?>
    814
     
    2632    <p>
    2733        <input type="hidden" id="wccsp_image_id" name="wccsp_settings[image_id]" value="<?php echo esc_attr( $this->settings['image_id'] ); ?>" />
    28         <a href="javascript:;" id="wccsp-select-image" class="button insert-media add_media" title="Select Image">Select Image</a>
     34        <a href="javascript:;" id="wccsp-select-image" class="button insert-media add_media" title="<?php _e( 'Select Image', 'wordcamporg' ); ?>">
     35            <?php _e( 'Select Image', 'wordcamporg' ); ?>
     36        </a>
    2937    </p>
    3038   
    3139    <?php if( $image ) : ?>
    3240        <p id="wccsp_image_preview">
    33             Current image preview:<br />
    34             <img src="<?php echo esc_attr( $image[0] ); ?>" alt="Image Preview" />
     41            <?php _e( 'Current image preview:', 'wordcamporg' ); ?><br />
     42            <img src="<?php echo esc_attr( $image[0] ); ?>" alt="<?php _e( 'Image Preview', 'wordcamporg' ); ?>" />
    3543        </p>
    3644    <?php endif; ?>
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-screen.php

    r1815 r2186  
    11<div class="wrap">
    22    <div id="icon-options-general" class="icon32"><br /></div>
    3     <h1>Coming Soon</h1>
     3    <h1><?php _e( 'Coming Soon', 'wordcamporg' ); ?></h1>
    44
    55    <form method="post" action="options.php">
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-section-headers.php

    r389 r2186  
    1 <p>When enabled, the Coming Soon page will be displayed to logged-out users, giving you a chance to setup all of your content before your site is visible to the world. To preview the page, just open your site in an Incognito/Private tab, or log out of your account.</p>
     1<p>
     2    <?php _e(
     3        'When enabled, the Coming Soon page will be displayed to logged-out users, giving you a chance to setup
     4         all of your content before your site is visible to the world. To preview the page, just open your site in
     5         an Incognito/Private tab, or log out of your account.',
     6        'wordcamporg'
     7    ); ?>
     8</p>
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/template-coming-soon.php

    r491 r2186  
    2424       
    2525        <p id="wccsp-introduction">
    26             <?php echo esc_attr( get_bloginfo( 'name' ) ); ?> is in the early planning stages. In the meantime, you can subscribe to be notified when the site goes live, or contact the organizers to get involved.
     26            <?php printf(
     27                // translators: %s is the name of the blog
     28                __( '%s is in the early planning stages. In the meantime, you can subscribe to be notified when the site goes live, or contact the organizers to get involved.', 'wordcamporg' ),
     29                esc_html( get_bloginfo( 'name' ) )
     30            ); ?>
    2731        </p>
    2832
     
    3539        <?php if ( in_array( 'contact-form', $active_modules ) && $contact_form_shortcode ) : ?>
    3640            <div class="wccsp-box">
    37                 <h2>Contact the Organizers</h2>
     41                <h2><?php _e( 'Contact the Organizers' , 'wordcamporg' ); ?></h2>
    3842               
    3943                <?php echo $contact_form_shortcode; // intentionally not escaping because it's the output of do_shortcode() ?>
Note: See TracChangeset for help on using the changeset viewer.