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

chore: import translations for zh #12889

Merged
merged 3 commits into from
May 3, 2024
Merged

chore: import translations for zh #12889

merged 3 commits into from
May 3, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 1, 2024

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

yarn markdown-checker
Unfold for 4 result(s)
  • Link text missing: public/content/translations/zh/developers/tutorials/erc20-with-safety-rails/index.md:144:3
  • Warning:

    tag in markdown at public/content/translations/zh/developers/tutorials/how-to-implement-an-erc721-market/index.md:72:66
  • Unexpected 'sidebar' frontmatter at public/content/translations/zh/developers/tutorials/testing-erc-20-tokens-with-waffle/index.md
  • Warning:

    tag in markdown at public/content/translations/zh/developers/tutorials/testing-erc-20-tokens-with-waffle/index.md:1139:41

Preview link

https://deploy-preview-12889--ethereumorg.netlify.app/zh/

Summary by CodeRabbit

  • Documentation Updates

    • Updated various tutorials with changes in tone from formal to informal to enhance readability and engagement.
    • Clarified instructions and descriptions across multiple tutorials, ensuring better understanding for developers.
    • Adjusted skill levels and tags to better match the content and audience expertise in smart contract and Ethereum development tutorials.
  • Bug Fixes

    • Corrected minor text inconsistencies and errors across several tutorials, improving the accuracy and professionalism of the documentation.
  • New Features

    • Enhanced tutorials with updated examples and clearer code comments to aid developers in better understanding the implementations.

Copy link

netlify bot commented May 1, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 2f6f5eb
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/6634d8910a493e0007062f62
😎 Deploy Preview https://deploy-preview-12889--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 51 (🟢 up 12 from production)
Accessibility: 92 (🔴 down 1 from production)
Best Practices: 95 (🔴 down 5 from production)
SEO: 95 (🔴 down 5 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@minimalsm
Copy link
Contributor

@coderabbitai review

@github-actions github-actions bot added content 🖋️ This involves copy additions or edits needs review 👀 translation 🌍 This is related to our Translation Program labels May 3, 2024
@minimalsm minimalsm self-assigned this May 3, 2024
Copy link
Contributor

coderabbitai bot commented May 3, 2024

Walkthrough

The 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

File Path Change Summary
.../all-you-can-cache/index.md Updated technical tags and clarified code comments.
.../calling-a-smart-contract-from-javascript/index.md Semantic changes focusing on DAI tokens and interaction clarity.
.../create-and-deploy-a-defi-app/index.md Changed pronouns from formal to informal; updated source URL.
.../deploying-your-first-smart-contract/index.md Tone change to informal; description updated.
.../getting-started-with-ethereum-development-using-alchemy/index.md Minor text adjustments; source changed to Medium.
.../guide-to-smart-contract-security-tools/index.md Updated technical tag from "智能合同" to "智能合约".
.../hello-world-smart-contract-fullstack/index.md Translation and clarity improvements; tag change.
.../how-to-mock-solidity-contracts-for-testing/index.md Updated language tags and simplified error messages in Solidity.
.../how-to-use-echidna-to-test-smart-contracts/index.md Language updates; skill level adjusted to advanced.
.../how-to-use-manticore-to-find-smart-contract-bugs/index.md Skill level adjusted to advanced.
.../how-to-use-slither-to-find-smart-contract-bugs/index.md Skill level adjusted to advanced; text modifications for clarity.
.../how-to-use-tellor-as-your-oracle/index.md Tone shift to informal; clarity improvements in prerequisites.
.../how-to-view-nft-in-metamask/index.md Tone shift to informal; minor text adjustments.
.../how-to-write-and-deploy-an-nft/index.md Description and tone updated to informal.
.../learn-foundational-ethereum-topics-with-sql/index.md Text content updates for consistency; formatting corrections.
.../merkle-proofs-for-offline-data-integrity/index.md Code comments and indentation adjustments for clarity.
.../monitoring-geth-with-influxdb-and-grafana/index.md Shift from formal to informal tone in various sections.
.../optimism-std-bridge-annotated-code/index.md Minor code annotation and event declaration adjustments.
.../sending-transactions-using-web3-and-alchemy/index.md File name change in tutorial context from index.js to sendTx.js.
.../set-up-web3js-to-use-ethereum-in-javascript/index.md Pronoun updates to informal; text adjustments for better engagement.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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: 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])
+     })

```

[大多数乐观解决方案代码都是依据 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;
Copy link
Contributor

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.

Suggested change
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)接口非常相似。 有两个明显区别:
Copy link
Contributor

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.

Suggested change
[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
```

您的项目结构现在应该如下所示
你的项目结构现在应该如下所示

```
Copy link
Contributor

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 -->

@minimalsm minimalsm merged commit 4d3eca2 into dev May 3, 2024
6 checks passed
@minimalsm minimalsm deleted the may-zh-20240501163050924 branch May 3, 2024 14:11
This was referenced May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 🖋️ This involves copy additions or edits translation 🌍 This is related to our Translation Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants