Skip to content

完成transition.md部分的翻译 #55

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

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
# vuejs.org

This site is built with [hexo](http://zespia.tw/hexo/). Site content is written in Markdown format located in `source`. Pull requests welcome!
该站点是通过 [hexo](http://hexo.io/) 搭建起来的。网站内容都是以 Markdown 格式放置在 `source` 目录下的。
欢迎认领翻译,并发 pull requests 给我:)
为了避免重复翻译,有劳大家在认领之前在 [wiki](https://github.com/Jinjiang/vuejs.org/wiki) 里查阅目前的翻译进度,然后在 [issues](https://github.com/Jinjiang/vuejs.org/issues) 里记录自己认领的页面。

## Developing
## 如何开始

Start a dev server at `localhost:4000`:
访问方式:`http://localhost:4000/vuejs.org/`:

```
$ npm install -g hexo
$ [sudo] npm install -g hexo@2.5.7
$ npm install
$ hexo server
```
```

## 贡献者名单

(首字母顺序排序)

* [@etanxing](https://github.com/etanxing)
* [@fengliu222](https://github.com/fengliu222)
* [@Garfielt](https://github.com/Garfielt)
* [@getive](https://github.com/getive)
* [@kunth](https://github.com/kunth)
* [@luin](https://github.com/luin)
* [@nkCoding](https://github.com/nkCoding)
* [@skyline0705](https://github.com/skyline0705)
* [@SoAanyip](https://github.com/SoAanyip)
* [@Suixinlei](https://github.com/Suixinlei)
* [@titancat](http://github.com/titancat)
* [@XfLoops](https://github.com/XfLoops)
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ language:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://vuejs.org
root: /
url: http://jinjiang.github.io/vuejs.org
root: /vuejs.org/
permalink: :year/:month/:day/:title/
tag_dir: tags
archive_dir: archives
Expand Down Expand Up @@ -97,4 +97,4 @@ markdown:
## Docs: http://zespia.tw/hexo/docs/deployment.html
deploy:
type: github
repository: git@github.com:vuejs/vuejs.org.git
repository: git@github.com:Jinjiang/vuejs.org.git
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "hexo",
"version": "2.8.3",
"version": "2.5.7",
"private": true,
"dependencies": {
"hexo-renderer-ejs": "^0.1.0",
"hexo-renderer-marked": "^0.1.0",
"hexo-renderer-stylus": "^0.1.0"
}
}
}
1 change: 0 additions & 1 deletion source/CNAME

This file was deleted.

170 changes: 88 additions & 82 deletions source/api/directives.md

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions source/api/filters.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Filters
title: 过滤器
type: api
order: 7
---
Expand All @@ -17,19 +17,19 @@ order: 7

### currency

- this filter takes one optional argument
- 这个 filter 接受一个可选参数

*12345 => $12,345.00*

You can pass an optional argument which will be used as the currency symbol (default is $).
你可以传递一个可选参数来表示货币符号

### pluralize

- this filter takes at least one argument
- 这个 filter 接受至少一个参数

Pluralizes the argument based on the filtered value. When there is exactly one arg, plural forms simply add an "s" at the end. When there are more than one argument, the arguments will be used as array of strings corresponding to the single, double, triple ... forms of the word to be pluralized. When the number to be pluralized exceeds the length of the args, it will use the last entry in the array.
根据要处理的值来将参数转换为复数。当只有一个参数时,其复数形式就是在参数末尾加上“s”。当参数多于一个时,所有的参数将会以字符串数组的形式对应要被转换为复数的单词的“一倍”、“两倍”、“三倍”......形式。当复数的数量超过参数个数时,会使用最后一个参数。

**Example:**
**例子:**

``` html
{{count}} {{count | pluralize item}}
Expand All @@ -42,7 +42,7 @@ Pluralizes the argument based on the filtered value. When there is exactly one a
{{date}}{{date | pluralize st nd rd th}}
```

Will result in:
结果为:

*1 => '1st'*
*2 => '2nd'*
Expand All @@ -52,20 +52,20 @@ Will result in:

### json

- this filter takes one optional argument
- 这个 filter 接受一个可选参数

JSON.stringify() incoming value rather than outputting the string representation (i.e. `[object Object]`). It also takes one optional argument which is the indent level (defaults to 2):
使用 `JSON.stringify()` 来处理值而不是直接将其字符串化(如 `[object Object]`)。这个 filter 接受一个可选参数来指定缩进级别(默认是 2)。

``` html
<pre>{&#123;$data | json 4&#125;}</pre>
```

### key

- this filter only works in `v-on`
- this filter takes exactly one argument
- 这个 filter 只工作于 `v-on`
- 这个 filter 接收一个参数

Wrap the handler so it only gets called when the keyCode matches the argument. You can also use string aliases for a few commonly-used keys:
包裹 handler 使得其仅在 keyCode 是指定的参数时才被调用。你也可以使用几个常用键值的别名:

- enter
- tab
Expand All @@ -76,22 +76,22 @@ Wrap the handler so it only gets called when the keyCode matches the argument. Y
- left
- right

**Example:**
**例子:**

``` html
<input v-on="keyup:doSomething | key enter">
```

`doSomething` will only be called when the Enter key is pressed.
只有按回车键(enter)时才会调用 `doSomething`

### filterBy

**Syntax:** `filterBy searchKey [in dataKey]`.
**语法:** `filterBy searchKey [in dataKey]`.

- this filter only works in `v-repeat`
- this is a computed filter
- 这个 filter 只工作于 `v-repeat`
- 这是一个 computed filter

Make `v-repeat` only display a filtered version of the source Array. The `searchKey` argument is a property key on the context ViewModel. The value of that property will be used as the string to search for:
使得 `v-repeat` 只显示数组过滤后的结果。`searchKey` 参数是当前 ViewModel 的一个属性名。这个属性的值会被用作查找的目标:

``` html
<input v-model="searchText">
Expand All @@ -100,9 +100,9 @@ Make `v-repeat` only display a filtered version of the source Array. The `search
</ul>
```

When the filter is applied, it will filter the `users` Array by recursively searching for the current value of `searchText` on each item in the Array. For example, if an item is `{ name: 'Jack', phone: '555-123-4567' }` and `searchText` has value `'555'`, the item will be considered a match.
当使用这个 filter 时,将递归遍历 `users` 数组的每一个元素来寻找 `searchText` 的当前值从而过滤该数组。举例来说,如果一个条目是 `{ name: 'Jack', phone: '555-123-4567' }`,而 `searchText` 的值是 `'555'`,这个条目就被认为是符合条件。

Optionally, you can narrow down which specific property to search in with the optional `in dataKey` argument:
可选地,你可以通过 `in dataKey` 参数来指定具体要查找哪个属性:

``` html
<input v-model="searchText">
Expand All @@ -111,9 +111,9 @@ Optionally, you can narrow down which specific property to search in with the op
</ul>
```

Now the item will only match if the value of `searchText` is found in its `name` property. So `searchText` with value `'555'` will no longer match this item, but `'Jack'` will.
现在只有当 `name` 属性包含 `searchText` 时这个条目才符合条件。所以当 `searchText` 的值是 `'555'` 时这个条目将不符合条件,而当值是 `'Jack'` 时即符合。

Finally, you can use quotes to indicate literal arguments:
最后,你可以使用引号来表示字面量参数:

``` html
<ul>
Expand All @@ -123,12 +123,12 @@ Finally, you can use quotes to indicate literal arguments:

### orderBy

**Syntax:** `orderBy sortKey [reverseKey]`.
**语法:** `orderBy sortKey [reverseKey]`.

- this filter only works in `v-repeat`
- this is a computed filter
- 这个 filter 只工作于 `v-repeat`
- 这是一个 computed filter

Sort `v-repeat`'s displayed result. The `sortKey` argument is a property key on the context ViewModel. The value of that property will be used as the key to sort the Array items with. The optional `reverseKey` argument is also a property key on the context ViewModel, but the value's truthiness will determine whether the result should be reversed.
`v-repeat` 的结果排序。`sortKey`参数是当前 ViewModel 的一个属性名。这个属性的值表示用来排序的键名。可选的 `reverseKey` 参数也是当前 ViewModel 的一个属性名,如果这个属性值为真则数组会被倒序排列。

``` html
<ul>
Expand All @@ -146,7 +146,7 @@ new Vue({
})
```

You can also use quotes for literal sort key. To indicate a literal reverse, use `-1`:
你可以使用引号来表示字面量的排序键名。使用 `-1` 来表示字面量的 `reverse` 参数。

``` html
<ul>
Expand Down
Loading