Skip to content

Commit 9b12cf7

Browse files
author
Harry
authored
Translate the comments
1 parent a0c5749 commit 9b12cf7

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs-translations/zh-CN/tutorial/quick-start.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,30 @@ function createWindow() {
7070
});
7171
}
7272

73-
// This method will be called when Electron has finished
74-
// initialization and is ready to create browser windows.
75-
// Some APIs can only be used after this event occurs.
73+
// Electron 会在初始化后并准备
74+
// 创建浏览器窗口时,调用这个函数。
75+
// 部分 API 在 ready 事件触发后才能使用。
7676
app.on('ready', createWindow);
7777

78-
// Quit when all windows are closed.
78+
// 当全部窗口关闭时退出。
7979
app.on('window-all-closed', () => {
80-
// On macOS it is common for applications and their menu bar
81-
// to stay active until the user quits explicitly with Cmd + Q
80+
// macOS 上,除非用户用 Cmd + Q 确定地退出,
81+
// 否则绝大部分应用及其菜单栏会保持激活。
8282
if (process.platform !== 'darwin') {
8383
app.quit();
8484
}
8585
});
8686

8787
app.on('activate', () => {
88-
// On macOS it's common to re-create a window in the app when the
89-
// dock icon is clicked and there are no other windows open.
88+
// macOS 上,当点击 dock 图标并且该应用没有打开的窗口时,
89+
// 绝大部分应用会重新创建一个窗口。
9090
if (mainWindow === null) {
9191
createWindow();
9292
}
9393
});
9494

95-
// In this file you can include the rest of your app's specific main process
96-
// code. You can also put them in separate files and require them here.
95+
// 在这文件,你可以续写应用剩下主进程代码。
96+
// 也可以拆分成几个文件,然后用 require 导入。
9797
```
9898
最后,你想展示的 `index.html`
9999
```html
@@ -151,11 +151,11 @@ $ ./Electron.app/Contents/MacOS/Electron your-app/
151151
*注意:*运行时需要你的系统已经安装了 [Git][9][Node.js][10](包含 [npm][11])。
152152

153153
```bash
154-
# Clone the repository
154+
# 克隆这仓库
155155
$ git clone https://github.com/electron/electron-quick-start
156-
# Go into the repository
156+
# 进入仓库
157157
$ cd electron-quick-start
158-
# Install dependencies and run the app
158+
# 安装依赖库并运行应用
159159
$ npm install && npm start
160160
```
161161
[1]: https://github.com/electron/electron/blob/v1.1.3/docs/api/ipc-renderer.md

0 commit comments

Comments
 (0)