I18N: Remove <code> and <kbd> tags from translatable strings on Settings screens.

Move URLs to separate strings.

Props ramiy.
Fixes #40763.
Built from https://develop.svn.wordpress.org/trunk@41986


git-svn-id: http://core.svn.wordpress.org/trunk@41820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-10-24 10:51:52 +00:00
parent 9093718b15
commit ffddfb573b
4 changed files with 76 additions and 13 deletions

View File

@ -79,8 +79,15 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th>
<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
<?php if ( ! defined( 'WP_HOME' ) ) : ?>
<p class="description" id="home-description"><?php _e( 'Enter the address here if you <a href="https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">want your site home page to be different from your WordPress installation directory</a>.' ); ?></p></td>
<p class="description" id="home-description"><?php
printf(
/* translators: %s: Codex URL */
__( 'Enter the address here if you <a href="%s">want your site home page to be different from your WordPress installation directory</a>.' ),
__( 'https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory' )
);
?></p>
<?php endif; ?>
</td>
</tr>
<?php } ?>

View File

@ -156,7 +156,13 @@ require( ABSPATH . 'wp-admin/admin-header.php' );
<form name="form" action="options-permalink.php" method="post">
<?php wp_nonce_field('update-permalink') ?>
<p><?php _e( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="https://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.' ); ?></p>
<p><?php
printf(
/* translators: %s: Codex URL */
__( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="%s">number of tags are available</a>, and here are some examples to get you started.' ),
__( 'https://codex.wordpress.org/Using_Permalinks' )
);
?></p>
<?php
if ( is_multisite() && ! is_subdomain_install() && is_main_site() && 0 === strpos( $permalink_structure, '/blog/' ) ) {
@ -273,7 +279,7 @@ $structures = array(
<h2 class="title"><?php _e('Optional'); ?></h2>
<p><?php
/* translators: %s is a placeholder that must come at the start of the URL. */
/* translators: %s: placeholder that must come at the start of the URL */
printf( __( 'If you like, you may enter custom structures for your category and tag URLs here. For example, using <code>topics</code> as your category base would make your category links like <code>%s/topics/uncategorized/</code>. If you leave these blank the defaults will be used.' ), get_option( 'home' ) . $blog_prefix . $prefix ); ?></p>
<table class="form-table">
@ -296,26 +302,63 @@ printf( __( 'If you like, you may enter custom structures for your category and
<?php if ( $iis7_permalinks ) :
if ( isset($_POST['submit']) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
if ( file_exists($home_path . 'web.config') ) : ?>
<p><?php _e('If your <code>web.config</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code> element in <code>web.config</code> file.') ?></p>
<p><?php
printf(
/* translators: 1: web.config, 2: Codex URL, 3: CTRL + a, 4: element code */
__( 'If your %1$s file was <a href="%2$s">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your %1$s file. Click in the field and press %3$s to select all. Then insert this rule inside of the %4$s element in %1$s file.' ),
'<code>web.config</code>',
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
'<kbd>CTRL + a</kbd>',
'<code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code>'
);
?></p>
<form action="options-permalink.php" method="post">
<?php wp_nonce_field('update-permalink') ?>
<p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p>
</form>
<p><?php _e('If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?></p>
<p><?php
printf(
/* translators: %s: web.config */
__( 'If you temporarily make your %s file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.' ),
'<code>web.config</code>'
);
?></p>
<?php else : ?>
<p><?php _e('If the root directory of your site were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Create a new file, called <code>web.config</code> in the root directory of your site. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this code into the <code>web.config</code> file.') ?></p>
<p><?php
printf(
/* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
__( 'If the root directory of your site was <a href="%1$s">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your %2$s file. Create a new file, called %2$s in the root directory of your site. Click in the field and press %3$s to select all. Then insert this code into the %2$s file.' ),
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
'<code>web.config</code>',
'<kbd>CTRL + a</kbd>'
);
?></p>
<form action="options-permalink.php" method="post">
<?php wp_nonce_field('update-permalink') ?>
<p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules(true) ); ?></textarea></p>
</form>
<p><?php _e('If you temporarily make your site&#8217;s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') ?></p>
<p><?php
printf(
/* translators: %s: web.config */
__( 'If you temporarily make your site&#8217;s root directory writable for us to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ),
'<code>web.config</code>'
);
?></p>
<?php endif; ?>
<?php endif; ?>
<?php elseif ( $is_nginx ) : ?>
<p><?php _e( '<a href="https://codex.wordpress.org/Nginx">Documentation on Nginx configuration</a>.' ); ?></p>
<?php else:
if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) : ?>
<p><?php _e('If your <code>.htaccess</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
<p><?php
printf(
/* translators: 1: .htaccess, 2: Codex URL, 3: CTRL + a */
__( 'If your %1$s file was <a href="%2$s">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s to select all.' ),
'<code>.htaccess</code>',
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
'<kbd>CTRL + a</kbd>'
);
?></p>
<form action="options-permalink.php" method="post">
<?php wp_nonce_field('update-permalink') ?>
<p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p>

View File

@ -168,16 +168,29 @@ if ( apply_filters( 'enable_update_services_configuration', true ) ) {
<?php if ( 1 == get_option('blog_public') ) : ?>
<p><label for="ping_sites"><?php _e( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="https://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ) ?></label></p>
<p><label for="ping_sites"><?php
printf(
/* translators: %s: Codex URL */
__( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="%s">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ),
__( 'https://codex.wordpress.org/Update_Services' )
);
?></label></p>
<textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
<textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
<?php else : ?>
<p><?php printf(__('WordPress is not notifying any <a href="https://codex.wordpress.org/Update_Services">Update Services</a> because of your site&#8217;s <a href="%s">visibility settings</a>.'), 'options-reading.php'); ?></p>
<p><?php
printf(
/* translators: 1: Codex URL, 2: Reading Settings URL */
__( 'WordPress is not notifying any <a href="%1$s">Update Services</a> because of your site&#8217;s <a href="%2$s">visibility settings</a>.' ),
__( 'https://codex.wordpress.org/Update_Services' ),
'options-reading.php'
);
?></p>
<?php endif; ?>
<?php } // multisite ?>
<?php } // enable_update_services_configuration ?>
<?php do_settings_sections('writing'); ?>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta3-41985';
$wp_version = '4.9-beta3-41986';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.