<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12813] trunk/wp-admin/options-network.php: gettext for options-network.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12813">12813</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-23 19:06:15 +0000 (Sat, 23 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>gettext for options-network. Props nacin. see <a href="http://trac.wordpress.org/ticket/11644">#11644</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminoptionsnetworkphp">trunk/wp-admin/options-network.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminoptionsnetworkphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-network.php (12812 => 12813)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-network.php        2010-01-23 18:27:26 UTC (rev 12812)
+++ trunk/wp-admin/options-network.php        2010-01-23 19:06:15 UTC (rev 12813)
</span><span class="lines">@@ -34,33 +34,35 @@
</span><span class="cx"> <form method="post" action="options-network.php">
</span><span class="cx"> <?php
</span><span class="cx"> function filestats( $err ) {
</span><del>-        print '<h2>' . esc_html__('Server Summary') . '</h2>';
-        print '<p>' . __("If you post a message to the WordPress support forum at <a target='_blank' href='http://wordpress.org/support/'>http://wordpress.org/support/</a> then copy and paste the following information into your message:") . '</p>';
-
-        print "<blockquote style='background: #eee; border: 1px solid #333; padding: 5px;'>";
-        print "<br /><strong>ERROR: $err</strong><br />";
</del><ins>+?>
+        <h2><?php esc_html_e('Server Summary'); ?></h2>
+        <p><?php _e('If you post a message to the WordPress support forum at <a target="_blank" href="http://wordpress.org/support/">http://wordpress.org/support/</a> then copy and paste the following information into your message:'); ?></p>
+        <blockquote style="background: #eee; border: 1px solid #333; padding: 5px;">
+        <br /><strong><?php echo __('ERROR:') . " $err"; ?></strong><br />
+<?php
</ins><span class="cx">         clearstatcache();
</span><span class="cx">         $files = array( "htaccess.dist", ".htaccess" );
</span><span class="cx">         
</span><ins>+        $indent = '&nbsp;&nbsp;&nbsp;&nbsp;';
</ins><span class="cx">         foreach ( (array) $files as $val ) {
</span><span class="cx">                 $stats = @stat( $val );
</span><span class="cx">                 if( $stats ) {
</span><del>-                        print "<h2>$val</h2>";
-                        print "&nbsp;&nbsp;&nbsp;&nbsp;uid/gid: " . $stats[ 'uid' ] . "/" . $stats[ 'gid' ] . "<br />\n";
-                        print "&nbsp;&nbsp;&nbsp;&nbsp;size: " . $stats[ 'size' ] . "<br />";
-                        print "&nbsp;&nbsp;&nbsp;&nbsp;perms: " . substr( sprintf('%o', fileperms( $val ) ), -4 ) . "<br />";
-                        print "&nbsp;&nbsp;&nbsp;&nbsp;readable: ";
-                        print is_readable( $val ) == true ? "yes" : "no";
-                        print "<br />";
-                        print "&nbsp;&nbsp;&nbsp;&nbsp;writeable: ";
-                        print is_writeable( $val ) == true ? "yes" : "no";
-                        print "<br />";
-                } elseif( file_exists( $val ) == false ) {
-                        print "<h2>$val</h2>";
-                        print "&nbsp;&nbsp;&nbsp;&nbsp;FILE NOT FOUND: $val<br />";
</del><ins>+?>
+                        <h2><?php echo esc_html( $val ); ?></h2>
+                        <?php echo $indent . sprintf( __('uid/gid: %1$s/%2$s'), $stats[ 'uid' ], $stats[ 'gid' ] ); ?><br />
+                        <?php echo $indent . sprintf( __('size: %s'), $stats['size'] ); ?><br/>
+                        <?php echo $indent . sprintf( __('perms: %s'), substr( sprintf('%o', fileperms( $val ) ), -4 ) ); ?><br/>
+                        <?php echo $indent . sprintf( __('readable: %s'), is_readable( $val ) ? __('yes') : __('no') ); ?><br/>
+                        <?php echo $indent . sprintf( __('writeable: %s'), is_writeable( $val ) ? __('yes') : __('no') ); ?><br/>
+<?php
+                } elseif( ! file_exists( $val ) ) {
+?>
+                        <h2><?php echo esc_html( $val ); ?></h2>
+                        <?php echo $indent . sprintf( __('FILE NOT FOUND: %s'), $val ); ?><br/>
+<?php
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        print "</blockquote>";
</del><ins>+        echo "</blockquote>";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function step2_htaccess() {
</span><span class="lines">@@ -73,7 +75,7 @@
</span><span class="cx">         }
</span><span class="cx">         $htaccess_sample = ABSPATH . 'wp-admin/includes/htaccess.ms';
</span><span class="cx">         if ( !file_exists( $htaccess_sample ) )
</span><del>-                wp_die("Sorry, I need a {$htaccess_sample} to work from. Please re-upload this file to your WordPress installation.");
</del><ins>+                wp_die( sprintf( __('Sorry, I need a %s to work from. Please re-upload this file to your WordPress installation.'), $htaccess_sample ) );
</ins><span class="cx">
</span><span class="cx">         $htaccess_file = file( $htaccess_sample );
</span><span class="cx">         $fp = @fopen( $htaccess_sample, "r" );
</span><span class="lines">@@ -84,12 +86,12 @@
</span><span class="cx">                 fclose( $fp );
</span><span class="cx">                 $htaccess_file = str_replace( "BASE", $base, $htaccess );
</span><span class="cx">         } else {
</span><del>-                wp_die("Sorry, I need to be able to read {$htaccess_sample}. Please check the permissions on this file.");
</del><ins>+                wp_die( sprintf( __('Sorry, I need to be able to read %s. Please check the permissions on this file.'), $htaccess_sample ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         //@todo: check for super-cache in use
</span><span class="cx"> ?>
</span><del>-                        <li><p>Replace the contents of your <code>.htaccess</code> with the following:</p>
</del><ins>+                        <li><p><?php _e('Replace the contents of your <code>.htaccess</code> with the following:'); ?></p>
</ins><span class="cx">                                 <textarea name="htaccess" cols="120" rows="20">
</span><span class="cx"> <?php echo $htaccess_file; ?>
</span><span class="cx">                                 </textarea>
</span><span class="lines">@@ -105,29 +107,27 @@
</span><span class="cx">         
</span><span class="cx">         <h2><?php esc_html_e('What do I need?'); ?></h2>
</span><span class="cx">         <ul>
</span><del>-                <li>Access to your server to change directory permissions. This can be done through ssh or ftp for example.</li>
-                <li>A valid email where your password and administrative emails will be sent.</li>
-                <li> Wildcard dns records if you're going to use the virtual host (sub-domain) functionality. Check the <a href='http://trac.mu.wordpress.org/browser/trunk/README.txt'>README</a> for further details.</li>
</del><ins>+                <li><?php _e( 'Access to your server to change directory permissions. This can be done through ssh or ftp for example.' ); ?></li>
+                <li><?php _e( 'A valid email where your password and administrative emails will be sent.' ); ?></li>
+                <li><?php _e( "Wildcard dns records if you're going to use the virtual host (sub-domain) functionality. Check the <a href='http://trac.mu.wordpress.org/browser/trunk/README.txt'>README</a> for further details."); ?></li>
</ins><span class="cx">         </ul>
</span><span class="cx">         <?php
</span><del>-        $mod_rewrite_msg = "<p>If the <code>mod_rewrite</code> module is disabled ask your administrator to enable that module, or look at the <a href='http://httpd.apache.org/docs/mod/mod_rewrite.html'>Apache documentation</a> or <a href='http://www.google.com/search?q=apache+mod_rewrite'>elsewhere</a> for help setting it up.</p>";
</del><ins>+        $mod_rewrite_msg = "\n<p>" . __( "If the <code>mod_rewrite</code> module is disabled ask your administrator to enable that module, or look at the <a href='http://httpd.apache.org/docs/mod/mod_rewrite.html'>Apache documentation</a> or <a href='http://www.google.com/search?q=apache+mod_rewrite'>elsewhere</a> for help setting it up." ) . '</p>';
</ins><span class="cx">         
</span><del>-        if( function_exists( "apache_get_modules" ) ) {
</del><ins>+        if ( function_exists( 'apache_get_modules' ) ) {
</ins><span class="cx">                 $modules = apache_get_modules();
</span><del>-                if( in_array( "mod_rewrite", $modules ) == false ) {
-                        echo "<p><strong>Warning!</strong> It looks like mod_rewrite is not installed.</p>" . $mod_rewrite_msg;
-                } else {
</del><ins>+                if ( ! in_array( 'mod_rewrite', $modules ) )
+                        echo '<p>' . __('<strong>Warning!</strong> It looks like mod_rewrite is not installed.') . '</p>' . $mod_rewrite_msg;
+                else
</ins><span class="cx">                         $rewrite_enabled = true;
</span><del>-                }
</del><span class="cx">         } else {
</span><del>-                ?><p>Please make sure <code>mod_rewrite</code> is installed as it will be activated at the end of this install.</p><?php
-                echo $mod_rewrite_msg;
</del><ins>+                echo '<p>' . __( 'Please make sure <code>mod_rewrite</code> is installed as it will be activated at the end of this install.' ) . '</p>' . $mod_rewrite_msg;
</ins><span class="cx">         }
</span><span class="cx">         return $rewrite_enabled;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function printstep1form( $rewrite_enabled = false ) {
</span><del>-        $weblog_title = ucfirst( get_option( 'blogname' ) ) . ' Sites';
</del><ins>+        $weblog_title = sprintf( __('%s Sites'), ucfirst( get_option( 'blogname' ) ) );
</ins><span class="cx">         $email = get_option( 'admin_email' );
</span><span class="cx">         $hostname = get_clean_basedomain();
</span><span class="cx">         if( substr( $hostname, 0, 4 ) == 'www.' )
</span><span class="lines">@@ -136,58 +136,58 @@
</span><span class="cx">         wp_nonce_field( 'install-network-1' );
</span><span class="cx">         ?>
</span><span class="cx">                 <input type='hidden' name='action' value='step2' />
</span><del>-                <h2>Site Addresses</h2>
-                <p>Please choose whether you would like sites in your WordPress install to use sub-domains or sub-directories. You can not change this later.</p>
</del><ins>+                <h2><?php esc_html_e( 'Site Addresses' ); ?></h2>
+                <p><?php _e( 'Please choose whether you would like sites in your WordPress install to use sub-domains or sub-directories. You cannot change this later.' ); ?></p>
</ins><span class="cx">                 <?php if ( !$rewrite_enabled ) { ?>
</span><del>-                <p><strong>Note</strong> It looks like <code>mod_rewrite</code> is not installed.</p>
</del><ins>+                <p><?php _e( '<strong>Note</strong> It looks like <code>mod_rewrite</code> is not installed.'); ?></p>
</ins><span class="cx">                 <?php } ?>
</span><span class="cx">                 <p class="blog-address">
</span><del>-                        <label><input type='radio' name='vhost' value='yes' <?php if( $rewrite_enabled ) echo 'checked="checked"'; ?> /> Sub-domains (like <code>blog1.example.com</code>)</label><br />
-                        <label><input type='radio' name='vhost' value='no' <?php if( !$rewrite_enabled ) echo 'checked="checked"'; ?> /> Sub-directories (like <code>example.com/blog1</code>)</label>
</del><ins>+                        <label><input type='radio' name='vhost' value='yes'<?php if( $rewrite_enabled ) echo ' checked="checked"'; ?> /> <?php _e( 'Sub-domains (like <code>blog1.example.com</code>)' ); ?></label><br />
+                        <label><input type='radio' name='vhost' value='no'<?php if( !$rewrite_enabled ) echo ' checked="checked"'; ?> /> <?php _e( 'Sub-directories (like <code>example.com/blog1</code>) '); ?></label>
</ins><span class="cx">                 </p>
</span><span class="cx">
</span><del>-                <h2>Server Address</h2>
</del><ins>+                <h2><?php esc_html_e( 'Server Address' ); ?></h2>
</ins><span class="cx">                 <?php if ( isset( $nowww ) ) { ?>
</span><del>-                <h3>We recommend you change your siteurl to <code><?php echo $nowww; ?></code> before enabling the network feature. It will still be possible to visit your site using the "www" prefix with an address like <code><?php echo $hostname; ?></code> but any links will not have the "www" prefix. </h3>
</del><ins>+                <h3><?php printf( __( 'We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the "www" prefix with an address like <code>%2$s</code> but any links will not have the "www" prefix.' ), $nowww, $hostname ); ?></h3>
</ins><span class="cx">                 <?php } ?>
</span><span class="cx">                 <table class="form-table">
</span><span class="cx">                         <tr>
</span><del>-                                <th scope='row'>Server Address</th>
</del><ins>+                                <th scope='row'><?php esc_html_e( 'Server Address' ); ?></th>
</ins><span class="cx">                                 <td>
</span><del>-                                        <p>This will be the Internet address of your site: <strong><em><?php echo $hostname; ?></em></strong>.</p>
-                                        <input type='hidden' name='basedomain' value='<?php echo $hostname ?>' />
-                                        <p>Do not use an IP address (like 127.0.0.1) or a single word hostname like <q>localhost</q> as your server address.</p>
</del><ins>+                                        <p><?php printf( __( 'This will be the Internet address of your site: <strong><em>%s</em></strong>.' ), $hostname ); ?></p>
+                                        <input type='hidden' name='basedomain' value='<?php echo esc_attr( $hostname ); ?>' />
+                                        <p><?php _e( 'Do not use an IP address (like 127.0.0.1) or a single word hostname like <q>localhost</q> as your server address.' ); ?></p>
</ins><span class="cx">                                 </td>
</span><span class="cx">                         </tr>
</span><span class="cx">                 </table>
</span><span class="cx">
</span><del>-                <h2>Site Details</h2>
</del><ins>+                <h2><?php esc_html_e( 'Site Details' ); ?></h2>
</ins><span class="cx">                 <table class="form-table">
</span><span class="cx">                         <tr>
</span><del>-                                <th scope='row'>Site&nbsp;Title</th>
</del><ins>+                                <th scope='row'><?php esc_html_e( 'Site&nbsp;Title' ); ?></th>
</ins><span class="cx">                                 <td>
</span><del>-                                        <input name='weblog_title' type='text' size='45' value='<?php echo $weblog_title ?>' />
-                                        <br />What would you like to call your site?
</del><ins>+                                        <input name='weblog_title' type='text' size='45' value='<?php echo esc_attr( $weblog_title ); ?>' />
+                                        <br /><?php _e( 'What would you like to call your site?' ); ?>
</ins><span class="cx">                                 </td>
</span><span class="cx">                         </tr>
</span><span class="cx">                         <tr>
</span><del>-                                <th scope='row'>Email</th>
</del><ins>+                                <th scope='row'><?php esc_html_e( 'Email' ); ?></th>
</ins><span class="cx">                                 <td>
</span><del>-                                        <input name='email' type='text' size='45' value='<?php echo $email ?>' />
-                                        <br />Your email address.
</del><ins>+                                        <input name='email' type='text' size='45' value='<?php echo esc_attr( $email ); ?>' />
+                                        <br /><?php _e( 'Your email address.' ); ?>
</ins><span class="cx">                                 </td>
</span><span class="cx">                         </tr>
</span><span class="cx">                 </table>
</span><del>-                <p class='submit'><input class="button" name='submit' type='submit' value='Proceed' /></p>
</del><ins>+                <p class='submit'><input class="button" name='submit' type='submit' value='<?php esc_attr_e( 'Proceed' ); ?>' /></p>
</ins><span class="cx">         <?php
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function step2() {
</span><span class="cx"> ?>
</span><del>-                <h2>Enabling WordPress Sites</h2>
-                <p>Complete the following steps to enable the features for creating a network of sites. <strong>Note:</strong> We recommend you make a backup copy of your existing <code>wp-config.php</code> and <code>.htaccess</code> files.</p>
</del><ins>+                <h2><?php esc_html_e( 'Enabling WordPress Sites' ); ?></h2>
+                <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites. <strong>Note:</strong> We recommend you make a backup copy of your existing <code>wp-config.php</code> and <code>.htaccess</code> files.' ); ?></p>
</ins><span class="cx">                 <ol>
</span><del>-                        <li>Create a <code>blogs.dir</code> directory in your <code>wp-content</code> directory. This directory is used to stored uploaded media for your additional sites and must be writeable by the web server.</li>
</del><ins>+                        <li><?php _e( 'Create a <code>blogs.dir</code> directory in your <code>wp-content</code> directory. This directory is used to stored uploaded media for your additional sites and must be writeable by the web server.' ); ?></li>
</ins><span class="cx"> <?php step2_config(); ?>
</span><span class="cx"> <?php step2_htaccess(); ?>
</span><span class="cx">                 </ol>
</span><span class="lines">@@ -202,11 +202,11 @@
</span><span class="cx">
</span><span class="cx">         $config_sample = ABSPATH . 'wp-admin/includes/wp-config.ms';
</span><span class="cx">         if ( !file_exists( $config_sample ) )
</span><del>-                wp_die("Sorry, I need a {$config_sample} to work from. Please re-upload this file to your WordPress installation.");
</del><ins>+                wp_die( sprintf( __( 'Sorry, I need a <code>%s</code> to work from. Please re-upload this file to your WordPress installation.' ), $config_sample ) );
</ins><span class="cx">
</span><span class="cx">         $wp_config_file = file( $config_sample );
</span><span class="cx"> ?>
</span><del>-                        <li><p>Replace the contents of your <code>wp-config.php</code> with the following:</p>
</del><ins>+                        <li><p><?php _e( 'Replace the contents of your <code>wp-config.php</code> with the following:' ); ?></p>
</ins><span class="cx">                                 <textarea name="wp-config" cols="120" rows="20">
</span><span class="cx"> <?php
</span><span class="cx">         foreach ($wp_config_file as $line) {
</span></span></pre>
</div>
</div>
</body>
</html>