Opened 3 weeks ago
Last modified 3 weeks ago
#65112 reviewing defect (bug)
Docs: Correct typos in JS inline comments and docblocks
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.1 | Priority: | lowest |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch commit |
| Focuses: | docs | Cc: |
Description
Five typos exist in WordPress-authored JavaScript comments and docblocks
under src/js/_enqueues/:
src/js/_enqueues/wp/api.js:986— "add nince and pagination support" should be "nonce". (The next docblock line correctly uses "nonce", confirming the intent.)
src/js/_enqueues/wp/api.js:1291— "Clear the parent part of the rouite if its actually the version string" should be "route" (and "its" → "it's"). Both are fixed in the attached patch.
src/js/_enqueues/wp/customize/controls.js:593— "Dates not beung allowed for revisions..." should be "being".
src/js/_enqueues/wp/customize/nav-menus.js:3542— docblock saysreturning a "unnammed" fallback string— should be "unnamed". The actual code at line 3553 correctly referencesl10n.unnamed, so the docblock is currently quoting the wrong spelling.
src/js/_enqueues/lib/admin-bar.js:420— "Get the closest matching elent" should be "element".
The attached patch updates only the authoritative _enqueues sources.
The corresponding build artifacts under src/wp-admin/js/ and
src/wp-includes/js/ are regenerated by grunt and are .gitignored.
Adjacent issue (not included in this patch): line 593 of controls.js
also contains an "are is" grammar error ("...for revisions are is a
technical limitation..."). Happy to fold into this patch or address in
a follow-up per committer preference.
Attachments (2)
Change History (8)
#2
@
3 weeks ago
@dmsnell
Good catch, thanks! Yes, please drop the stray "are" as part of this commit. Happy for you to fold that in directly — no need for a revised patch.
#4
@
3 weeks ago
- Component changed from REST API to General
- Focuses docs added
- Milestone changed from Awaiting Review to 7.1
@parinpanjari Please add another patch with that additional fix.
Once that's in place, this can be marked as ready for commit.
But we'll not commit this right away since trunk is currently frozen for 7.0.
@parinpanjari there’s another issue on one of your changed lines. maybe want to fix that too?
There’s an issue with “are is”