diff --git a/po/zh-cn.po b/po/zh-cn.po index ea7172567..27bbc6053 100644 --- a/po/zh-cn.po +++ b/po/zh-cn.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: The Starknet Book\n" -"POT-Creation-Date: 2023-10-13T08:44:11+09:00\n" -"PO-Revision-Date: 2023-10-14 07:30+0900\n" +"POT-Creation-Date: 2023-10-14T23:48:22+09:00\n" +"PO-Revision-Date: 2023-10-15 01:58+0900\n" "Last-Translator: y-bi \n" "Language-Team: Language zh-cn\n" "Language: zh_CN\n" @@ -57,164 +57,168 @@ msgstr "Starknet Devnet 🚧" msgid "Starknet-js: Javascript SDK" msgstr "Starknet-js: Javascript SDK" -#: src/SUMMARY.md:20 src/SUMMARY.md:46 src/ch02-07-01-examples.md:1 +#: src/SUMMARY.md:20 src/SUMMARY.md:47 src/ch02-07-01-examples.md:1 #: src/ch04-04-examples.md:1 msgid "Examples" msgstr "示例" #: src/SUMMARY.md:21 +msgid "Beginner - Counter UI" +msgstr "初学者 - 计数器 UI" + +#: src/SUMMARY.md:22 msgid "Beginner - ERC-20 UI" msgstr "初学者 - ERC-20 UI" -#: src/SUMMARY.md:22 +#: src/SUMMARY.md:23 msgid "Intermediate - Million Dollar Homepage" msgstr "中级 - 百万美元级别的主页" -#: src/SUMMARY.md:23 src/ch02-08-starknet-react.md:1 +#: src/SUMMARY.md:24 src/ch02-08-starknet-react.md:1 msgid "Starknet-React: React Integration" msgstr "Starknet-React: React 集成" -#: src/SUMMARY.md:24 src/ch02-09-starknet-py.md:1 +#: src/SUMMARY.md:25 src/ch02-09-starknet-py.md:1 msgid "Starknet-py: Python SDK 🚧" msgstr "Starknet-py: Python SDK 🚧" -#: src/SUMMARY.md:25 src/ch02-10-starknet-rs.md:1 +#: src/SUMMARY.md:26 src/ch02-10-starknet-rs.md:1 msgid "Starknet-rs: Rust SDK 🚧" msgstr "Starknet-rs: Rust SDK 🚧" -#: src/SUMMARY.md:26 src/ch02-11-foundry-forge.md:1 +#: src/SUMMARY.md:27 src/ch02-11-foundry-forge.md:1 msgid "Foundry Forge: Testing 🚧" msgstr "Foundry Forge: 测试工具 🚧" -#: src/SUMMARY.md:27 src/ch02-12-foundry-cast.md:1 +#: src/SUMMARY.md:28 src/ch02-12-foundry-cast.md:1 msgid "Foundry Cast: Interacting with Starknet 🚧" msgstr "Foundry Cast: 与 Starknet 交互🚧" -#: src/SUMMARY.md:29 src/ch03-00-architecture.md:1 +#: src/SUMMARY.md:30 src/ch03-00-architecture.md:1 msgid "Architecture" msgstr "架构" -#: src/SUMMARY.md:32 src/ch03-01-transactions.md:1 +#: src/SUMMARY.md:33 src/ch03-01-transactions.md:1 msgid "Transactions" msgstr "交易" -#: src/SUMMARY.md:33 src/ch03-00-architecture.md:53 src/ch03-02-sequencers.md:1 +#: src/SUMMARY.md:34 src/ch03-00-architecture.md:53 src/ch03-02-sequencers.md:1 msgid "Sequencers" msgstr "排序器" -#: src/SUMMARY.md:34 +#: src/SUMMARY.md:35 msgid "Provers 🚧" msgstr "证明器 🚧" -#: src/SUMMARY.md:35 +#: src/SUMMARY.md:36 msgid "Nodes 🚧" msgstr "节点 🚧" -#: src/SUMMARY.md:36 +#: src/SUMMARY.md:37 msgid "Layer 3 and App Chains 🚧 " msgstr "Layer 3 和应用链 🚧 " -#: src/SUMMARY.md:37 src/ch03-06-solidity-verifier.md:1 +#: src/SUMMARY.md:38 src/ch03-06-solidity-verifier.md:1 msgid "Solidity Verifier 🚧" msgstr "Solidity 验证器 🚧" -#: src/SUMMARY.md:38 src/ch03-07-decentralization.md:1 +#: src/SUMMARY.md:39 src/ch03-07-decentralization.md:1 msgid "Decentralization 🚧" msgstr "去中心化 🚧" -#: src/SUMMARY.md:40 src/ch04-00-account-abstraction.md:1 +#: src/SUMMARY.md:41 src/ch04-00-account-abstraction.md:1 msgid "Account Abstraction" msgstr "账户抽象" -#: src/SUMMARY.md:43 +#: src/SUMMARY.md:44 msgid "Accounts" msgstr "账户" -#: src/SUMMARY.md:44 +#: src/SUMMARY.md:45 msgid "Hello, Account! 🚧" msgstr "你好,账户!🚧" -#: src/SUMMARY.md:45 +#: src/SUMMARY.md:46 msgid "Standard AccounT 🚧" msgstr "标准账户 🚧" -#: src/SUMMARY.md:47 +#: src/SUMMARY.md:48 msgid "Multicaller 🚧" msgstr "Multicaller 🚧" -#: src/SUMMARY.md:48 +#: src/SUMMARY.md:49 msgid "Multisig 🚧" msgstr "多签 🚧" -#: src/SUMMARY.md:49 src/ch04-04-03-auto-payments.md:1 +#: src/SUMMARY.md:50 src/ch04-04-03-auto-payments.md:1 msgid "Auto-Payments 🚧" msgstr "自动付款 🚧" -#: src/SUMMARY.md:50 src/ch04-04-04-alternative-signature-schemes.md:1 +#: src/SUMMARY.md:51 src/ch04-04-04-alternative-signature-schemes.md:1 msgid "Alternative Signature Schemes 🚧" msgstr "替代签名方案 🚧" -#: src/SUMMARY.md:54 +#: src/SUMMARY.md:55 msgid "STARKs 🚧" msgstr "STARKs 🚧" -#: src/SUMMARY.md:55 +#: src/SUMMARY.md:56 msgid "Basics 🚧" msgstr "基础知识 🚧" -#: src/SUMMARY.md:56 +#: src/SUMMARY.md:57 msgid "Math Primer 🚧" msgstr "数学入门 🚧" -#: src/SUMMARY.md:57 +#: src/SUMMARY.md:58 msgid "Number Theory 🚧" msgstr "数论 🚧" -#: src/SUMMARY.md:58 +#: src/SUMMARY.md:59 msgid "Geometry 🚧" msgstr "几何 🚧" -#: src/SUMMARY.md:59 +#: src/SUMMARY.md:60 msgid "Cryptographic Primitives 🚧" msgstr "加密原语 🚧" -#: src/SUMMARY.md:60 +#: src/SUMMARY.md:61 msgid "Arithimization 🚧" msgstr "拟真 🚧" -#: src/SUMMARY.md:61 +#: src/SUMMARY.md:62 msgid "Low Degree Testing 🚧" msgstr "低度测试 🚧" -#: src/SUMMARY.md:62 +#: src/SUMMARY.md:63 msgid "FRI Protocol 🚧" msgstr "FRI 协议 🚧" -#: src/SUMMARY.md:63 +#: src/SUMMARY.md:64 msgid "Efficient STARKs" msgstr "高效 STARKs" -#: src/SUMMARY.md:64 +#: src/SUMMARY.md:65 msgid "STARKs Protocol (Python) 🚧" msgstr "STARKs 协议(Python) 🚧" -#: src/SUMMARY.md:65 src/SUMMARY.md:70 +#: src/SUMMARY.md:66 src/SUMMARY.md:71 msgid "Trace/Low Degree Extension 🚧" msgstr "追迹/低度 扩展 🚧" -#: src/SUMMARY.md:66 src/SUMMARY.md:71 +#: src/SUMMARY.md:67 src/SUMMARY.md:72 msgid "Constraints 🚧" msgstr "约束 🚧" -#: src/SUMMARY.md:67 src/SUMMARY.md:72 +#: src/SUMMARY.md:68 src/SUMMARY.md:73 msgid "FRI Commitments 🚧" msgstr "FRI 承诺 🚧" -#: src/SUMMARY.md:68 src/SUMMARY.md:73 +#: src/SUMMARY.md:69 src/SUMMARY.md:74 msgid "Query Phase 🚧" msgstr "查询阶段 🚧" -#: src/SUMMARY.md:69 +#: src/SUMMARY.md:70 msgid "STARKs Protocol (Rust) 🚧" msgstr "STARKs 协议(Rust) 🚧" @@ -350,7 +354,7 @@ msgid "" "Starknet from scratch, follow the book in its entirety, starting with " "**Introduction to Starknet**." msgstr "" -"如果你是一个 **完全的初学者** ,想从头开始学习Cairo和星际网络,请从**介绍" +"如果你是一个 **完全的初学者** ,想从头开始学习Cairo和Starknet,请从**介绍" "Starknet**开始,完整地阅读本书。" #: src/title-page.md:45 @@ -2741,7 +2745,6 @@ msgid "" msgstr "恭喜您!您已成功部署Starknet合约并与之交互。" #: src/ch02-03-scarb.md:12 -#, fuzzy msgid "" "Scarb is Cairo’s package manager designed for both Cairo and Starknet " "projects. It handles dependencies, compiles projects, and integrates with " @@ -2753,119 +2756,102 @@ msgstr "" "打造。" #: src/ch02-03-scarb.md:17 -#, fuzzy msgid "Scarb Workflow" msgstr "Scarb 工作流程" #: src/ch02-03-scarb.md:19 -#, fuzzy msgid "Follow these steps to develop a Starknet contract using Scarb:" -msgstr "请按照以下步骤使用 Scarb 制定Starknet合约:" +msgstr "请按照以下步骤使用 Scarb 来开发Starknet合约:" #: src/ch02-03-scarb.md:21 -#, fuzzy msgid "" "**Initialize:** Use `scarb new` to set up a new project, generating a `Scarb." "toml` file and initial `src/lib.cairo`." msgstr "" -"**初始化:** 使用 `scarb new` 建立一个新项目,生成一个 `Scarb.toml` 文件和初" -"始 `src/lib.cairo` 文件。" +"**初始化:** 使用 `scarb new` 建立一个新项目,生成一个 `Scarb.toml` 文件和初始" +"的 `src/lib.cairo` 文件。" #: src/ch02-03-scarb.md:24 -#, fuzzy msgid "**Code:** Add your Cairo code in the `src` directory." msgstr "**代码:** 在`src`目录下添加你的Cairo代码。" #: src/ch02-03-scarb.md:26 -#, fuzzy msgid "**Dependencies:** Add external libraries using `scarb add`." msgstr "**依赖关系:** 使用 `scarb add` 添加外部库。" #: src/ch02-03-scarb.md:28 -#, fuzzy msgid "" "**Compile:** Execute `scarb build` to convert your contract into Sierra code." msgstr "**编译:** 执行 `scarb build` 将合约转换为 Sierra 代码。" #: src/ch02-03-scarb.md:31 -#, fuzzy msgid "" "Scarb simplifies your development workflow, making it efficient and " "streamlined." msgstr "Scarb 简化了您的开发工作流程,使其高效、精简。" #: src/ch02-03-scarb.md:36 -#, fuzzy msgid "" "Scarb is cross-platform, supporting macOS, Linux, and Windows. For " "installation, refer to the [Chapter 1 setup guide](https://book.starknet.io/" "chapter_1/environment_setup.html#the_scarb_package_manager_installation)." msgstr "" -"Scarb 可跨平台运行,支持 macOS、Linux 和 Windows。有关安装,请参阅[第 1 章安装" -"指南](https://book.starknet.io/chapter_1/environment_setup." +"Scarb 可跨平台运行,支持 macOS、Linux 和 Windows。有关安装,请参阅 [第1章的安" +"装指南](https://book.starknet.io/chapter_1/environment_setup." "html#the_scarb_package_manager_installation)。" #: src/ch02-03-scarb.md:40 -#, fuzzy msgid "Cairo Project Structure" msgstr "Cairo项目结构" #: src/ch02-03-scarb.md:42 -#, fuzzy msgid "Next, we’ll dive into the key components that make up a Cairo project." msgstr "接下来,我们将深入探讨Cairo项目的关键组成部分。" #: src/ch02-03-scarb.md:44 -#, fuzzy msgid "Cairo Packages" -msgstr "Cairo套餐" +msgstr "Cairo 包" #: src/ch02-03-scarb.md:46 -#, fuzzy msgid "" "Cairo packages, also referred to as \"crates\" in some contexts, are the " "building blocks of a Cairo project. Each package must follow several rules:" msgstr "" -"Cairo 包在某些情况下也被称为 \"板条箱\",是 Cairo 项目的组成部分。每个软件包都" -"必须遵循几条规则:" +"Cairo 包在某些情况下也被称为 \"crate\",是 Cairo 项目的组成部分。每个包都必须" +"遵循几条规则:" #: src/ch02-03-scarb.md:50 -#, fuzzy msgid "" "A package must include a `Scarb.toml` file, which is Scarb’s manifest file. " "It contains the dependencies for your package." msgstr "" -"软件包必须包含一个 `Scarb.toml` 文件,它是 Scarb 的清单文件。它包含软件包的依" -"赖项。" +"包必须包含一个 `Scarb.toml` 文件,它是 Scarb 的清单文件。它包含软件包的依赖" +"项。" #: src/ch02-03-scarb.md:53 -#, fuzzy msgid "" "A package must include a `src/lib.cairo` file, which is the root of the " "package tree. It allows you to define functions and declare used modules." msgstr "" -"软件包必须包含一个 `src/lib.cairo` 文件,它是软件包树的根。它允许你定义函数和" +"包必须包含一个 `src/lib.cairo` 文件,它是包的树形结构的根。它允许你定义函数和" "声明使用的模块。" #: src/ch02-03-scarb.md:57 -#, fuzzy msgid "" "Package structures might look like the following case where we have a package " "named `my_package`, which includes a `src` directory with the `lib.cairo` " "file inside, a `snips` directory which in itself a package we can use, and a " "`Scarb.toml` file in the top-level directory." msgstr "" -"软件包结构可能如下所示:我们有一个名为 \"my_package \"的软件包,其中包括一个包" -"含 \"lib.cairo \"文件的 \"src \"目录、一个本身就是我们可以使用的软件包的 " -"\"snips \"目录和一个位于顶层目录的 \"Scarb.toml \"文件。" +"软件包结构可能如下所示:我们有一个名为 `my_package`的包,其中包括一个包含`lib." +"cairo` 文件的 `src` 目录、一个本身就是我们可以使用的软件包的 `snips`目录和一个" +"位于顶层目录的`Scarb.toml`文件。" #: src/ch02-03-scarb.md:73 -#, fuzzy msgid "Within the `Scarb.toml` file, you might have:" -msgstr "在 `Scarb.toml` 文件中,可能有" +msgstr "在 `Scarb.toml` 文件中,可能有:" #: src/ch02-03-scarb.md:75 -#, fuzzy msgid "" "```\n" "[package]\n" @@ -2878,39 +2864,35 @@ msgid "" "```" msgstr "" "```\n" -"[软件包]\n" +"[package]\n" "name = \"my_package\"\n" -"版本 = \"0.1.0\"\n" +"version = \"0.1.0\"\n" "\n" -"[依赖项]\n" -"Starknet = \">=2.0.1\"\n" +"[dependencies]\n" +"starknet = \">=2.0.1\"\n" "snips = { path = \"snips\" }\n" "```" #: src/ch02-03-scarb.md:83 -#, fuzzy msgid "" "Here starknet and snips are the dependencies of the package. The `starknet` " "dependency is hosted on the Scarb registry (we do not need to download it), " "while the `snips` dependency is located in the `snips` directory." msgstr "" -"这里的 starknet 和 snips 是软件包的依赖项。starknet \"依赖项位于 Scarb 注册表" -"中(我们无需下载),而 \"snips \"依赖项位于 \"snips \"目录中。" +"这里的 `starknet` 和 `snips` 是软件包的依赖项。`starknet` 依赖项位于 Scarb 注" +"册表中(我们无需下载),而 `snips`依赖项位于 `snips`目录中。" #: src/ch02-03-scarb.md:88 -#, fuzzy msgid "Setting Up a Project with Scarb" msgstr "使用 Scarb 设置项目" #: src/ch02-03-scarb.md:90 -#, fuzzy msgid "" "To create a new project using Scarb, navigate to your desired project " "directory and execute the following command:" msgstr "要使用 Scarb 创建新项目,请导航到所需的项目目录并执行以下命令:" #: src/ch02-03-scarb.md:95 -#, fuzzy msgid "" "This command will create a new project directory named `hello_scarb`, " "including a `Scarb.toml` file, a `src` directory with a `lib.cairo` file " @@ -2921,7 +2903,6 @@ msgstr "" "的 Git 仓库。" #: src/ch02-03-scarb.md:104 -#, fuzzy msgid "" "Upon opening `Scarb.toml` in a text editor, you should see something similar " "to the code snippet below:" @@ -2929,7 +2910,6 @@ msgstr "" "在文本编辑器中打开`Scarb.toml`后,您应该会看到与下面代码片段类似的内容:" #: src/ch02-03-scarb.md:107 -#, fuzzy msgid "" "```\n" "[package]\n" @@ -2943,28 +2923,25 @@ msgid "" "```" msgstr "" "```\n" -"[软件包]\n" +"[package]\n" "name = \"hello_scarb\"\n" -"版本 = \"0.1.0\"\n" +"version = \"0.1.0\"\n" "\n" -"# 查看更多关键字及其定义,请访问 https://docs.swmansion.com/scarb/docs/" -"reference/manifest.html\n" -"[依赖项]\n" +"# See more keys and their definitions at https://docs.swmansion.com/scarb/" +"docs/reference/manifest.html\n" +"[dependencies]\n" "# foo = { path = \"vendor/foo\" }\n" "```" #: src/ch02-03-scarb.md:115 -#, fuzzy msgid "Building a Scarb Project" -msgstr "### 编译Scarb项目" +msgstr "编译Scarb项目" #: src/ch02-03-scarb.md:117 -#, fuzzy msgid "Clear all content in `src/lib.cairo` and replace with the following:" -msgstr "清除 `src/lib.cairo` 中的所有内容,并替换为以下内容:" +msgstr "删除 `src/lib.cairo` 中的所有内容,并替换为以下内容:" #: src/ch02-03-scarb.md:119 -#, fuzzy msgid "" "```\n" "// src/lib.cairo\n" @@ -2973,18 +2950,15 @@ msgid "" msgstr "" "```\n" "// src/lib.cairo\n" -"mod hello_scarb;\n" +"mod hello_scarb;\n" "```" #: src/ch02-03-scarb.md:122 -#, fuzzy msgid "" "Next, create a new file titled `src/hello_scarb.cairo` and add the following:" -msgstr "" -"接下来,创建一个名为 \"src/hello_scarb.cairo \"的新文件,并添加以下内容:" +msgstr "接下来,创建一个名为 `src/hello_scarb.cairo` 的新文件,并添加以下内容:" #: src/ch02-03-scarb.md:125 -#, fuzzy msgid "" "```\n" "// src/hello_scarb.cairo\n" @@ -2996,14 +2970,13 @@ msgid "" msgstr "" "```\n" "// src/hello_scarb.cairo\n" -"使用 debug::PrintTrait;\n" +"use debug::PrintTrait;\n" "fn main() {\n" -" 你好,斯卡布!'.print();\n" +" 'Hello, Scarb!'.print();\n" "}\n" "```" #: src/ch02-03-scarb.md:131 -#, fuzzy msgid "" "In this instance, the `lib.cairo` file contains a module declaration " "referencing _hello_scarb_, which includes the _hello_scarb.cairo_ file’s " @@ -3011,25 +2984,22 @@ msgid "" "please refer to the subchapter on [imports in Chapter 2](https://book." "starknet.io/chapter_2/imports.html)." msgstr "" -"在这个例子中,`lib.cairo`文件包含了引用_hello_scarb_的模块声明,其中包含了" -"_hello_scarb.cairo_文件的实现。有关模块、导入和`lib.cairo`文件的更多信息,请参" -"阅[第2章中的导入]分章(https://book.starknet.io/chapter_2/imports.html)。" +"在这个例子中,`lib.cairo`文件包含了引用 _hello_scarb_ 的模块声明,其中包含了 " +"_hello_scarb.cairo_ 文件的实现。有关模块、导入和`lib.cairo`文件的更多信息,请" +"参阅[第2章里的 导入 ](https://book.starknet.io/chapter_2/imports.html)。" #: src/ch02-03-scarb.md:137 -#, fuzzy msgid "" "Scarb mandates that your source files be located within the `src` directory." -msgstr "Scarb 要求源文件位于 `src` 目录中。" +msgstr "Scarb 要求代码源文件应位于 `src` 目录中。" #: src/ch02-03-scarb.md:140 -#, fuzzy msgid "" "To build (compile) your project from your `hello_scarb` directory, use the " "following command:" msgstr "要在 `hello_scarb` 目录中构建(编译)项目,请使用以下命令:" #: src/ch02-03-scarb.md:145 -#, fuzzy msgid "" "This command compiles your project and produces the Sierra code in the " "`target/dev/hello_scarb.sierra` file. Sierra serves as an intermediate layer " @@ -3044,19 +3014,16 @@ msgstr "" "under-the-hood-of-cairo-1-0-exploring-sierra-7f32808421f5/)。" #: src/ch02-03-scarb.md:151 -#, fuzzy msgid "" "To remove the build artifacts and delete the target directory, use the `scarb " "clean` command." -msgstr "要移除构建工件并删除目标目录,请使用 `scarb clean` 命令。" +msgstr "要移除编译成果并删除目标目录,请使用 `scarb clean` 命令。" #: src/ch02-03-scarb.md:154 -#, fuzzy msgid "Adding Dependencies" msgstr "添加依赖项" #: src/ch02-03-scarb.md:156 -#, fuzzy msgid "" "Scarb facilitates the seamless management of dependencies for your Cairo " "packages. Here are two methods to add dependencies to your project:" @@ -3065,22 +3032,19 @@ msgstr "" "方法:" #: src/ch02-03-scarb.md:159 -#, fuzzy msgid "Edit Scarb.toml File" msgstr "编辑 Scarb.toml 文件" #: src/ch02-03-scarb.md:161 -#, fuzzy msgid "" "Open the Scarb.toml file in your project directory and locate the " "`[dependencies]` section. If it doesn’t exist, add it. To include a " "dependency hosted on a Git repository, use the following format:" msgstr "" -"打开项目目录中的 Scarb.toml 文件,找到\"[依赖项]\"部分。如果不存在,请添加。要" -"包含托管在 Git 仓库中的依赖项,请使用以下格式:" +"打开项目目录中的 Scarb.toml 文件,找到`[dependencies]`部分。如果不存在,请添" +"加。要包含托管在 Git 仓库中的依赖项,请使用以下格式:" #: src/ch02-03-scarb.md:165 -#, fuzzy msgid "" "```\n" "[dependencies]\n" @@ -3089,22 +3053,20 @@ msgid "" "```" msgstr "" "```\n" -"[依赖项]\n" +"[dependencies]\n" "alexandria_math = { git = \"https://github.com/keep-starknet-strange/" "alexandria.git\" }\n" "```" #: src/ch02-03-scarb.md:168 -#, fuzzy msgid "" "For consistency, it’s recommended to pin Git dependencies to specific " "commits. This can be done by adding the `rev` field with the commit hash:" msgstr "" -"为保持一致性,建议将 Git 依赖项固定在特定提交上。这可以通过添加带有提交哈希值" -"的 `rev` 字段来实现:" +"为保持一致性,建议将 Git 依赖项固定在某个特定提交上。这可以通过添加带有提交哈" +"希值的 `rev` 字段来实现:" #: src/ch02-03-scarb.md:172 -#, fuzzy msgid "" "```\n" "[dependencies]\n" @@ -3113,30 +3075,26 @@ msgid "" "```" msgstr "" "```\n" -"[依赖项]\n" +"[dependencies]\n" "alexandria_math = { git = \"https://github.com/keep-starknet-strange/" "alexandria.git\", rev = \"81bb93c\" }\n" "```" #: src/ch02-03-scarb.md:175 -#, fuzzy msgid "After adding the dependency, remember to save the file." -msgstr "添加依赖关系后,记得保存文件。" +msgstr "添加依赖项后,记得保存文件。" #: src/ch02-03-scarb.md:177 -#, fuzzy msgid "Use the scarb add Command" msgstr "使用 scarb add 命令" #: src/ch02-03-scarb.md:179 -#, fuzzy msgid "" "Alternatively, you can use the `scarb add` command to add dependencies to " "your project. Open your terminal and execute the following command:" msgstr "您也可以使用 `scarb add` 命令为项目添加依赖项。打开终端并执行以下命令:" #: src/ch02-03-scarb.md:182 -#, fuzzy msgid "" "```\n" "$ scarb add alexandria_math --git https://github.com/keep-starknet-strange/" @@ -3149,48 +3107,41 @@ msgstr "" "```" #: src/ch02-03-scarb.md:184 -#, fuzzy msgid "" "This command will add the alexandria_math dependency from the specified Git " "repository to your project." -msgstr "这条命令会将指定 Git 仓库中的 alexandria_math 依赖关系添加到项目中。" +msgstr "这条命令会将指定 Git 仓库中的 alexandria_math 外部依赖项添加到项目中。" #: src/ch02-03-scarb.md:187 -#, fuzzy msgid "To remove a dependency, you can use the `scarb rm` command." -msgstr "要删除依赖关系,可以使用 `scarb rm` 命令。" +msgstr "要删除依赖项,可以使用 `scarb rm` 命令。" #: src/ch02-03-scarb.md:189 -#, fuzzy msgid "" "Once a dependency is added, the Scarb.toml file will be automatically updated " "with the new dependency information." -msgstr "一旦添加了依赖关系,Scarb.toml 文件就会自动更新,加入新的依赖关系信息。" +msgstr "一旦添加了依赖项,Scarb.toml 文件就会自动更新,加入新的依赖项信息。" #: src/ch02-03-scarb.md:192 -#, fuzzy msgid "Using Dependencies in Your Code" -msgstr "在代码中使用依赖关系" +msgstr "在代码中使用依赖项" #: src/ch02-03-scarb.md:194 -#, fuzzy msgid "" "After dependencies are added to your project, you can start utilizing them in " "your Cairo code." msgstr "将依赖项添加到项目中后,就可以开始在 Cairo 代码中使用它们了。" #: src/ch02-03-scarb.md:197 -#, fuzzy msgid "" "For example, let’s assume you have added the alexandria_math dependency. Now, " "you can import and utilize functions from the alexandria_math library in your " "`src/hello_scarb.cairo` file:" msgstr "" -"例如,假设你已经添加了 alexandria_math 依赖关系。现在,你可以在你的 `src/" +"例如,假设你已经添加了 alexandria_math 依赖项。现在,你可以在你的 `src/" "hello_scarb.cairo` 文件中导入并使用 alexandria_math 库中的函数:" #: src/ch02-03-scarb.md:201 -#, fuzzy msgid "" "```\n" "// src/hello_scarb.cairo\n" @@ -3203,7 +3154,7 @@ msgid "" msgstr "" "```\n" "// src/hello_scarb.cairo\n" -"使用 alexandria_math::fibonacci;\n" +"use alexandria_math::fibonacci;\n" "\n" "fn main() -> felt252 {\n" " fibonacci::fib(0, 1, 10)\n" @@ -3211,7 +3162,6 @@ msgstr "" "```" #: src/ch02-03-scarb.md:208 -#, fuzzy msgid "" "In the above example, we import the fibonacci function from the " "alexandria_math library and utilize it in the main function." @@ -3220,67 +3170,59 @@ msgstr "" "使用了它。" #: src/ch02-03-scarb.md:211 -#, fuzzy msgid "Scarb Cheat Sheet" -msgstr "斯卡布小抄" +msgstr "Scarb Cheat Sheet" #: src/ch02-03-scarb.md:213 -#, fuzzy msgid "" "Here’s a quick cheat sheet of some of the most commonly used Scarb commands:" -msgstr "下面是一些最常用的 Scarb 命令的快速小抄:" +msgstr "下面是一些最常用的 Scarb 命令的cheat sheet:" #: src/ch02-03-scarb.md:216 -#, fuzzy msgid "" "`scarb new `: Initialize a new project with the given project " "name." -msgstr "`scarb new `:用给定的项目名称初始化一个新项目。" +msgstr "`scarb new `: 用给定的项目名称初始化一个新项目。" #: src/ch02-03-scarb.md:219 -#, fuzzy msgid "`scarb build`: Compile your Cairo code into Sierra code." -msgstr "编译将 Cairo 代码编译成 Sierra 代码。" +msgstr "`scarb build`: 编译将 Cairo 代码编译成 Sierra 代码。" #: src/ch02-03-scarb.md:221 -#, fuzzy msgid "" "`scarb add --git `: Add a dependency to your project " "from a specified Git repository." msgstr "" -"`scarb add --git`:从指定的 Git 仓库向项目添加依赖关" -"系。" +"`scarb add --git `: 从指定的 Git 仓库向项目添加依赖" +"项。" #: src/ch02-03-scarb.md:224 -#, fuzzy msgid "`scarb rm `: Remove a dependency from your project." -msgstr "`scarb rm`:从项目中移除一个依赖项。" +msgstr "`scarb rm `: 从项目中移除一个依赖项。" #: src/ch02-03-scarb.md:226 -#, fuzzy msgid "" "`scarb run