Skip to content
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

fix: Minor spelling typos #6417

Merged
merged 1 commit into from
Dec 30, 2024
Merged

fix: Minor spelling typos #6417

merged 1 commit into from
Dec 30, 2024

Conversation

ottok
Copy link
Contributor

@ottok ottok commented Dec 29, 2024

Fix various minor spelling mistakes.

Typo 'SEPERATOR' (SEPARATOR) and 'collapsable' (collapsible) were not fixed as it will require more testing to ensure there are no side effects.

Summary by CodeRabbit

  • 文档更新

    • 修正了多个文件中的拼写和语法错误
    • 改进了注释和文档的准确性
    • 更新了一些按钮和标签的文本标签
  • 代码质量

    • 对多个组件和模块的注释进行了细微的文字修正
    • 未对代码功能和逻辑进行实质性更改

这些更改主要集中在提高代码的可读性和文档的准确性,不会影响系统的核心功能。

Copy link

codesandbox bot commented Dec 29, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

coderabbitai bot commented Dec 29, 2024

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 Biome (1.9.4)
packages/core/src/chains/xmr/sdkXmr/moneroCore/moneroCore.js

The --json option is unstable/experimental and its output might change between patches/minor releases.
Biome encountered an unexpected error

This is a bug in Biome, not an error in your code, and we would appreciate it if you could report it to https://github.com/biomejs/biome/issues/ along with the following information to help us fixing the issue:

Source Location: crates/biome_console/src/lib.rs:149:14
Thread Name: main
Message: called Result::unwrap() on an Err value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }

总览

代码变更概述

本次拉取请求(Pull Request)主要包含了多个文件中的拼写和语法修正,涉及注释、错误消息和用户界面文本。这些更改旨在提高代码的可读性和准确性,但未对代码的功能或逻辑产生实质性影响。

变更

文件路径 变更摘要
development/webpack/ext/codeSplit.js 修正注释中 "seperate" 为 "separate"
development/webpack/ext/manifestBuilder.js 更正 "informations" 为 "information"
packages/components/src/layouts/Navigation/ScreenProps.ts 修复 @plaform@platform
packages/core/src/chains/fil/CoreChainSoftware.ts 纠正 "fucntion" 为 "function"
packages/core/src/chains/nexa/sdkNexa/sdk/script.ts 更正 "instatiate" 为 "instantiate"
packages/core/src/chains/xmr/sdkXmr/moneroCore/moneroCore.js 修正 "direcly" 为 "directly","non existant" 为 "nonexistent"
packages/kit-bg/src/services/ServiceFirmwareUpdate/ServiceFirmwareUpdate.ts 更正 "cann't" 为 "can't"
packages/kit/src/views/Developer/pages/Gallery/Components/stories/Dialog.tsx 修正 "recommand" 为 "recommend"
packages/kit/src/views/Setting/pages/List/DevSettingsSection/FirmwareUpdateDevSettings.tsx 更正 "Resouces" 为 "Resources"
packages/kit/src/views/TestModal/pages/TestSimpleModal.tsx 修正 "Pervious" 为 "Previous"
packages/shared/src/engine/engineConsts.ts 更正 "offical" 为 "official"
packages/shared/src/polyfills/xhrShim/xhrShimV3.ts 修正 "suport" 为 "support"
packages/shared/src/utils/messageUtils.test.ts 更正 "convertable" 为 "convertible"

结论

这些变更主要集中在提高代码的文档质量和可读性,通过修正拼写错误和语法问题,增强了代码的整体清晰度。所有修改均未改变代码的核心功能或逻辑。

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or Summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🔭 Outside diff range comments (1)
packages/core/src/chains/xmr/sdkXmr/moneroCore/moneroCore.js (1)

Line range hint 5447-5482: 内部函数命名不一致

内部函数命名风格不一致,有些使用驼峰命名法,有些使用下划线。建议统一使用驼峰命名法:

- function throwInternalError(message)
+ function throwInternalErr(message)

- function replacePublicSymbol(name, value, numArguments)  
+ function replacePublicSym(name, value, numArguments)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4c5acf5 and dc3af28.

📒 Files selected for processing (13)
  • development/webpack/ext/codeSplit.js (1 hunks)
  • development/webpack/ext/manifestBuilder.js (1 hunks)
  • packages/components/src/layouts/Navigation/ScreenProps.ts (1 hunks)
  • packages/core/src/chains/fil/CoreChainSoftware.ts (1 hunks)
  • packages/core/src/chains/nexa/sdkNexa/sdk/script.ts (1 hunks)
  • packages/core/src/chains/xmr/sdkXmr/moneroCore/moneroCore.js (6 hunks)
  • packages/kit-bg/src/services/ServiceFirmwareUpdate/ServiceFirmwareUpdate.ts (1 hunks)
  • packages/kit/src/views/Developer/pages/Gallery/Components/stories/Dialog.tsx (1 hunks)
  • packages/kit/src/views/Setting/pages/List/DevSettingsSection/FirmwareUpdateDevSettings.tsx (1 hunks)
  • packages/kit/src/views/TestModal/pages/TestSimpleModal.tsx (3 hunks)
  • packages/shared/src/engine/engineConsts.ts (1 hunks)
  • packages/shared/src/polyfills/xhrShim/xhrShimV3.ts (1 hunks)
  • packages/shared/src/utils/messageUtils.test.ts (1 hunks)
