Skip to content

[Just Merge Me][Community Translation] Russian Translation Update #1127

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 82 commits into from
Feb 8, 2017
Merged
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
48fa4f2
add entry for Russian docs
gbezyuk Nov 14, 2016
2c3a5ea
copy en docs for ru translation
gbezyuk Nov 14, 2016
4c5689a
Merge pull request #1 from vuejs/dev
gbezyuk Nov 27, 2016
18fa268
translation for ru/installation.md
gbezyuk Nov 27, 2016
72a19cb
ru/README.md translation
gbezyuk Nov 27, 2016
fe6509d
ru/SUMMARY.md translation (same as README.md)
gbezyuk Nov 27, 2016
1e83812
ru/essentials/getting-started.md ru translation
gbezyuk Nov 27, 2016
b59c837
ru/essentials/dynamic-matching.md ru translation
gbezyuk Nov 27, 2016
68492eb
ru/essentials/nested-routes.md ru translation
gbezyuk Nov 27, 2016
8c56d4a
ru/essentials/navigation.md ru translation
gbezyuk Nov 28, 2016
c10f340
ru/essentials/named-routes.md ru translation
gbezyuk Nov 28, 2016
6a974cb
ru/essentials/named-views.md ru translation
gbezyuk Nov 28, 2016
222dd2c
ru/essentials/redirect-and-alias.md ru translation
gbezyuk Nov 28, 2016
a3c31bd
ru/essentials/history-mode.md ru translation
gbezyuk Nov 28, 2016
9ff6f89
ru/advanced/navigation-guards.md translation
gbezyuk Nov 28, 2016
469e7f7
ru/advanced/meta.md translation
gbezyuk Nov 28, 2016
dad4bc5
ru/advanced/transitions.md translation
gbezyuk Nov 28, 2016
c51a251
ru/advanced/data-fetching.md translation
gbezyuk Nov 28, 2016
c9c3f9d
ru/advanced/scroll-behavior.md translation
gbezyuk Nov 28, 2016
4298e15
ru/advanced/lazy-loading.md translation
gbezyuk Nov 28, 2016
2a84aba
README.md and SUMMARY.md translation updates
gbezyuk Nov 28, 2016
93436e4
ru/api/component-injections.md translation
gbezyuk Nov 28, 2016
19e99d5
ru/api/options.md translation
gbezyuk Nov 28, 2016
18d637c
ru/api/route-object.md translation
gbezyuk Nov 28, 2016
55ccbdc
ru/api/router-instance.md translation
gbezyuk Nov 28, 2016
4632a32
ru/api/router-view.md translation
gbezyuk Nov 28, 2016
f7a894e
ru/api/router-link.md translation
gbezyuk Nov 28, 2016
068d135
Update scroll-behavior.md
akost Nov 28, 2016
5da93af
Merge pull request #2 from akost/patch-1
gbezyuk Nov 28, 2016
bb852f3
ru/essentials proof-reading
gbezyuk Dec 4, 2016
429c32b
ru/advanced proof-reading
gbezyuk Dec 4, 2016
5705d51
ru/api proof-reading
gbezyuk Dec 4, 2016
d3ec54b
Merge pull request #3 from vuejs/dev
gbezyuk Dec 4, 2016
e7fec59
Merge pull request #4 from translation-gang/dev
gbezyuk Dec 4, 2016
7836c90
updated to match 2.1.1
gbezyuk Dec 4, 2016
0f25f41
Typofix
2bj Dec 4, 2016
00052bf
Merge pull request #5 from 2bj/patch-1
gbezyuk Dec 4, 2016
0825dbf
Fix typo
Dec 9, 2016
19b585d
Merge pull request #6 from moonlik/patch-1
gbezyuk Dec 9, 2016
315d905
Правки по сторожевых хуков
Alex-Sokolov Jan 7, 2017
a35369a
Правки по странице Route-object
Alex-Sokolov Jan 7, 2017
3731a82
Исправление свойства на странице router-link
Alex-Sokolov Jan 7, 2017
ebaad25
Исправление ссылки на странице getting-started
Alex-Sokolov Jan 7, 2017
36f97e8
Merge pull request #8 from Alex-Sokolov/ru-translation
gbezyuk Jan 8, 2017
73dc41a
merge upstream
gbezyuk Jan 8, 2017
4db8295
merge dev
gbezyuk Jan 8, 2017
ac4bb91
Исправления в оглавлении
Alex-Sokolov Jan 8, 2017
93f01bd
Исправления по странице установки
Alex-Sokolov Jan 8, 2017
bb064a6
Правки на странице введения
Alex-Sokolov Jan 8, 2017
dc7b947
Merge remote-tracking branch 'upstream/ru-translation' into ru-transl…
Alex-Sokolov Jan 8, 2017
33575e2
Добавлен пункт для страницы введения (чтобы локализовался в боковой п…
Alex-Sokolov Jan 8, 2017
283003d
Добавилась пустая строка в конце файла
Alex-Sokolov Jan 8, 2017
5a267ec
Капитализация Vue-router
Alex-Sokolov Jan 8, 2017
a0efc6f
Исправлена капитализация CSS
Alex-Sokolov Jan 8, 2017
d02649c
Исправлена ошибка на странице router-link
Alex-Sokolov Jan 8, 2017
f644de1
Изменены врапперы на обертки на странице router-view
Alex-Sokolov Jan 8, 2017
ef3b7a7
Правка на странице component-injections
Alex-Sokolov Jan 8, 2017
71474d5
Изменения по странице dynamic-matching
Alex-Sokolov Jan 8, 2017
933d19c
Изменение капитализации Vue-router
Alex-Sokolov Jan 8, 2017
a5e2ea9
Исправлена ошибка в заголовке на странице named-routes
Alex-Sokolov Jan 8, 2017
be97a92
Изменен сайдбар на боковую панель на странице named-views.md
Alex-Sokolov Jan 8, 2017
c322cf3
Изменения по странице navigation.md
Alex-Sokolov Jan 8, 2017
7718cdd
Изменена капитализация Vue-router
Alex-Sokolov Jan 8, 2017
fa9cb03
Исправлена капитализация Vue-router и ошибка на странице navigation-g…
Alex-Sokolov Jan 8, 2017
ca1be63
Мелкие правки по странице scroll-behaviour
Alex-Sokolov Jan 8, 2017
288351c
Исправления на странице navigation-guards
Alex-Sokolov Jan 8, 2017
a26eeb3
Исправления на странице navigation-guards
Alex-Sokolov Jan 8, 2017
38df327
Merge pull request #9 from Alex-Sokolov/ru-translation
gbezyuk Jan 8, 2017
81f4251
- router-link.md добавлено уточнение
Alex-Sokolov Jan 29, 2017
646e18b
- navigation.md перевод новой секции для 2.2.0
Alex-Sokolov Jan 29, 2017
e888422
-navigation-guards переведен новый коллбек
Alex-Sokolov Jan 29, 2017
ce70183
- options.md добавлена опция props
Alex-Sokolov Jan 29, 2017
94a0ec4
- router-instance добавлено новое в 2.2.0
Alex-Sokolov Jan 29, 2017
c622ed3
- passing-props.md переведена новая страница
Alex-Sokolov Jan 29, 2017
c4f1e31
Merge pull request #11 from Alex-Sokolov/ru-translation
gbezyuk Jan 29, 2017
0c5d48e
- Правка
Alex-Sokolov Jan 30, 2017
e902f0f
Merge pull request #12 from Alex-Sokolov/ru-translation
gbezyuk Jan 30, 2017
793afc4
- route-object.md исправление упоминания хэша
Feb 6, 2017
c307d15
Merge pull request #14 from vuejs/dev
gbezyuk Feb 7, 2017
61b5f89
Merge pull request #13 from Alex-Sokolov/ru-translation
gbezyuk Feb 7, 2017
9321bf2
Merge branch 'ru-translation' into dev
gbezyuk Feb 7, 2017
9547922
Merge pull request #15 from translation-gang/dev
gbezyuk Feb 7, 2017
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
Prev Previous commit
Next Next commit
ru/essentials/dynamic-matching.md ru translation
  • Loading branch information
gbezyuk committed Nov 27, 2016
commit b59c83767fc27734adf06885e4689e054025a30e
32 changes: 16 additions & 16 deletions docs/ru/essentials/dynamic-matching.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dynamic Route Matching
# Динамические пути

Very often we will need to map routes with the given pattern to the same component. For example we may have a `User` component which should be rendered for all users but with different user IDs. In `vue-router` we can use a dynamic segment in the path to achieve that:
Очень часто требуется поставить компонент в соответствие со множеством путей по некоторому шаблону. Например, мы можем захотеть отображать один и тот же компонент `User` для всего множества пользователей в соответствии с их ID. Во `vue-router` для этой цели мы можем указать динамический сегмент пути:

``` js
const User = {
Expand All @@ -9,38 +9,38 @@ const User = {

const router = new VueRouter({
routes: [
// dynamic segments start with a colon
// динамические сегменты начинаются с двоеточия
{ path: '/user/:id', component: User }
]
})
```

Now URLs like `/user/foo` and `/user/bar` will both map to the same route.
Теперь все URL вида `/user/foo` или `/user/bar` соответствуют одному и тому же пути и компоненту.

A dynamic segment is denoted by a colon `:`. When a route is matched, the value of the dynamic segments will be exposed as `this.$route.params` in every component. Therefore, we can render the current user ID by updating `User`'s template to this:
Динамический сегмент обозначается двоеточием `:`. При совпадении пути, значение динамического сегмента становится доступно как `this.$route.params` для каждого компонента. Поэтому, мы можем отобразить ID текущего пользователя, используя такой шаблон:

``` js
const User = {
template: '<div>User {{ $route.params.id }}</div>'
template: '<div>Пользователь {{ $route.params.id }}</div>'
}
```

You can checkout a live example [here](http://jsfiddle.net/yyx990803/4xfa2f19/).
Посмотреть на пример вживую можно [здесь](http://jsfiddle.net/yyx990803/4xfa2f19/).

You can have multiple dynamic segments in the same route, and they will map to corresponding fields on `$route.params`. Examples:
В рамках одного пути можно указать несколько динамических сегментов. Для каждого появится соответствующая запись в `$route.params`. Например:

| pattern | matched path | $route.params |
|---------|------|--------|
| /user/:username | /user/evan | `{ username: 'evan' }` |
| /user/:username/post/:post_id | /user/evan/post/123 | `{ username: 'evan', post_id: 123 }` |

In addition to `$route.params`, the `$route` object also exposes other useful information such as `$route.query` (if there is a query in the URL), `$route.hash`, etc. You can check out the full details in the [API Reference](../api/route-object.md).
Помимо `$route.params`, объект `$route` также позволяет получить доступ к другой полезной информации, например `$route.query` (если URL содержит строку запроса), `$route.hash`, и т.д. [Справочник API](../api/route-object.md) содержит подробное описание.

### Reacting to Params Changes
### Реакция на изменение параметров

One thing to note when using routes with params is that when the user navigates from `/user/foo` to `/user/bar`, **the same component instance will be reused**. Since both routes render the same component, this is more efficient than destroying the old instance and then creating a new one. **However, this also means that the lifecycle hooks of the component will not be called**.
Важно отметить, что при переходе от `/user/foo` к `/user/bar` **будет повторно использован тот же самый инстанс компонента**. Поскольку оба пути указывают на один и тот же компонент, этот подход эффективнее, чем уничтожение и повторное создание инстанса. **Вместе с тем, это означает, что хуки жизненного цикла компонента при этом вызваны не будут**.

To react to params changes in the same component, you can simply watch the `$route` object:
Чтобы отреагировать на изменения параметров в рамках компонента, можно напрямую установить наблюдение за объектом `$route`:

``` js
const User = {
Expand All @@ -53,10 +53,10 @@ const User = {
}
```

### Advanced Matching Patterns
### Продвинутые возможности

`vue-router` uses [path-to-regexp](https://github.com/pillarjs/path-to-regexp) as its path matching engine, so it supports many advanced matching patterns such as optional dynamic segments, zero or more / one or more requirements, and even custom regex patterns. Check out its [documentation](https://github.com/pillarjs/path-to-regexp#parameters) for these advanced patterns, and [this example](https://github.com/vuejs/vue-router/blob/dev/examples/route-matching/app.js) of using them in `vue-router`.
`vue-router` использует [path-to-regexp](https://github.com/pillarjs/path-to-regexp) в качестве движка для проверки совпадения путей, что позволяет задействовать многие продвинутые возможности, такие как опциональные динамические сегменты и регулярные выражения. [Документация библиотеки](https://github.com/pillarjs/path-to-regexp#parameters) содержит информацию об этих возможностях роутинга, а [этот пример](https://github.com/vuejs/vue-router/blob/dev/examples/route-matching/app.js) — о том, как использовать их с `vue-router`.

### Matching Priority
### Приоритеты путей

Sometimes the same URL may be matched by multiple routes. In such a case the matching priority is determined by the order of route definition: the earlier a route is defined, the higher priority it gets.
Иногда один и тот же URL может совпасть с несколькими путями. В таких случаях приоритет определяется порядком определения путей: чем раньше определён путь, тем выше у него приоритет.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy