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

Documentation improvemation #1104

Merged
merged 24 commits into from
Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9c6e444
initial translate at config page
lucasferreiralimax Jan 10, 2021
eda3bec
docs translate in Portuguese
lucasferreiralimax Jan 13, 2021
38ffb98
adjustment spacing and translate save
lucasferreiralimax Jan 13, 2021
6be3422
Merge remote-tracking branch 'vue-i18n/v8.x' into v8.x
lucasferreiralimax Jan 15, 2021
0875de7
reduce svg sendcloud and improvement viewBox
lucasferreiralimax Jan 15, 2021
bb79adf
improvement img alt, size and reflect information languages
lucasferreiralimax Jan 15, 2021
1d30341
docs: installation reflect information to languages
lucasferreiralimax Jan 15, 2021
f56507b
docs: legacy, api reflect information to languages
lucasferreiralimax Jan 15, 2021
4ff034b
Merge remote-tracking branch 'vue-i18n/v8.x' into v8.x
lucasferreiralimax Jan 17, 2021
d94b193
Adjustment clean of the patreon occurrences
lucasferreiralimax Jan 17, 2021
3c91f9f
docs: guide compoment page reflect information in languages
lucasferreiralimax Jan 17, 2021
f1a0aaf
docs: guide datetime page reflect information in languages
lucasferreiralimax Jan 17, 2021
4bc9654
docs: guide directive page reflect information in languages
lucasferreiralimax Jan 17, 2021
877a0ee
docs: guide fallback page reflect information in languages
lucasferreiralimax Jan 17, 2021
6d7f0e4
docs: guide hot-reload page reflect information in languages
lucasferreiralimax Jan 17, 2021
5719519
docs: guide interpolation page reflect information in languages
lucasferreiralimax Jan 17, 2021
40d6fee
docs: guide lazy-loading page reflect information in languages
lucasferreiralimax Jan 17, 2021
41dc62e
docs: guide locale page reflect information in languages
lucasferreiralimax Jan 17, 2021
ce3f091
docs: guide messages page reflect information in languages
lucasferreiralimax Jan 17, 2021
aee8893
docs: guide number page reflect information in languages
lucasferreiralimax Jan 17, 2021
fc000a6
docs: guide pluralization page reflect information in languages
lucasferreiralimax Jan 17, 2021
b20995b
adjustment link for default pluralization
lucasferreiralimax Jan 17, 2021
3a61903
docs: guide sfc adjustment example scoped style and reflect informati…
lucasferreiralimax Jan 17, 2021
a5a0bbd
docs: guide tooling page reflect information in languages
lucasferreiralimax Jan 17, 2021
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
1 change: 1 addition & 0 deletions vuepress/guide/fallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const messages = {
hello: 'Hello, world!'
},
ja: {
// Localization without translation to `hello`
}
}
```
Expand Down
5 changes: 2 additions & 3 deletions vuepress/pt/guide/fallback.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Fallback Localização

* Resumo: Use `fallbackLocale: '<lang>'` para escolher qual idioma usar quando seu idioma preferido não tiver uma tradução. *
*Resumo: Use `fallbackLocale: '<lang>'` para escolher qual idioma usar quando seu idioma preferido não tiver uma tradução.*

## Fallback implícito usando localidades

Se um `locale` é fornecido contendo um território e um dialeto opcional, o fallback implícito é ativado automaticamente.

Por exemplo, para `de-DE-bavarian` o seguinte será considerado como fallback:

1. `de-DE-bavarian`
2. `de-DE`
3. `de`
Expand All @@ -24,7 +23,7 @@ const messages = {
hello: 'Hello, world!'
},
pt: {
// Localizacao sem tradução para `hello`
// Localização sem tradução para `hello`
}
}
```
Expand Down
3 changes: 1 addition & 2 deletions vuepress/ru/guide/fallback.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Запасная локализация

_Вкратце: указывайте `fallbackLocale: '<lang>'` для определения языка, который будет использоваться, если нет перевода в выбранной локализации._
*Вкратце: указывайте `fallbackLocale: '<lang>'` для определения языка, который будет использоваться, если нет перевода в выбранной локализации.*

## Неявное определение запасных локализаций при использовании локалей

Если `locale` содержит территорию и опционально диалект, то неявно будут определены автоматически запасные локали.

Например для `de-DE-bavarian` в качестве запасных будут считаться следующие:

1. `de-DE-bavarian`
2. `de-DE`
3. `de`
Expand Down
18 changes: 17 additions & 1 deletion vuepress/zh/guide/fallback.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# 回退本地化

*总结:使用`fallbackLocale:'<lang>'`选择首选语言缺少翻译时要使用的语言。*
lucasferreiralimax marked this conversation as resolved.
Show resolved Hide resolved

## 使用语言环境的隐式回退

如果给出的 `locale` 包含领土和可选的方言,则隐式回退将自动激活。

例如,对于 `de-DE-bavarian`,以下内容将被视为备用:
1. `de-DE-Bavarian`
2. `de-DE`
3. `de`

要禁止自动回退,请添加后缀感叹号 `!`,例如 `de-DE!`。

# 具有一个语言环境的显式回退

以下语言环境信息的 `ja` 语言环境中不存在 `message` 键:

```js
Expand All @@ -8,6 +23,7 @@ const messages = {
message: 'hello world'
},
ja: {
// 没有翻译的本地化 `hello`
}
}
```
Expand Down Expand Up @@ -80,7 +96,7 @@ const i18n = new VueI18n({
})
```

当模板`template`如下时
模板如下

```html
<p>{{ $t('Hello {name}', { name: 'John' }}) }}</p>
Expand Down