🔇 Additional comments (15)
development/webpack/ext/manifestBuilder.js (1)

4-4: 注释语法修正正确!

将 "informations" 改为 "information" 是正确的,因为 "information" 是不可数名词。

development/webpack/ext/codeSplit.js (1)

40-40: 注释拼写修正正确!

将 "seperate" 改为 "separate" 修正了常见的拼写错误。

packages/shared/src/polyfills/xhrShim/xhrShimV3.ts (1)

110-110: 注释拼写修正正确!

将 "suport" 改为 "support" 修正了拼写错误。

packages/components/src/layouts/Navigation/ScreenProps.ts (1)

72-72: 文档标记修正已确认!

JSDoc 注释中的 @platform 标记拼写已更正,提高了文档的准确性。

Also applies to: 78-78, 84-84

packages/kit/src/views/Setting/pages/List/DevSettingsSection/FirmwareUpdateDevSettings.tsx (1)

72-72: 用户界面文本拼写已修正!

"Resources" 的拼写已更正,使界面文本更加规范。

packages/shared/src/engine/engineConsts.ts (1)

305-305: 注释拼写已修正!

代码注释中 "official" 的拼写已更正,提高了文档质量。

packages/kit/src/views/TestModal/pages/TestSimpleModal.tsx (1)

148-148: 按钮文本修正正确!

"Back To Previous Page" 的拼写修正准确,提高了用户界面文本的专业性。

Also applies to: 161-161, 174-174

packages/core/src/chains/fil/CoreChainSoftware.ts (1)

Line range hint 72-77: 注释说明清晰准确!

对 Buffer 和 Uint8Array 比较行为的解释准确且详细,有助于其他开发者理解这个特殊的实现细节。

packages/core/src/chains/nexa/sdkNexa/sdk/script.ts (1)

303-303: 技术说明更新准确!

对大数处理和 BN 实例化的说明更加准确,有助于理解代码的性能考虑。

packages/kit/src/views/Developer/pages/Gallery/Components/stories/Dialog.tsx (1)

798-798: 拼写修正已确认

将 "recommand" 修改为 "recommend" 的拼写更正是正确的。

packages/kit-bg/src/services/ServiceFirmwareUpdate/ServiceFirmwareUpdate.ts (1)

584-587: 注释拼写修正已确认

将 "cann't" 修改为 "can't" 的拼写更正是正确的。注释更清晰地说明了在引导加载程序模式下无法检测当前固件版本的原因。

packages/core/src/chains/xmr/sdkXmr/moneroCore/moneroCore.js (2)

1152-1154: 🧹 Nitpick (assertive)

WebAssembly 运行时错误消息需要改进

错误消息不够清晰。建议修改为:

- // The VM will perform JS to Wasm value conversion, according to the spec:
+ // The VM will perform JavaScript to WebAssembly value conversion according to the spec:

Likely invalid or redundant comment.


7154-7156: 🛠️ Refactor suggestion

WebAssembly 表操作需要更好的错误处理

这段代码在设置 WebAssembly 表项时缺少错误检查。建议添加错误处理:

function setWasmTableEntry(idx, func) {
+ if (idx < 0 || idx >= wasmTable.length) {
+   throw new Error('Invalid table index');
+ }
  wasmTable.set(idx, func);
  wasmTableMirror[idx] = wasmTable.get(idx);
}

Likely invalid or redundant comment.

packages/shared/src/utils/messageUtils.test.ts (2)

280-280: 拼写更正:将 "convertable" 改为 "convertible"

这个拼写更正提高了测试描述的准确性。


Line range hint 1-799: 文件整体拼写和语法检查完成

文件中的其他测试描述、错误消息和注释的拼写都很准确,没有发现其他需要修正的拼写错误。

@ottok
Copy link
Contributor Author

ottok commented Dec 29, 2024

Note to self: The text in Chinese above basically says multiple times:

Overview of Code Changes
This pull request mainly contains spelling and grammar corrections in multiple files, including comments, error messages, and user interface text. These changes are intended to improve the readability and accuracy of the code, but have no substantial impact on the functionality or logic of the code.

Fix various minor spelling mistakes.

Typo 'SEPERATOR' (SEPARATOR) and 'collapsable' (collapsible) were not
fixed as it will require more testing to ensure there are no side
effects.
@ottok
Copy link
Contributor Author

