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

[完成翻译] src/content/cookbook/effects/staggered-menu-animation.md #1501

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peter8015
Copy link

请点击「Preview」选择提交 PR 的模板

@AmosHuKe
Copy link
Member

Resolve #1176

@AmosHuKe AmosHuKe changed the title https://github.com/cfug/flutter.cn/issues/1176 [完成翻译] src/content/cookbook/effects/staggered-menu-animation.md Sep 28, 2024
Copy link
Member

@AmosHuKe AmosHuKe left a comment

Choose a reason for hiding this comment

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

@peter8015 感谢你的贡献 😄!
以下存在一些格式问题和翻译建议(可以讨论修改)。

@@ -19,20 +19,25 @@ but the animations overlap to create a shorter duration.
In this recipe, you build a drawer menu with animated
content that is staggered and has a button that pops
in at the bottom.
一个应用的单个屏幕可能包含多个动画。所有动画同时播放可能会显得过于混乱。而依次播放动画又可能花费太长时间。更好的选择是**错开动画**的播放时间。每个动画在不同的时间开始,但这些动画会重叠播放,从而缩短整体持续时间。在这个示例中,你将构建一个带有动画内容的抽屉菜单,动画会错开播放,并且底部会有一个弹出的按钮。
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行,过长的文本需要换行
  • 部分翻译建议
Suggested change
一个应用的单个屏幕可能包含多个动画。所有动画同时播放可能会显得过于混乱。而依次播放动画又可能花费太长时间。更好的选择是**错开动画**的播放时间。每个动画在不同的时间开始,但这些动画会重叠播放,从而缩短整体持续时间。在这个示例中,你将构建一个带有动画内容的抽屉菜单,动画会错开播放,并且底部会有一个弹出的按钮。
一个应用的单个屏幕可能包含多个动画。
所有动画同时播放可能会显得过于混乱。
而依次播放动画又可能花费太长时间。
更好的选择是错开动画的播放时间。
每个动画在不同的时间开始,
但这些动画会重叠播放,从而缩短整体持续时间。
在这个示例中,你将构建一个带有动画内容的抽屉菜单,
动画会交错播放,并且底部会有一个弹出的按钮。


The following animation shows the app's behavior:
以下动画展示了应用的行为:
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行
Suggested change
以下动画展示了应用的行为:
以下动画展示了应用的行为:


![Staggered Menu Animation Example](/assets/images/docs/cookbook/effects/StaggeredMenuAnimation.gif){:.site-mobile-screenshot}

## Create the menu without animations
## 创建没有动画的菜单
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行
Suggested change
## 创建没有动画的菜单
## 创建没有动画的菜单


The drawer menu displays a list of titles,
followed by a Get started button at
the bottom of the menu.
抽屉菜单显示了一系列标题,菜单底部有一个“开始使用”按钮。
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行,过长的文本需要换行
  • 应用内的特定文本不进行翻译
Suggested change
抽屉菜单显示了一系列标题,菜单底部有一个“开始使用”按钮。
抽屉菜单显示了一系列标题,
菜单底部有一个 “Get started” 按钮。


Define a stateful widget called `Menu`
that displays the list and button
in static locations.
定义一个名为 `Menu` 的有状态小部件,该小部件在静态位置显示列表和按钮。
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行,过长的文本需要换行
  • 部分常用代码名词不翻译
  • 部分翻译建议
Suggested change
定义一个名为 `Menu` 的有状态小部件,该小部件在静态位置显示列表和按钮。
定义一个名为 `Menu` 的 stateful widget,
该 widget 在固定位置显示列表和按钮。

@@ -274,10 +296,13 @@ void initState() {

Each list item slides from right to left and
fades in at the same time.
每个列表项从右到左滑动,同时淡入。
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行
  • 部分翻译建议
Suggested change
每个列表项从右到左滑动,同时淡入。
每个列表项从右到左滑动的同时逐渐淡入。


Use the list item's `Interval` and an `easeOut`
curve to animate the opacity and translation
values for each list item.
使用列表项的 `Interval` 和 `easeOut` 曲线来为每个列表项的透明度和位移值进行动画处理。
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行,过长的文本需要换行
  • 部分翻译建议
Suggested change
使用列表项的 `Interval``easeOut` 曲线来为每个列表项的透明度和位移值进行动画处理。
使用列表项的 `Interval``easeOut` 曲线 (curve)
来为每个列表项的不透明度和位移值进行动画处理。

@@ -323,6 +348,7 @@ List<Widget> _buildListItems() {
Use the same approach to animate the opacity and
scale of the bottom button. This time, use an
`elasticOut` curve to give the button a springy effect.
使用相同的方法来为底部按钮的透明度和缩放进行动画处理。这次,使用 elasticOut 曲线为按钮提供弹性效果。
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行,过长的文本需要换行
  • elasticOut 需要使用原文的标记符号 xxx
  • 部分翻译建议
Suggested change
使用相同的方法来为底部按钮的透明度和缩放进行动画处理。这次,使用 elasticOut 曲线为按钮提供弹性效果。
使用相同的方法来为底部按钮的不透明度和缩放比例进行动画处理。
这次,使用 `elasticOut` 曲线 (curve) 为按钮提供弹性效果。

Comment on lines +401 to +403
恭喜!

您有一个动画菜单,其中每个列表项的出现都是交错的,然后是一个弹出到位的底部按钮。
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行,过长的文本需要换行,清理中间多余的换行
  • 根据 格式要求,文档中的「您」使用「你」,以表示与开发者平等沟通的意味。
  • 部分翻译建议
Suggested change
恭喜!
您有一个动画菜单,其中每个列表项的出现都是交错的,然后是一个弹出到位的底部按钮。
恭喜!
你有了一个动画菜单,
每个列表项都是交错出现的,
接着底部的按钮会弹出显示。


## Interactive example
## 交互示例
Copy link
Member

Choose a reason for hiding this comment

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

  • 译文与原文之间需要换行
Suggested change
## 交互示例
## 交互示例

@AmosHuKe AmosHuKe added the PRI: 待修改 Reviewers 请求了内容修改。 label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PRI: 待修改 Reviewers 请求了内容修改。 Status: 校对已认领
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No. 195 - Create a staggered menu animation - 创建一个交错效果的侧边栏菜单
2 participants