WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#33416 closed defect (bug) (fixed)

Decouple menu location strings again

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.3
Component: Customize Keywords: good-first-bug has-patch
Focuses: Cc:

Description

[32806] brought back the string I removed in [31941] and [31951]:

$description   = '<p>' . sprintf( _n( 'Your theme contains %s menu location. Select which menu you would like to use.', 'Your theme contains %s menu locations. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) );

Should be replaced with:

if ( 1 == $num_locations ) {
	$description   = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' );
} else {
	$description   = '<p>' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) );
}

Attachments (1)

33416.patch (1.3 KB) - added by egill 6 years ago.

Download all attachments as: .zip

Change History (7)

#1 @MikeHansenMe
6 years ago

  • Keywords good-first-bug added

@egill
6 years ago

#2 @egill
6 years ago

  • Keywords has-patch added

#3 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 33741:

Customizer: Use existing decoupled strings in Menu Locations section. See [31941] and [31951].

props egill.
fixes #33416.

#4 follow-up: @pavelevap
6 years ago

@SergeyBiryukov: Sorry for off-topic, but why it is "Menu Location" in Customizer when it is "Theme Location" on Menu page? It should be the same for consistency, I guess?

#5 in reply to: ↑ 4 @SergeyBiryukov
6 years ago

Replying to pavelevap:

@SergeyBiryukov: Sorry for off-topic, but why it is "Menu Location" in Customizer when it is "Theme Location" on Menu page? It should be the same for consistency, I guess?

Good catch, looks like it's also not very consistent in different parts of code. Let's create a new ticket for that.

Last edited 6 years ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.