ottok commented Dec 29, 2024

It is unclear if monero.js is actually your own code, or if the improvements should be sent upstream somewhere.

In general, the project README.md is very thin, and it is hard for an outsider to reason about the code architecture, so these changes are so far minimal.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc3af28 and c91be66.

📒 Files selected for processing (13)
  • development/webpack/ext/codeSplit.js (1 hunks)
  • development/webpack/ext/manifestBuilder.js (1 hunks)
  • packages/components/src/layouts/Navigation/ScreenProps.ts (1 hunks)
  • packages/core/src/chains/fil/CoreChainSoftware.ts (1 hunks)
  • packages/core/src/chains/nexa/sdkNexa/sdk/script.ts (1 hunks)
  • packages/core/src/chains/xmr/sdkXmr/moneroCore/moneroCore.js (6 hunks)
  • packages/kit-bg/src/services/ServiceFirmwareUpdate/ServiceFirmwareUpdate.ts (1 hunks)
  • packages/kit/src/views/Developer/pages/Gallery/Components/stories/Dialog.tsx (1 hunks)
  • packages/kit/src/views/Setting/pages/List/DevSettingsSection/FirmwareUpdateDevSettings.tsx (1 hunks)
  • packages/kit/src/views/TestModal/pages/TestSimpleModal.tsx (3 hunks)
  • packages/shared/src/engine/engineConsts.ts (1 hunks)
  • packages/shared/src/polyfills/xhrShim/xhrShimV3.ts (1 hunks)
  • packages/shared/src/utils/messageUtils.test.ts (1 hunks)
🔇 Additional comments (13)
development/webpack/ext/manifestBuilder.js (1)

4-4: 注释修改正确!

将 "informations" 改为 "information" 是正确的,因为 "information" 是不可数名词。

development/webpack/ext/codeSplit.js (1)

40-40: 拼写更正准确!

将 "seperate" 改为 "separate" 是正确的拼写修正。这个更改提高了代码注释的准确性。

packages/components/src/layouts/Navigation/ScreenProps.ts (1)

72-72: 文档标记修正完成!

JSDoc 注释中的 @platform 标记已正确修正,提高了文档的准确性。

Also applies to: 78-78, 84-84

packages/kit/src/views/Setting/pages/List/DevSettingsSection/FirmwareUpdateDevSettings.tsx (1)

72-72: 用户界面文本已更正!

将 "Full Resouces" 更正为 "Full Resources",提高了用户界面的专业性。

packages/shared/src/engine/engineConsts.ts (1)

Line range hint 305-309: 注释更正和风险标记说明已完善!

代码注释中的拼写错误已修正("offical" 改为 "official"),并且清晰地说明了特定代币符号的风险标记机制。

packages/kit/src/views/TestModal/pages/TestSimpleModal.tsx (1)

148-148: 按钮文本拼写修正完成!

"Pervious" 改为 "Previous" 的修改很准确,提高了用户界面文本质量。

Also applies to: 161-161, 174-174

packages/core/src/chains/fil/CoreChainSoftware.ts (1)

Line range hint 72-77: 代码注释更清晰了!

注释准确解释了 Buffer.concat 在处理不同数组类型时的行为,对理解代码很有帮助。

packages/core/src/chains/nexa/sdkNexa/sdk/script.ts (1)

303-303: 技术文档拼写修正完成!

"instatiate" 改为 "instantiate" 的修改提高了代码文档的准确性。

packages/shared/src/utils/messageUtils.test.ts (1)

Line range hint 1-1000: 测试用例结构清晰,代码质量良好!

测试覆盖了消息验证的各种场景,包括错误处理和边界条件检查。

packages/kit/src/views/Developer/pages/Gallery/Components/stories/Dialog.tsx (1)

798-798: 标题中的拼写错误已修正

将 "recommand" 修正为 "recommend",提高了文案准确性。

packages/kit-bg/src/services/ServiceFirmwareUpdate/ServiceFirmwareUpdate.ts (1)

584-587: 注释中的拼写错误已修正

将 "cann't" 修正为 "can't",使注释更加规范。

packages/core/src/chains/xmr/sdkXmr/moneroCore/moneroCore.js (2)

115-116: 语法和拼写改进

修正了以下问题:

  1. 添加了逗号增加可读性
  2. 将技术术语 "V8" 和 "Node.js" 大写规范化
  3. 修正了 "direcly" 的拼写错误为 "directly"

1152-1152: 代码行号变更

这行代码内容没有实质性改变,仅是由于上面的修改导致的行号偏移。

@sidmorizon sidmorizon enabled auto-merge (squash) December 29, 2024 15:19
@loatheb loatheb disabled auto-merge December 30, 2024 02:29
@loatheb loatheb merged commit 20cb2a6 into OneKeyHQ:x Dec 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants