#42112 closed defect (bug) (fixed)
Customize Menus: Adjust "Menu Locations" labels for singular/plural
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.9 | Priority: | normal |
| Severity: | normal | Version: | 4.9 |
| Component: | Customize | Keywords: | has-patch commit |
| Focuses: | ui | Cc: |
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
@
8 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
@
8 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
@
8 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
@
8 years ago
- Keywords commit added
- Owner changed from bpayton to westonruter
- Status changed from assigned to 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.
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.