Skip to content

Commit fe6956c

Browse files
committed
docs: improvement docs
1 parent 482a39d commit fe6956c

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

docs/guide/essentials/pluralization.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Vue I18n offers some ways to support pluralization. Here we’ll use the `$t`.
3535
Some ways to support pluralization are:
3636

3737
- injected global `$t`
38-
- `v-t` custom directive
3938
- built-in Translation component (`i18n-t`)
4039
- exported `t` from `useI18n` (for Composition API mode)
4140
:::

docs/guide/essentials/started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ If you need a refresher about the two styles, see [Vue - API Styles](https://vue
103103

104104
Vue I18n works with both Vue composition API and Options API. Vue I18n has two APIs style like Vue, Composition API and Legacy API for options API using.
105105

106-
:::tip NOTE
106+
:::danger IMPORTANT
107107
In Vue I18n v9 and later, the API offered by Vue I18n v8.x is called **Legacy API** mode.
108+
Legacy API is deprecated Vue I18n v11, and drop Vue I18n v12. We recommend use Composition API mode.
108109
:::
109110

110111
The following sections will be explained using the Legacy API.

docs/guide/installation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@ app.mount('#app')
4646

4747
## Direct Download
4848

49-
<https://unpkg.com/vue-i18n@10>
49+
<https://unpkg.com/vue-i18n@11>
5050

5151
[unpkg.com](https://unpkg.com) provides a npm-based CDN links. The above link will always point to the latest release on npm.
5252

5353
### Global import
5454

5555
```html
5656
<script src="https://unpkg.com/vue@3"></script>
57-
<script src="https://unpkg.com/vue-i18n@10"></script>
57+
<script src="https://unpkg.com/vue-i18n@11"></script>
5858
```
5959

60-
You can also use a specific version/tag via URLs like <https://unpkg.com/vue-i18n@10.0.0/dist/vue-i18n.global.js>
60+
You can also use a specific version/tag via URLs like <https://unpkg.com/vue-i18n@11.0.0/dist/vue-i18n.global.js>
6161

6262
### ES Modules import
6363

6464
```html
6565
<script type="module" src="https://unpkg.com/vue@3/dist/vue.esm-browser.js">
66-
<script type="module" src="https://unpkg.com/vue-i18n@9/dist/vue-i18n.esm-browser.js">
66+
<script type="module" src="https://unpkg.com/vue-i18n@11/dist/vue-i18n.esm-browser.js">
6767
```
6868
69-
You can also use a specific version/tag via URLs like <https://unpkg.com/vue-i18n@10.0.0/dist/vue-i18n.esm-browser.js>
69+
You can also use a specific version/tag via URLs like <https://unpkg.com/vue-i18n@11.0.0/dist/vue-i18n.esm-browser.js>
7070

docs/guide/migration/breaking11.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ In addition, Vue 3 Virtual DOM optimization has been introduced, and the optimiz
2828

2929
For compatibility, `v-t` mode still works in v11, but will be removed entirely in v12, so `v-t` will not work after that version.
3030

31+
### for migration
32+
33+
You can use `eslint-plugin-vue-i18n`.
34+
35+
`eslint-plugin-vue-i18n` has `@intlify/vue-i18n/no-deprecated-v-t` rule. https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-v-t.html
36+
37+
You must have migrated with eslint before upgrading to vue-i18n v11
38+
3139
## Drop `tc` and `$tc` for Legacy API mode
3240

3341
**Reason**: These APIs had already deprecated in warning about being dropped in v11. docs says, https://vue-i18n.intlify.dev/guide/migration/breaking10.html#deprecate-tc-and-tc-for-legacy-api-mode

packages/vue-i18n-core/src/directive.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ function getComposer(
8383
* <p v-t="{ path: greeting, args: { name: fullName } }"></p>
8484
* ```
8585
*
86+
* @deprecated will be removed at vue-i18n v12
87+
*
8688
* @VueI18nDirective
8789
*/
8890
export type TranslationDirective<T = HTMLElement> = ObjectDirective<T>

0 commit comments

Comments
 (0)