Skip to content

Commit

Permalink
docs: fixes (#872)
Browse files Browse the repository at this point in the history
* docs: (ru) translation start

* api.md перевод заголовков и общих фраз

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* installation.md translated

* formatting.md translated

* pluralization.md translated

* (ru) wip translation

* daterime.md translated

* number.md translated

* (ru) translation wip

* (ru) multiple linebreaks replaced

* (ru) translation wip

* api.md translation wip

* (ru) translation wip: change external docs links

* (ru) translation wip: formatting

* (ru) translation wip

* docs: (ru) translation wip

* docs: merge updates

* (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) translation wip

* docs: (ru) Translation finished

* docs: (ru) hot-update.md update

* docs: (ru) translation updates

* docs: small fixes

Co-authored-by: Alex Sokolov <4497128+Alex-Sokolov@users.noreply.github.com>
  • Loading branch information
Alex-Sokolov and Alex-Sokolov committed May 11, 2020
1 parent 9a66007 commit c9db4e7
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 49 deletions.
17 changes: 3 additions & 14 deletions vuepress/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ If you have specified an `i18n` option at component options, you will be able to

## `VueI18n` class

`Vuei18n` class implement `I18n` interface of [flowtype definitions](https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js)
`VueI18n` class implement `I18n` interface of [flowtype definitions](https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js)

### Static properties

Expand Down Expand Up @@ -326,7 +326,7 @@ In next major version, `warnHtmlInMessage` option is `warn` as default.

* **Default:** `undefined`

The shared locale messages of localization for components. More detail see [Component based localizatrion](../guide/component.md#shared-locale-messages-for-components).
The shared locale messages of localization for components. More detail see [Component based localization](../guide/component.md#shared-locale-messages-for-components).

#### postTranslation

Expand Down Expand Up @@ -445,7 +445,7 @@ Whether to allow the use locale messages of HTML formatting.
If you set `warn` or` error`, will check the locale messages on the VueI18n instance.

If you are specified `warn`, a warning will be output at console.
If you are specified `error` will occured an Error.
If you are specified `error` will occurred an Error.

In VueI18n instance, set the `off` as default.

Expand Down Expand Up @@ -527,17 +527,6 @@ If you set `warn` or` error` in the `warnHtmlInMessage` property, when this meth

This is the same as the `Function` returned with `$t` method. More detail see [$t](#t).

#### i( key, [locale], [values] )

> :new: 7.0+
* **Arguments:**

* `{Path} key`: required
* `{Locale} locale`: optional
* `{Array} values`: optional
* **Return:** : `TranslateResult`

#### tc( key, [choice], [values] )

* **Arguments:**
Expand Down
6 changes: 3 additions & 3 deletions vuepress/guide/directive.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ Outputs:
:new: 8.7+
:::

When `v-t` directive is applied to an element inside [`<transition>` component](https://vuejs.org/v2/api/#transition), you may notice that the translated message disappears during the transition. This behavior is related to the nature of the `<transition>` component implementation – all directives in the disappearing element inside the `<transition>` component will be destroyed **before the transition starts**. This behavior may result in content flickering on short animations, but is most noticable on long transitions.
When `v-t` directive is applied to an element inside [`<transition>` component](https://vuejs.org/v2/api/#transition), you may notice that the translated message disappears during the transition. This behavior is related to the nature of the `<transition>` component implementation – all directives in the disappearing element inside the `<transition>` component will be destroyed **before the transition starts**. This behavior may result in content flickering on short animations, but is most noticeable on long transitions.

To make sure directive content stays un-touched during a transition, just add the [`.preserve` modifier](../api/#v-t) to the `v-t` directive defintion.
To make sure directive content stays un-touched during a transition, just add the [`.preserve` modifier](../api/#v-t) to the `v-t` directive definition.

Javascript:

Expand Down Expand Up @@ -161,7 +161,7 @@ About the above examples, see the [example](https://github.com/kazupon/vue-i18n/

#### Pros

You can **flexibly** use mustash syntax `{{}}` in templates and also computed props and methods in Vue instance.
You can **flexibly** use mustache syntax `{{}}` in templates and also computed props and methods in Vue instance.

#### Cons

Expand Down
6 changes: 3 additions & 3 deletions vuepress/guide/fallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ For example `de-DE-bavarian` would fallback
1. `de-DE`
1. `de`

To supress the automatic fallback, add the postfix exclamation mark `!`, for example `de-DE!`
To suppress the automatic fallback, add the postfix exclamation mark `!`, for example `de-DE!`

## Explicit fallback with one locale

Sometimes some items will not be translated into some languages. In this example, the item `hello` is available in English but not Japanese:
Sometimes some items will not be translated into some languages. In this example, the item `hello` is available in English but not Japanese:

```js
const messages = {
Expand Down Expand Up @@ -108,7 +108,7 @@ const messages = {
This is useful because you don't have to specify a translation for the string "Hello, world!" into English.

In fact, you can even include template parameters in a key. Together with `formatFallbackMessages: true`, this lets you skip writing templates for your "base" language; the keys *are* your templates.
In fact, you can even include template parameters in a key. Together with `formatFallbackMessages: true`, this lets you skip writing templates for your "base" language; the keys *are* your templates.

```javascript
const messages = {
Expand Down
2 changes: 1 addition & 1 deletion vuepress/guide/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ We recommended using the [component interpolation](interpolation.md) feature.
:::warning Notice
> :new: 8.11+
You can control the use of HTML formatting. see the detail `warnHtmlInMessage` constructor option and property API.
You can control the use of HTML formatting. see the detail `warnHtmlInMessage` constructor option and property API.
:::

In some cases you might want to render your translation as an HTML message and not a static string.
Expand Down
2 changes: 1 addition & 1 deletion vuepress/guide/hot-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const messages = {
}

// VueI18n instance
const i18n = new Vuei18n({
const i18n = new VueI18n({
locale: 'en',
messages
})
Expand Down
2 changes: 1 addition & 1 deletion vuepress/guide/interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The children of `i18n` functional component are interpolated with locale message
:::
is interpolated with `term` locale message.

In the above example, the component interpolation follows the **list formatting**. The children of `i18n` functional component are interpolated by their order of appearance.
In the above example, the component interpolation follows the **list formatting**. The children of `i18n` functional component are interpolated by their order of appearance.

## Slots syntax usage

Expand Down
2 changes: 1 addition & 1 deletion vuepress/guide/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Output:
### Formatting linked locale messages

If the language distinguish cases of character, you may need control the case of the linked locale messages.
Linked messages can be formatted with modifier `@.modifier:key`
Linked messages can be formatted with modifier `@.modifier:key`

The below modifiers are available currently.

Expand Down
2 changes: 1 addition & 1 deletion vuepress/guide/sfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ __Translation contains only text__ (Work without deep selector)
<i18n>
{
"en": {
"hello": "helloworld!"
"hello": "hello world!"
},
"ja": {
"hello": "こんにちは、世界"
Expand Down
12 changes: 0 additions & 12 deletions vuepress/ru/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,18 +535,6 @@ VueI18n.prototype.getChoiceIndex = /* пользовательская реал

Аналогично функции возвращаемой методом `$t`. Подробнее см. [\$t](#t).

#### i( key, [locale], [values] )

> :new: Добавлено в версии 7.0+
- **Аргументы:**

- `{Path} key`: обязательный
- `{Locale} locale`: опционально
- `{Array} values`: опционально

- **Возвращает:** : `TranslateResult`

#### tc( key, [choice], [values] )

- **Аргументы:**
Expand Down
11 changes: 0 additions & 11 deletions vuepress/zh/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,17 +430,6 @@ VueI18n.prototype.getChoiceIndex = /* 自定义实现 */

这与 `$t` 方法返回的 `Function` 相同。更多细节见[$t](#t)

#### i( key, [locale], [values] )

> :new: 7.0 新增
* **参数:**

* `{Path} key`:必填
* `{Locale} locale`:可选
* `{Array} values`:可选
* **返回值:**`TranslateResult`

#### tc( key, [choice], [values] )

* **参数:**
Expand Down
2 changes: 1 addition & 1 deletion vuepress/zh/guide/hot-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const messages = {
}

// VueI18n 实例
const i18n = new Vuei18n({
const i18n = new VueI18n({
locale: 'en',
messages
})
Expand Down

0 comments on commit c9db4e7

Please sign in to comment.