#42112 closed defect (bug) (fixed)
Customize Menus: Adjust "Menu Locations" labels for singular/plural
| Reported by: | melchoyce | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Customize | Version: | 4.9 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | ui |
Description
Currently, "Menu Locations" is plural even if you only have one location to assign menus to.
Attachments (1)
Change History (11)
#4
follow-up:
↓ 5
@
9 years ago
It looks good to me too, but @felipeelia why introduce a new template variable for locationsTitle when it could just replace the _e() call with an echo _n() in tmpl-nav-menu-locations-header?
#5
in reply to: ↑ 4
;
follow-up:
↓ 8
@
9 years ago
Replying to westonruter:
It looks good to me too, but @felipeelia why introduce a new template variable for
locationsTitlewhen it could just replace the_e()call with anecho _n()intmpl-nav-menu-locations-header?
Hi @westonruter :)
I think it couldn't be replaced by _n directly because we don't have the number of locations avaiable inside print_templates() function. Please correct me if I'm wrong.
#6
@
9 years ago
I was happy to see the new variable because I was planning to introduce it anyway to share it with class-wp-customize-nav-menu-locations-control.php.
#8
in reply to: ↑ 5
@
9 years ago
- Keywords commit added
- Owner changed from to
- Status assigned → accepted
Replying to felipeelia:
I think it couldn't be replaced by
_ndirectly because we don't have the number of locations avaiable insideprint_templates()function. Please correct me if I'm wrong.
The printing of templates would happen even after enqueue_scripts, so the number of registered nav menus would for sure be known at that point. But since @bpayton would like to re-use the string, the patch is good as is.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I talked about this with @bpayton at slack and I've uploaded a patch (trying) to help. Note that it also changes
View All LocationstoView Locationwhen there is only one of them.