Make WordPress Core

Changeset 41986


Ignore:
Timestamp:
10/24/2017 10:50:40 AM (7 years ago)
Author:
SergeyBiryukov
Message:

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

Move URLs to separate strings.

Props ramiy.
Fixes #40763.

Location:
trunk/src/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-general.php

    r41874 r41986  
    8080<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' ?>" />
    8181<?php if ( ! defined( 'WP_HOME' ) ) : ?>
    82 <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>
     82<p class="description" id="home-description"><?php
     83    printf(
     84        /* translators: %s: Codex URL */
     85        __( 'Enter the address here if you <a href="%s">want your site home page to be different from your WordPress installation directory</a>.' ),
     86        __( 'https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory' )
     87    );
     88?></p>
    8389<?php endif; ?>
     90</td>
    8491</tr>
    8592
  • trunk/src/wp-admin/options-permalink.php

    r41598 r41986  
    157157<?php wp_nonce_field('update-permalink') ?>
    158158
    159   <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>
     159    <p><?php
     160        printf(
     161            /* translators: %s: Codex URL */
     162            __( '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.' ),
     163            __( 'https://codex.wordpress.org/Using_Permalinks' )
     164        );
     165    ?></p>
    160166
    161167<?php
     
    274280<h2 class="title"><?php _e('Optional'); ?></h2>
    275281<p><?php
    276 /* translators: %s is a placeholder that must come at the start of the URL. */
     282/* translators: %s: placeholder that must come at the start of the URL */
    277283printf( __( '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>
    278284
     
    297303    if ( isset($_POST['submit']) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
    298304        if ( file_exists($home_path . 'web.config') ) : ?>
    299 <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>
     305<p><?php
     306    printf(
     307        /* translators: 1: web.config, 2: Codex URL, 3: CTRL + a, 4: element code */
     308        __( '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.' ),
     309        '<code>web.config</code>',
     310        __( 'https://codex.wordpress.org/Changing_File_Permissions' ),
     311        '<kbd>CTRL + a</kbd>',
     312        '<code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code>'
     313    );
     314?></p>
    300315<form action="options-permalink.php" method="post">
    301316<?php wp_nonce_field('update-permalink') ?>
    302317    <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>
    303318</form>
    304 <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>
     319<p><?php
     320    printf(
     321        /* translators: %s: web.config */
     322        __( '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.' ),
     323        '<code>web.config</code>'
     324    );
     325?></p>
    305326        <?php else : ?>
    306 <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>
     327<p><?php
     328    printf(
     329        /* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
     330        __( '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.' ),
     331        __( 'https://codex.wordpress.org/Changing_File_Permissions' ),
     332        '<code>web.config</code>',
     333        '<kbd>CTRL + a</kbd>'
     334    );
     335?></p>
    307336<form action="options-permalink.php" method="post">
    308337<?php wp_nonce_field('update-permalink') ?>
    309338    <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>
    310339</form>
    311 <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>
     340<p><?php
     341    printf(
     342        /* translators: %s: web.config */
     343        __( '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.' ),
     344        '<code>web.config</code>'
     345    );
     346?></p>
    312347        <?php endif; ?>
    313348    <?php endif; ?>
     
    316351<?php else:
    317352    if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) : ?>
    318 <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>
     353<p><?php
     354    printf(
     355        /* translators: 1: .htaccess, 2: Codex URL, 3: CTRL + a */
     356        __( '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.' ),
     357        '<code>.htaccess</code>',
     358        __( 'https://codex.wordpress.org/Changing_File_Permissions' ),
     359        '<kbd>CTRL + a</kbd>'
     360    );
     361?></p>
    319362<form action="options-permalink.php" method="post">
    320363<?php wp_nonce_field('update-permalink') ?>
  • trunk/src/wp-admin/options-writing.php

    r41289 r41986  
    169169<?php if ( 1 == get_option('blog_public') ) : ?>
    170170
    171 <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>
    172 
    173 <textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
     171    <p><label for="ping_sites"><?php
     172        printf(
     173            /* translators: %s: Codex URL */
     174            __( '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.' ),
     175            __( 'https://codex.wordpress.org/Update_Services' )
     176        );
     177    ?></label></p>
     178
     179    <textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
    174180
    175181<?php else : ?>
    176182
    177     <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>
     183    <p><?php
     184        printf(
     185            /* translators: 1: Codex URL, 2: Reading Settings URL */
     186            __( '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>.' ),
     187            __( 'https://codex.wordpress.org/Update_Services' ),
     188            'options-reading.php'
     189        );
     190    ?></p>
    178191
    179192<?php endif; ?>
    180 <?php } // multisite ?>
     193<?php } // enable_update_services_configuration ?>
    181194
    182195<?php do_settings_sections('writing'); ?>
Note: See TracChangeset for help on using the changeset viewer.