Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#65112 reviewing defect (bug)

Docs: Correct typos in JS inline comments and docblocks

Reported by: parinpanjari's profile parinpanjari Owned by: westonruter's profile westonruter
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/:

  1. 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.)
  1. 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.
  1. src/js/_enqueues/wp/customize/controls.js:593 — "Dates not beung allowed for revisions..." should be "being".
  1. src/js/_enqueues/wp/customize/nav-menus.js:3542 — docblock says returning a "unnammed" fallback string — should be "unnamed". The actual code at line 3553 correctly references l10n.unnamed, so the docblock is currently quoting the wrong spelling.
  1. 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)

ticket-1-js-docblock-typos.diff (2.5 KB) - added by parinpanjari 3 weeks ago.
65112.2.full.diff (2.5 KB) - added by parinpanjari 3 weeks ago.

Download all attachments as: .zip

Change History (8)

#1 @dmsnell
3 weeks ago

@parinpanjari there’s another issue on one of your changed lines. maybe want to fix that too?

Dates not being allowed for revisions are is a technical limitation of post revisions.

There’s an issue with “are is”

#2 @parinpanjari
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.

#3 @parinpanjari
3 weeks ago

  • Keywords has-patch added

#4 @westonruter
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.

#5 @parinpanjari
3 weeks ago

@westonruter

Thanks! Attached an updated patch with the extra are removed. Fully understood on the 7.0 freeze, No rush.

#6 @westonruter
3 weeks ago

  • Keywords commit added
  • Owner set to westonruter
  • Priority changed from normal to lowest
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.