-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
chore: import translations for zh #12889
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@coderabbitai review |
WalkthroughThe updates across various tutorials primarily involve language and tone adjustments from formal to informal, updates in technical tags, and improvements in code clarity and error messaging. These changes aim to enhance readability, update terminology, and ensure technical accuracy in the tutorials tailored for Chinese-speaking developers. Changes
This table groups similar changes to provide a concise overview, enhancing the readability and accessibility of the update summary. 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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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: 15
Out of diff range and nitpick comments (40)
public/content/translations/zh/developers/tutorials/how-to-implement-an-erc721-market/index.md (7)
72-75
: Consider removing the trailing space on line 72 for cleaner code formatting.
76-77
: Remove the multiple consecutive blank lines between lines 76 and 77 to adhere to standard Markdown formatting practices.
88-89
: Reduce the number of consecutive blank lines between lines 88 and 89 to one to maintain consistent spacing in the document.
93-94
: Consider reducing the consecutive blank lines between lines 93 and 94 to improve readability and maintain a clean document structure.
111-115
: Reduce the excessive blank lines between lines 111 and 115 to maintain a clean and professional appearance of the code.
129-135
: Multiple consecutive blank lines found between lines 129 and 135. It's recommended to limit to one blank line to keep the document tidy.
152-156
: Consider reducing the number of blank lines between lines 152 and 156 to enhance the structure and readability of the document.public/content/translations/zh/developers/tutorials/learn-foundational-ethereum-topics-with-sql/index.md (10)
Line range hint
68-68
: Add alternate text to the image for accessibility.- ![](./etherscan_view.png) + ![Etherscan view](./etherscan_view.png)
Line range hint
74-74
: Add alternate text to the image for accessibility.- ![](./dune_view.png) + ![Dune Analytics view](./dune_view.png)
Line range hint
152-152
: Add alternate text to the image for accessibility.- ![](./parent_hash.png) + ![Parent hash visualization](./parent_hash.png)
Line range hint
171-171
: Add alternate text to the image for accessibility.- ![](./successful_txn.png) + ![Successful transactions visualization](./successful_txn.png)
Line range hint
179-179
: Add alternate text to the image for accessibility.- ![](./daily_blocks.png) + ![Daily Ethereum blocks chart](./daily_blocks.png)
Line range hint
183-183
: Add alternate text to the image for accessibility.- ![](./avg_daily_blocks.png) + ![Average daily blocks chart](./avg_daily_blocks.png)
Line range hint
220-220
: Add alternate text to the image for accessibility.- ![](./avg_gas_limit.png) + ![Average gas limit chart](./avg_gas_limit.png)
Line range hint
233-233
: Add alternate text to the image for accessibility.- ![](./daily_gas_used.png) + ![Daily gas used chart](./daily_gas_used.png)
Line range hint
252-252
: Add alternate text to the image for accessibility.- ![](./gas_demand_supply.png) + ![Gas demand and supply chart](./gas_demand_supply.png)
Line range hint
252-252
: Add alternate text to the image for accessibility.- ![](./ef_daily_gas.png) + ![Ethereum Foundation daily gas chart](./ef_daily_gas.png)public/content/translations/zh/developers/tutorials/using-websockets/index.md (3)
Line range hint
226-226
: Use a heading instead of emphasis for section titles.- **请求** + ### 请求
Line range hint
237-237
: Use a heading instead of emphasis for section titles.- **结果** + ### 结果
Line range hint
228-228
: Specify the language for the fenced code block to improve readability and syntax highlighting.- ``` + ```json { "jsonrpc": "2.0", "id": 1, "result": true }</blockquote></details> <details><summary>public/content/translations/zh/developers/tutorials/how-to-use-slither-to-find-smart-contract-bugs/index.md (1)</summary><blockquote> `8-8`: Consider adding more specific tags related to Slither or static analysis for better categorization and searchability. </blockquote></details> <details><summary>public/content/translations/zh/developers/tutorials/how-to-write-and-deploy-an-nft/index.md (1)</summary><blockquote> Line range hint `296-296`: The code block should be indented instead of fenced for consistency with the rest of the document. ```diff - ```js + ``` js
public/content/translations/zh/developers/tutorials/optimism-std-bridge-annotated-code/index.md (2)
Line range hint
457-457
: Correct the link fragment to match the actual section ID.- [此接口在此处定义](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L1/messaging/IL1ERC20Bridge.sol) + [此接口在此处定义](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L1/messaging/IL1ERC20Bridge.sol#IL1StandardBridge)The link fragment should correctly point to the
IL1StandardBridge
section to ensure that readers can navigate directly to the relevant part of the document.
Line range hint
526-526
: Ensure the link fragment is valid to maintain document integrity.- [如上所述](#crossdomainenabled) + [如上所述](#CrossDomainEnabled)The link fragment should match the actual section ID, which is case-sensitive. This correction ensures that the link correctly navigates to the
CrossDomainEnabled
section.public/content/translations/zh/developers/tutorials/uniswap-v2-annotated-code/index.md (5)
Line range hint
145-145
: Ensure the link fragment in the introduction section is valid and navigable.
Line range hint
427-427
: Verify that the link fragment in the detailed explanation section is correct.
Line range hint
465-465
: Check the validity of the link fragment in the code explanation section.
Line range hint
550-550
: Confirm that the link fragment in the latter part of the document directs to the correct section.
Line range hint
596-596
: Ensure the link fragment towards the end of the document is functioning as expected.public/content/translations/zh/developers/tutorials/testing-erc-20-tokens-with-waffle/index.md (11)
Line range hint
648-648
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```bash + yarn add --dev ethereum-waffle
Line range hint
658-658
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```bash + yarn add @openzeppelin/contracts -D
Line range hint
664-664
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```json + { + "scripts": { + "build": "waffle" + } + }
Line range hint
694-694
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```bash + yarn add --dev mocha chai
Line range hint
1020-1020
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```ts + import { expect, use } from "chai" + import { Contract } from "ethers" + import { deployContract, MockProvider, solidity } from "ethereum-waffle" + import BasicToken from "../build/BasicToken.json" + + use(solidity) + + describe("BasicToken", () => { + const [wallet, walletTo] = new MockProvider().getWallets() + let token: Contract + + beforeEach(async () => { + token = await deployContract(wallet, BasicToken, [1000]) + }) + })
Line range hint
1028-1028
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```ts + it("Assigns initial balance", async () => { + expect(await token.balanceOf(wallet.address)).to.equal(1000) + })
Line range hint
1054-1054
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```ts + it("Transfer emits event", async () => { + await expect(token.transfer(walletTo.address, 7)) + .to.emit(token, "Transfer") + .withArgs(wallet.address, walletTo.address, 7) + })
Line range hint
1072-1072
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```ts + it("Can not transfer above the amount", async () => { + await expect(token.transfer(walletTo.address, 1007)).to.be.revertedWith( + "VM Exception while processing transaction: revert ERC20: transfer amount exceeds balance" + ) + })
Line range hint
1092-1092
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```ts + it("Send transaction changes receiver balance", async () => { + await expect(() => + wallet.sendTransaction({ to: walletTo.address, gasPrice: 0, value: 200 }) + ).to.changeBalance(walletTo, 200) + })
Line range hint
1110-1110
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```ts + it("Send transaction changes sender and receiver balances", async () => { + await expect(() => + wallet.sendTransaction({ to: walletTo.address, gasPrice: 0, value: 200 }) + ).to.changeBalances([wallet, walletTo], [-200, 200]) + })
Line range hint
1122-1122
: Consider using indented code blocks instead of fenced code blocks for consistency with the rest of the document.- ```ts + it("Send transaction changes sender and receiver balances", async () => { + await expect(() => + wallet.sendTransaction({ to: walletTo.address, gasPrice: 0, value: 200 }) + ).to.changeBalances([wallet, walletTo], [-200, 200]) + })
public/content/translations/zh/developers/tutorials/all-you-can-cache/index.md
Show resolved
Hide resolved
``` | ||
|
||
[大多数乐观解决方案代码都是依据 MIT 许可证发布的](https://help.optimism.io/hc/en-us/articles/4411908707995-What-software-license-does-Optimism-use-)。 | ||
|
||
```solidity | ||
实用性 >0.5.0 <0.9.0; | ||
pragma solidity >0.5.0 <0.9.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.
Update the Solidity version pragma for better compatibility.
- pragma solidity >0.5.0 <0.9.0;
+ pragma solidity ^0.8.9;
This change ensures that the code is compatible with the version used in the rest of the contracts, as indicated by the use of ^0.8.9
in other parts of the tutorial. It helps maintain consistency across the codebase.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
pragma solidity >0.5.0 <0.9.0; | |
pragma solidity ^0.8.9; |
@@ -1031,7 +1031,7 @@ | |||
|
|||
[IL2ERC20Bridge](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L2/messaging/IL2ERC20Bridge.sol) 接口与我们上面看到的[第一层等效](#IL1ERC20Bridge)接口非常相似。 有两个明显区别: |
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.
Correct the link fragment to ensure it points to the valid section.
- [IL2ERC20Bridge](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L2/messaging/IL2ERC20Bridge.sol)
+ [IL2ERC20Bridge](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L2/messaging/IL2ERC20Bridge.sol#IL1ERC20Bridge)
The link fragment should accurately point to the IL1ERC20Bridge
section to facilitate correct navigation within the document.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
[IL2ERC20Bridge](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L2/messaging/IL2ERC20Bridge.sol) 接口与我们上面看到的[第一层等效](#IL1ERC20Bridge)接口非常相似。 有两个明显区别: | |
[IL2ERC20Bridge](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L2/messaging/IL2ERC20Bridge.sol#IL1ERC20Bridge) 接口与我们上面看到的[第一层等效](#IL1ERC20Bridge)接口非常相似。 有两个明显区别: |
@@ -60,7 +60,7 @@ yarn add --dev ethereum-waffle ethers | |||
npm install ethereum-waffle ethers --save-dev | |||
``` | |||
|
|||
您的项目结构现在应该如下所示: | |||
你的项目结构现在应该如下所示: | |||
|
|||
``` |
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.
Specify the language for the fenced code block to improve readability and syntax highlighting.
- ```
+ ```bash
mkdir dynamic-mocking
cd dynamic-mocking
mkdir contracts src
yarn init
# or if you're using npm
npm init
<!-- This is an auto-generated comment by CodeRabbit -->
Description
This PR was automatically created to import Crowdin translations.
This workflows runs on the first of every month at 16:20 (UTC).
Thank you to everyone contributing to translate ethereum.org ❤️
Content buckets imported
1, 25, 27, 28
Markdown QA checker alerts
Unfold for 4 result(s)
Preview link
https://deploy-preview-12889--ethereumorg.netlify.app/zh/
Summary by CodeRabbit
Documentation Updates
Bug Fixes
New Features