WordPress.org

Make WordPress Core

Ticket #7195: i18n-fixes-26.diff

File i18n-fixes-26.diff, 8.7 KB (added by nbachiyski, 10 years ago)
  • wp-settings.php

     
    9797        $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
    9898
    9999if ( version_compare( '4.3', phpversion(), '>' ) ) {
    100         die( /*WP_I18N_OLD_PHP*/'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/ );
     100        die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, php_version() ) );
    101101}
    102102
    103103if ( !defined('WP_CONTENT_DIR') )
  • wp-admin/index.php

     
    9191        $tags_text = "<a href='edit-tags.php'>$tags_text</a>";
    9292}
    9393
    94 $total_comments = sprintf( __( '%1$s total' ), number_format_i18n($num_comm['total_comments']) );
    95 $approved_comments = sprintf( __( '%1$s approved' ), number_format_i18n($num_comm['approved']) );
    96 $spam_comments = sprintf( __( '%1$s spam' ), number_format_i18n($num_comm['spam']) );
    97 $moderated_comments = sprintf( __( '%1$s awaiting moderation' ), number_format_i18n($num_comm['awaiting_moderation']) );
     94$total_comments = sprintf( __ngettext( '%1$s total', '%1$s total', $num_comm['total_comments'] ), number_format_i18n($num_comm['total_comments']) );
     95$approved_comments = sprintf( __ngettext( '%1$s approved', '%1$s approved', $num_comm['approved'] ), number_format_i18n($num_comm['approved']) );
     96$spam_comments = sprintf( __ngettext( '%1$s spam', '%1$s spam', $num_comm['spam'] ), number_format_i18n($num_comm['spam']) );
     97$moderated_comments = sprintf( __ngettext( '%1$s awaiting moderation', '%1$s awaiting moderation', $num_comm['awaiting_moderation'] ), number_format_i18n($num_comm['awaiting_moderation']) );
    9898
    9999if( current_user_can( 'moderate_comments' ) ) {
    100100        $total_comments = "<a href='edit-comments.php'>{$total_comments}</a>";
     
    102102        $moderated_comments = "<a href='edit-comments.php?comment_status=moderated'>{$moderated_comments}</a>";
    103103}
    104104
    105 $comm_text = sprintf( __( 'You have %1$s comments, %2$s, %3$s and %4$s.' ), $total_comments, $approved_comments, $spam_comments, $moderated_comments );
     105$comm_text = sprintf( __ngettext( 'You have %1$s comment, %2$s, %3$s and %4$s.', 'You have %1$s comments, %2$s, %3$s and %4$s.', $num_comm['total_comments'] ), $total_comments, $approved_comments, $spam_comments, $moderated_comments );
    106106
    107107$post_type_text = implode(', ', $post_type_texts);
    108108
  • wp-admin/admin-header.php

     
    8787        <a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a></p>
    8888        <p><?php _e('After you install and enable Gears most of WordPress&#8217; images, scripts, and CSS files will be stored locally on your computer. This speeds up page load time.'); ?></p>
    8989        <p><strong><?php _e('Don&#8217;t install on a public or shared computer.'); ?></strong></p>     <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&amp;return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button>
    90         <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';">Cancel</button></div>
     90        <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div>
    9191        </div>
    9292
    9393        <div id="gears-msg2" style="display:none;">
     
    9696        <p><?php _e('To enable it, make sure this web site is not on the denied list in Gears Settings under your browser\'s Tools menu, then click the button below.'); ?></p>
    9797        <p><strong><?php _e('However if this is a public or shared computer, Gears should not be enabled.'); ?></strong></p>
    9898        <div class="submit"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button>
    99         <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';">Cancel</button></div>
     99        <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div>
    100100        </div>
    101101
    102102        <div id="gears-msg3" style="display:none;">
  • wp-admin/press-this.php

     
    9090        </head>
    9191        <body class="press-this">
    9292               
    93                 <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&amp;post=<?php echo $post_ID; ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();">Close Window</a></p></div>
     93                <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&amp;post=<?php echo $post_ID; ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div>
    9494               
    9595                <div id="footer">
    9696                <p><?php
     
    137137        </div>
    138138               
    139139        <p><input type="hidden" name="this_photo" value="<?php echo $image; ?>" id="this_photo" />
    140                 <a href="#" class="select"><img src="<?php echo $image; ?>" width="475" alt="Click to insert." title="Click to insert." /></a></p>
     140                <a href="#" class="select"><img src="<?php echo $image; ?>" width="475" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p>
    141141       
    142         <p id="options"><a href="#" class="select">Insert Image</a> | <a href="#" class="cancel">Cancel</a></p>
     142        <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p>
    143143<?php die;
    144144}
    145145
     
    164164                <input id="this_photo_description" name="photo_description" class="text" onkeypress="if(event.keyCode==13) image_selector();" value="<?php echo attribute_escape($title);?>"/>
    165165        </div>
    166166       
    167         <p id="options"><a href="#" class="select">Insert Image</a> | <a href="#" class="cancel">Cancel</a></p>
     167        <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p>
    168168<?php die;
    169169}
    170170
     
    437437                                        set_editor("<?php echo $selection; ?>");
    438438                                <?php } ?>
    439439                                jQuery('#extra_fields').show();
    440                                 jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /> Loading...</h2>');
     440                                jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /><?php echo js_escape( __( 'Loading...' ) ); ?></h2>');
    441441                                jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u='.attribute_escape($url); ?>');
    442442                                jQuery.ajax({
    443443                                        type: "GET",
     
    518518                        <p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
    519519                        <div id="tagchecklist"></div>
    520520                </div>
    521                 <label for="post_status" id="post_status"><input type="radio" name="post_status" value="publish" checked="checked" id="published" /><?php _e('Published'); ?> <input type="radio" name="post_status" value="draft" id="unpublished" /> <?php _e('Unpublished'); ?></label>
     521                <div id="post_status">
     522                        <input type="radio" name="post_status" value="publish" checked="checked" id="published" /> <label for="published"><?php _e('Published'); ?></label>
     523                        <input type="radio" name="post_status" value="draft" id="unpublished" /> <label for="unpublished"><?php _e('Unpublished'); ?></label>
     524                </div>
    522525                <p class="submit">         
    523526                        <input type="submit" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/>
    524527                        <img src="images/loading-publish.gif" alt="" id="photo_saving" style="display:none;"/>
     
    526529        </div>
    527530</form>
    528531</body>
    529 </html>
    530  No newline at end of file
     532</html>