Setting Up Your Environment Chinese Translation#1433
Conversation
| @@ -0,0 +1,481 @@ | |||
| --- | |||
| title: "搭建您的 p5.js 开发环境" | |||
| description: "一个快速教程,介绍如何配置 p5.js Web 编辑器和 VS Code,以便编写和保存您的代码。" | |||
There was a problem hiding this comment.
建议保留原文的 "p5.js projects",可改为:"一个快速教程,介绍如何设置 p5.js Web 编辑器和 VS Code,以便编写和保存 p5.js 项目。" 另外 "配置" 在此处不如 "设置" 自然。
| category: introduction | ||
| categoryIndex: 0 | ||
| featuredImage: ../images/featured/SetupA.jpg | ||
| featuredImageAlt: 一个在 p5.js 编辑器中随鼠标指针移动而在画布上绘制圆圈的交互式草图。 |
There was a problem hiding this comment.
语序稍拗口。"随鼠标指针移动而在画布上绘制圆圈" 建议改为 "随着鼠标指针移动在画布上绘制圆圈",更符合技术文档表达习惯。
| import EditableSketch from "../../../components/EditableSketch/index.astro"; | ||
| import Callout from "../../../components/Callout/index.astro"; | ||
|
|
||
|  |
There was a problem hiding this comment.
多个图片的 alt 文本仍为英文,建议统一翻译为中文(如本条可改为 "p5.js 和 Visual Studio Code 的 Logo"),以保持一致性和无障碍体验。
| 2. 一台台式电脑、笔记本电脑或Chromebook。 | ||
|
|
||
|
|
||
| ## 步骤 0:选择编码环境类型 |
There was a problem hiding this comment.
"编码环境" 在中文技术语境里不常用,建议改为 "开发环境" 或 "编程环境"。
|
|
||
|  | ||
|
|
||
| - 根据提示输入您的 Google 账号邮箱和密码 |
There was a problem hiding this comment.
漏译了原文中的 (if necessary),建议补充为:"按提示输入 Google 账号的邮箱和密码(如需要)"。
|
|
||
|  | ||
|
|
||
| - 根据提示输入您的 Github 账号邮箱和密码 |
There was a problem hiding this comment.
原文是 username and password,此处误译成了 "邮箱和密码",建议改为 "用户名和密码"。另外 "Github" 建议统一为 "GitHub"。
|
|
||
| 电脑屏幕是由被称为*像素*的微小光点组成的,这些光点是构成任何图像的最小单元。在预览窗口中创建画布的代码行是 [`createCanvas(400, 400)`](/reference/p5/createCanvas)。 没有这行代码,就没有可以绘画的画布!数字 400, 400 对应画布的宽度和高度(单位为像素)。这些数字也被称为[`createCanvas()`](/reference/p5/createCanvas)函数的*参数*。 | ||
|
|
||
| 放置在函数括号内的任何值都称为 *参数*: [`createCanvas()`](/reference/p5/createCanvas) 出现在 [`setup()`](/reference/p5/setup) 函数内部,用于创建一个可供绘制的 HTML 画布元素。 |
There was a problem hiding this comment.
漏译了原文 "any value used to customize functions" 这一整句,建议在冒号后补充:"用于自定义函数行为的任何值。"
| - 在 [`background()`](/reference/p5/background) 函数下方添加以下代码: | ||
|
|
||
| ```js | ||
| //在中心绘制一个宽度为 100 的圆 |
There was a problem hiding this comment.
- 后文解释此参数为 diameter(直径),"宽度" 不够准确,建议改为 "直径"。
- // 后建议统一加空格,与 VS Code 部分的注释格式保持一致。
|
|
||
| p5.js 拥有非常丰富的函数,可用于在画布中同时融入静态和交互式元素。 | ||
|
|
||
| - 将原本的背景和圆形命令替换为以下文本: |
There was a problem hiding this comment.
"原本" 偏口语;"文本" 不如 "代码" 准确;建议保留函数英文名,便于读者对照代码。可改为:"将原来的 background 和 circle 命令替换为以下代码:"
| 访问 [p5.js 参考文档](/reference/) 以了解更多 p5.js 函数,例如 [2D 基础形状](/reference/#Shape/)。 | ||
|
|
||
|
|
||
| ### 程序出错 |
There was a problem hiding this comment.
- 小标题 "程序出错" 建议简化为 "错误" 或 "程序错误",更简洁。
- 正文中 "程序漏洞" 在中文技术语境中通常指安全漏洞(security vulnerability),建议用 "bug" 或 "程序错误"。
- "规则被破坏" 语气过重,描述语法规则用 "被违反" 或 "被打破" 更自然。
| - 使用[这些资源](https://code.visualstudio.com/docs/getstarted/introvideos)探索 VS Code 的各项功能和多种配置选项。 | ||
|
|
||
|
|
||
| ### 步骤 2:安装 p5.js 库插件 |
There was a problem hiding this comment.
VS Code 官方中文界面将 extension 译为 "扩展","插件" 对应的是 plugin。建议改为 "安装 p5.js 库扩展"。
| 访问 [p5.js 参考文档](/reference/) 以了解更多 p5.js 函数,例如其他可以绘制的形状。 | ||
|
|
||
|
|
||
| ### 程序出错 |
There was a problem hiding this comment.
同 Web Editor 部分:1. 小标题建议简化为 "错误";2. "程序漏洞" 建议改为 "bug";3. "规则被违反" 比 "被破坏" 更自然。
There was a problem hiding this comment.
Hi @luciawang0901, thank you so much for this contribution! The Simplified Chinese translation of the "Setting Up Your Environment" tutorial is a great addition to the project. I've left a few inline review comments with some minor suggestions. Overall the quality is solid, and most of the notes are small wording or consistency improvements.
A couple of quick notes on process:
- If this PR is meant to close an existing issue (e.g., #1397), feel free to add
Resolves #1397to the PR description so it will be automatically closed when this is merged. - For future PRs, it's best practice to create a new branch in your fork instead of working directly on main — this helps keep things tidy and makes it easier to sync with upstream.
- Once a maintainer approves the workflow, please take a look at the lint and test results to see if any additional fixes are needed.
Let me know once you've had a chance to review the comments. Thanks again for your hard work!
Hi, I've translated setting-up-your-environment.mdx into Simplified Chinese. I'd really appreciate it if you could take a look and let me know if anything needs to be adjusted. Thanks so much for your time and help! @lirenjie95