-
-
Notifications
You must be signed in to change notification settings - Fork 285
Fix typos across the tree #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis PR fixes multiple spelling and typographical errors across the codebase, including correcting typos in documentation comments, error messages, test variable names, and an internal module name. A typos.toml configuration file is introduced, likely for automated typo detection. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (3)
🧰 Additional context used🧬 Code graph analysis (1)meta/src/optimizer/mod.rs (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
grammars/benches/main.i18n.json (1)
321-321: Optional: audit remaining potential typos."editor.suggest.showCustomcolors" still has lowercase 'c' in “colors”. If intentional, ignore; if not, consider aligning to “showCustomColors”.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
generator/src/docs.rs(1 hunks)grammars/benches/main.i18n.json(29 hunks)grammars/src/lib.rs(3 hunks)meta/src/ast.rs(1 hunks)meta/src/optimizer/mod.rs(3 hunks)meta/src/validator.rs(3 hunks)pest/src/parser_state.rs(3 hunks)typos.toml(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
meta/src/optimizer/mod.rs (1)
meta/src/optimizer/rotator.rs (1)
rotate(12-43)
🔇 Additional comments (15)
meta/src/validator.rs (3)
328-328: LGTM! Documentation typo corrected.Fixed "identiers" → "identifiers" in the assumption comment.
424-424: LGTM! Documentation typo corrected.Fixed "identiers" → "identifiers" in the assumption comment.
462-462: LGTM! Documentation typo corrected.Fixed "wether" → "whether" in the comment.
generator/src/docs.rs (1)
1-7: LGTM! Documentation typos corrected.Fixed "gramamr" → "grammar" in both the module-level doc comment and the struct field documentation.
meta/src/optimizer/mod.rs (2)
27-36: LGTM! Module name corrected.Renamed module from "rotater" to "rotator" with consistent usage update on line 36. The change is properly reflected in both the module declaration and its invocation.
123-123: LGTM! Documentation typo corrected.Fixed "propaged" → "propagated" in the doc comment.
meta/src/ast.rs (1)
57-57: LGTM! Documentation typo corrected.Fixed "propaged" → "propagated" in the doc comment (consistent with the same fix in meta/src/optimizer/mod.rs).
pest/src/parser_state.rs (3)
431-431: LGTM! Comment typo corrected.Fixed "match_insensetive" → "match_insensitive" in the comment.
704-704: LGTM! Comment typo corrected.Fixed "parse_succeded" → "parse_succeeded" in the comment.
1019-1019: LGTM! Comment typo corrected.Fixed "parse_succeded" → "parse_succeeded" in the comment (consistent with line 704).
typos.toml (1)
1-8: LGTM! Typos configuration file added.The configuration file correctly defines false positives (ba, jod, nd, ot, tham, ue, vai) to be ignored by the typos tool, preventing them from being flagged incorrectly in the codebase.
grammars/src/lib.rs (2)
297-297: LGTM! User-facing error message corrected.Fixed "qoutes" → "quotes" in the error message string.
337-350: LGTM! Test variable name and expectations corrected.Fixed "qoutes" → "quotes" consistently across:
- Variable name on line 337
- Variable usage on line 340
- Test expectation string on line 350
All references are properly updated.
grammars/benches/main.i18n.json (2)
299-299: LGTM: typo/key fixes are correct and consistent.
- multipleImplementations, iconDefinition.*, performanceIssueDescription, manageExtensions, toggleSelection, currentActiveMimeType (both occurrences), functionBreakPointExpressionAriaLabel, debugRequestMissing, sortByPrecedentLabel, peekTestOutput, runNoOutput, welcome.markStepIncomplete, openLooseFileMessage, errorInvalidResourceLanguageConfiguration, etc. look good.
Also applies to: 317-317, 336-336, 1640-1640, 1828-1829, 2291-2291, 2341-2341, 3866-3866, 3945-3945, 4305-4305, 4596-4596, 5151-5151, 6245-6245, 6546-6546, 8315-8315, 8365-8365, 8831-8831, 9054-9054, 9204-9204
2833-2833: Typo in key name: 'hideActivistBar' should be 'hideActivityBar'.This introduces a wrong public key and will break lookups expecting 'hideActivityBar'.
Apply this diff:
- "hideActivistBar": "隐藏活动栏", + "hideActivityBar": "隐藏活动栏",Likely an incorrect or invalid review comment.
| "id required": "扩展 ID 是必需的。", | ||
| "importKeyboardShortcutsFroms": "从 - 中迁移键盘快捷方式...", | ||
| "importKeyboardShortcutsForms": "从 - 中迁移键盘快捷方式...", | ||
| "install button": "安装", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong key: 'importKeyboardShortcutsForms' → 'importKeyboardShortcutsFrom'.
This command id should be “From”, not “Forms”.
- "importKeyboardShortcutsForms": "从 - 中迁移键盘快捷方式...",
+ "importKeyboardShortcutsFrom": "从 - 中迁移键盘快捷方式...",Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In grammars/benches/main.i18n.json around line 5093, the JSON key for the
command id is misspelled as "importKeyboardShortcutsForms"; change it to
"importKeyboardShortcutsFrom" (i.e., replace "Forms" with "From") and ensure the
surrounding JSON remains valid (commas/quotes intact) and update any other
occurrences of the incorrect key elsewhere in the repo if present.
grammars/benches/main.i18n.json
Outdated
| "copyingFile": "正在复制 {0} 资源", | ||
| "copynFile": "复制 {0} 资源", | ||
| "downloadBulkEdit": "下载 {0}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Duplicate key and stray entry ('copynFile') create invalid/ambiguous JSON semantics.
- "copyingFile" appears twice; last-wins in JSON is risky and unintended.
- "copynFile" looks like a typo and likely unused.
Recommend deduplicating and removing the stray key.
Apply this diff to keep a single canonical entry and drop the typo:
- "copyingFile": "正在复制 {0} 资源",
- "copynFile": "复制 {0} 资源",
+ // keep the single canonical key defined earlier:
+ // "copyingFile": "正在复制 {0}",If the “资源” variant is required by callers, retain only one "copyingFile" with the desired message and remove the other. Please confirm intended text and usages.
I need to verify the claims in this review comment. Let me search the JSON file and codebase for these keys.
🏁 Script executed:
#!/bin/bash
# Search for all occurrences of copyingFile and copynFile in the JSON file
echo "=== Searching for 'copyingFile' in main.i18n.json ==="
rg -n 'copyingFile' grammars/benches/main.i18n.json
echo -e "\n=== Searching for 'copynFile' in main.i18n.json ==="
rg -n 'copynFile' grammars/benches/main.i18n.json
echo -e "\n=== Context around lines 5708-5710 ==="
sed -n '5705,5715p' grammars/benches/main.i18n.json | cat -nLength of output: 800
🏁 Script executed:
#!/bin/bash
# Search codebase for references to copynFile (excluding the definition)
echo "=== Searching codebase for 'copynFile' references ==="
rg -n 'copynFile' --type=js --type=ts --type=json -g '!**/main.i18n.json'
echo -e "\n=== Searching codebase for 'copyingFile' references ==="
rg -n 'copyingFile' --type=js --type=ts -g '!**/main.i18n.json' -C2 | head -50Length of output: 259
Let me verify which version of copyingFile is actually used in the codebase:
🏁 Script executed:
#!/bin/bash
# Broader search for copyingFile references in code
echo "=== Searching for copyingFile in all code files ==="
fd --type f \( -name '*.js' -o -name '*.ts' -o -name '*.jsx' -o -name '*.tsx' \) | xargs rg 'copyingFile' 2>/dev/null | head -20
echo -e "\n=== Also check for any references to copynFile in JS/TS files ==="
fd --type f \( -name '*.js' -o -name '*.ts' -o -name '*.jsx' -o -name '*.tsx' \) | xargs rg 'copynFile' 2>/dev/nullLength of output: 920
Remove duplicate key "copyingFile" and unused typo "copynFile" from JSON i18n file.
Verification confirms the issues:
- "copyingFile" appears twice (lines 5706 and 5708 in grammars/benches/main.i18n.json), causing JSON last-wins override behavior
- "copynFile" (line 5709) has no references in the codebase—confirmed unused and likely a typo
The duplicate key will cause the second entry to override the first. Choose the correct message variant and remove both the duplicate "copyingFile" and the stray "copynFile" entry.
🤖 Prompt for AI Agents
In grammars/benches/main.i18n.json around lines 5708 to 5710, there is a
duplicate "copyingFile" key and an unused typo key "copynFile"; remove the
duplicate "copyingFile" entry (keep the correct variant already present at line
~5706) and delete the "copynFile" line so only the single, correct "copyingFile"
translation remains in the JSON.
|
This will have to be rebased on top of #1134 once it is merged, for CI to pass. |
tomtau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's merged, you can rebase it now
They were found thanks to the typos[1] tool. [1] https://github.com/crate-ci/typos
This one instructs typos to ignore the false positives found in this repository.
They were found thanks to the typos tool.
I’ve also added a
typos.tomlfile to ignore the false positives found in this repository.Summary by CodeRabbit
Bug Fixes
Documentation
Chores