Skip to content

docs(zh): sync to d842b6f #2244

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

Merged
merged 10 commits into from
Jun 11, 2024
Merged

docs(zh): sync to d842b6f #2244

merged 10 commits into from
Jun 11, 2024

Conversation

Jinjiang
Copy link
Member

@Jinjiang Jinjiang commented May 21, 2024

Update the Chinese docs
35a9c1b...d842b6f

Copy link

netlify bot commented May 21, 2024

Deploy Preview for vue-router ready!

Name Link
🔨 Latest commit 1742d59
🔍 Latest deploy log https://app.netlify.com/sites/vue-router/deploys/665cf9a933f16d0008f4c817
😎 Deploy Preview https://deploy-preview-2244--vue-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@posva
Copy link
Member

posva commented May 26, 2024

Feel free to merge when you think it's ready @Jinjiang !

@@ -116,6 +110,10 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
text: '路由组件传参',
link: '/zh/guide/essentials/passing-props.html',
},
{
text: '活跃的链接',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我们之前翻译 activeClass 应该用的是“匹配”?

Comment on lines 103 to 112
// 解析出来的路由对象
route,
// 用在链接里的 href
href,
// 布尔类型的 ref 标识链接是否匹配当前路由
isActive,
// 布尔类型的 ref 标识链接是否严格匹配当前路由
isExactActive,
// 导航至该链接的函数
navigate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里都缺缩进是原文也有问题吗

@@ -39,35 +86,36 @@ export default {
}
},
created() {
// watch 路由的参数,以便再次获取数据
// 监听路由的参数,以便再次获取数据
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

根据翻译约定,watch/observe 都是“侦听”。

@@ -198,7 +198,28 @@ const routes = [
]
```

请注意,你也可以通过使用[路径 meta 字段](./meta.md)和全局导航守卫来实现类似的行为。
当配合[嵌套路由](../essentials/nested-routes)使用时,父路由和子路由都可以使用 `beforeEnter`。如果放在父级路由上,路径在具有相同父级的子路由之间移动时不会被触发。例如:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里和下面的 route 要翻译成“路径”吗?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

route 应该还是翻译成“路由”,我改一下

示例中的 `beforeEnter` 在 `/user/list` 和 `/user/details` 之间移动时不会被调用,因为它们共享相同的父级路由。如果我们直接将 `beforeEnter` 守卫放在 `details` 路由上,那么在这两个路由之间移动时就会被调用。

::: tip
你也可以通过使用[路径 meta 字段](./meta.md)和全局导航守卫来实现类似的行为。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

route meta fields 是不是应该要翻译成“路由元信息字段”?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,我觉得可以翻译成“元信息”

@Jinjiang
Copy link
Member Author

Jinjiang commented Jun 2, 2024

@Justineo 已全部更新,麻烦再看一下🙏

@Jinjiang Jinjiang merged commit 50ac702 into main Jun 11, 2024
4 checks passed
@Jinjiang Jinjiang deleted the docs/zh/sync branch June 11, 2024 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants