Opened 2 weeks ago
Last modified 2 weeks ago
#65119 reviewing enhancement
Docs: Correct the grammar/spelling in api.js documentation
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | 4.7 |
| Component: | REST API | Keywords: | has-patch |
| Focuses: | javascript, docs | Cc: |
Description (last modified by )
During a routine review of src/js/_enqueues/wp/api.js, I identified several grammatical errors and spelling inconsistencies within the inline comments. These issues, while minor, can hinder readability and comprehension for developers working with or learning from this code.
Changes Made:
This patch improves the inline documentation by:
- Correcting spelling mistakes throughout the file's comment blocks
- Fixing grammatical errors to enhance sentence clarity and flow
- Maintaining the original technical meaning and intent of all comments
- Preserving consistent terminology and code comment formatting standards
Impact:
These changes are purely documentation-focused and have no impact on:
- Code execution or functionality
- API behavior or public interfaces
- Performance or backward compatibility
Testing:
No functional testing is required as these changes only affect inline comments. The patch has been verified to contain only whitespace and text modifications within comment blocks.
Attachments (2)
Change History (9)
This ticket was mentioned in Slack in #core by baikaresandeep007-1. View the logs.
2 weeks ago
#3
@
2 weeks ago
- Component changed from Text Changes to REST API
- Focuses coding-standards removed
- Milestone changed from Awaiting Review to 7.1
#5
@
2 weeks ago
@gaurangsondagar Thank you, but I suggest focusing your efforts on testing patches that actually have functionality. Testing reports for coding standards and docs updates aren't particularly helpful.
#6
@
2 weeks ago
- Description modified (diff)
- Summary changed from Docs: Correct the grammer/spelling in api.js documentation to Docs: Correct the grammar/spelling in api.js documentation
- Version changed from trunk to 4.7
The three sentences edited in api.js-doc-enhancement.patch were all included in api.js when [38832] introduced the script file.
- Capitalizing ID is good, but I would capitalize it in another line too.
- URL, MySQL, and Safari were also lowercase.
- The word "thru" is used in two lines.
Special notes about 65119.diff:
// Attach parent post ID to the collection.
The script sets 'parent_post' (not 'post_parent'), and I think a space fits the documentation instead of the underscore.// Go through the parsable date fields. If our model contains any of them, it gets the TimeStampedMixin.
The patch splits this into two sentences.// Fail silently, to avoid errors in Safari private mode.
Failing silently does not fix errors.- 65119.diff corrects the typos for "nonce", "route" and "it is" (or "it's"). I noticed later that these were reported—and edited—in #65112.
Patch Testing Report:
Patch Tested: https://core.trac.wordpress.org/attachment/ticket/65119/api.js-doc-enhancement.patch
Environment:
Test Cases:
Result:
I have verified and patch looks correctly applied.
Please review the attached screenshots for reference:
https://snipboard.io/zGhc53.jpg
https://snipboard.io/Xq6k2U.jpg
https://snipboard.io/envRLd.jpg