Skip to content

Commit

Permalink
I18N: Correctly output the None translatable strings.
Browse files Browse the repository at this point in the history
Includes updating the context to match the pre-existing block editor translations.

Follow-up to [58284].

Props sabernhardt, Marius84.
Fixes #61714.

git-svn-id: https://develop.svn.wordpress.org/trunk@58774 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jul 21, 2024
1 parent 68b2338 commit 308271c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/wp-admin/includes/meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ function link_xfn_meta_box( $link ) {
<input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check( 'friendship', 'friend' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'friend' ); ?>
</label>
<label for="friendship">
<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check( 'friendship' ); ?> />&nbsp;<?php /* translators: xfn (friendship relation): http://gmpg.org/xfn/ */ _x( 'none', 'Type of relation' ); ?>
<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check( 'friendship' ); ?> />&nbsp;<?php /* translators: xfn (friendship relation): http://gmpg.org/xfn/ */ _ex( 'none', 'Type of relation' ); ?>
</label>
</fieldset></td>
</tr>
Expand Down Expand Up @@ -1405,7 +1405,7 @@ function link_xfn_meta_box( $link ) {
<input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check( 'geographical', 'neighbor' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'neighbor' ); ?>
</label>
<label for="geographical">
<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check( 'geographical' ); ?> />&nbsp;<?php /* translators: xfn (geographical relation): http://gmpg.org/xfn/ */ _x( 'none', 'Type of relation' ); ?>
<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check( 'geographical' ); ?> />&nbsp;<?php /* translators: xfn (geographical relation): http://gmpg.org/xfn/ */ _ex( 'none', 'Type of relation' ); ?>
</label>
</fieldset></td>
</tr>
Expand Down Expand Up @@ -1434,7 +1434,7 @@ function link_xfn_meta_box( $link ) {
<input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check( 'family', 'spouse' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'spouse' ); ?>
</label>
<label for="family">
<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check( 'family' ); ?> />&nbsp;<?php /* translators: xfn (family relation): http://gmpg.org/xfn/ */ _x( 'none', 'Type of relation' ); ?>
<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check( 'family' ); ?> />&nbsp;<?php /* translators: xfn (family relation): http://gmpg.org/xfn/ */ _ex( 'none', 'Type of relation' ); ?>
</label>
</fieldset></td>
</tr>
Expand Down
18 changes: 9 additions & 9 deletions src/wp-includes/media-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Right' ); ?>
</option>
<option value="none" selected>
<?php esc_html_x( 'None', 'Alignment' ); ?>
<?php echo esc_html_x( 'None', 'Alignment option' ); ?>
</option>
</select>
</span>
Expand All @@ -867,7 +867,7 @@ function wp_print_media_templates() {
<option value="file">
<# } else { #>
<option value="none" selected>
<?php esc_html_x( 'None', 'Embedded player type' ); ?>
<?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</option>
<option value="file">
<# } #>
Expand Down Expand Up @@ -952,7 +952,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Media File' ); ?>
</option>
<option value="none" <# if ( 'none' === wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
<?php esc_html_x( 'None', 'Media link target' ); ?>
<?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</option>
</select>
</span>
Expand Down Expand Up @@ -1096,7 +1096,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Right' ); ?>
</button>
<button class="button active" value="none">
<?php esc_html_x( 'None', 'Alignment' ); ?>
<?php echo esc_html_x( 'None', 'Alignment option' ); ?>
</button>
</span>
</span>
Expand All @@ -1113,7 +1113,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Custom URL' ); ?>
</button>
<button class="button active" value="none">
<?php esc_html_x( 'None', 'Media URL' ); ?>
<?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</button>
</span>
</span>
Expand Down Expand Up @@ -1160,7 +1160,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Right' ); ?>
</button>
<button class="button active" value="none">
<?php esc_html_x( 'None', 'Alignment' ); ?>
<?php echo esc_html_x( 'None', 'Alignment option' ); ?>
</button>
</span>
</span>
Expand Down Expand Up @@ -1236,7 +1236,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Custom URL' ); ?>
</option>
<option value="none">
<?php esc_html_x( 'None', 'Media URL' ); ?>
<?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</option>
</select>
</span>
Expand Down Expand Up @@ -1356,7 +1356,7 @@ function wp_print_media_templates() {
<span class="button-group button-large" data-setting="preload">
<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
<button class="button active" value="none"><?php _x( 'None', 'Preload type' ); ?></button>
<button class="button active" value="none"><?php _ex( 'None', 'Preload value' ); ?></button>
</span>
</span>
</fieldset>
Expand Down Expand Up @@ -1455,7 +1455,7 @@ function wp_print_media_templates() {
<span class="button-group button-large" data-setting="preload">
<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
<button class="button active" value="none"><?php _x( 'None', 'Preload type' ); ?></button>
<button class="button active" value="none"><?php _ex( 'None', 'Preload value' ); ?></button>
</span>
</span>
</fieldset>
Expand Down

0 comments on commit 308271c

Please sign in to comment.