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

translation: tutorial/if.md #71

Merged
merged 3 commits into from
Oct 30, 2018
Merged

translation: tutorial/if.md #71

merged 3 commits into from
Oct 30, 2018

Conversation

harttle
Copy link
Member

@harttle harttle commented Oct 20, 2018

working on #65

@harttle harttle requested a review from errorrik October 20, 2018 16:42
@@ -8,43 +8,43 @@ categories:
s-if
------

通过 **s-if** 指令,我们可以为元素指定条件。当条件成立时元素可见,当条件不成立时元素不存在。
**s-if** directive can be used for conditional rendering. The element will be rendered if and only if the condition is evaluated as true.
Copy link
Collaborator

Choose a reason for hiding this comment

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

is evaluated as true -> evaluates to


```html
<span s-if="isOK">Hello San!</span>
```

**s-if** 指令的值可以是任何类型的[表达式](../template/#表达式)。
The [expression](../template/#Expression) for **s-if** can be of any type.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The s-if directive can contain any type of expression

Copy link
Collaborator

Choose a reason for hiding this comment

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

当前的这个翻译,给人的感觉是“if的表达式可以返回任何类型”,和上面的“要boolean”有点冲突


s-elif
------

`> 3.2.3`

**s-elif** 指令可以给 **s-if** 增加一个额外条件分支块。**s-elif** 指令的值可以是任何类型的[表达式](../template/#表达式)。
**s-elif** directive can be used to add a conditional branch for **s-if**. The [expression](../template/#Expression) for **s-elif** can be of any type.
Copy link
Collaborator

Choose a reason for hiding this comment

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

conditional branch -> condition branch

Copy link
Collaborator

Choose a reason for hiding this comment

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

后面半句同上

@harttle harttle changed the base branch from feature-i18n to master October 23, 2018 13:00
@andycall andycall mentioned this pull request Oct 25, 2018
54 tasks
@otakustay otakustay merged commit ce9a7b0 into baidu:master Oct 30, 2018
ice-zjchen pushed a commit to ice-zjchen/san-website that referenced this pull request Nov 2, 2018
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.

None yet

3 participants