Skip to content

Commit f2714cb

Browse files
authored
docs (composition): typos, duplication (#969)
1 parent 7542da3 commit f2714cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/guide/advanced/composition.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Composition API
22

3-
The introduction of `setup` and Vue’s [Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html) open up new possibilities. But to be able to get the full potential out of Vue I18n, we will need to use a few new functions to replace access to `this`.
3+
The introduction of `setup` and Vue’s [Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html) opens up new possibilities. But to be able to get the full potential out of Vue I18n, we will need to use a few new functions to replace access to `this`.
44

55
We have been describing the features of Vue I18n using the Legacy API, which is compatible with vue-i18n v8.x. Now let’s take a look at Vue I18n `useI18n` for Composition API.
66

@@ -37,7 +37,7 @@ The following properties of i18n instance created by `createI18n` change its beh
3737
- `global` property: VueI18n instance to Composer instance
3838
:::
3939

40-
You are now ready to use `useI18n`. Now you are ready to use `useI18n` in the component `setup`. The code looks like this:
40+
You are now ready to use `useI18n` in the component `setup`. The code looks like this:
4141

4242
```js{5-8}
4343
// ...
@@ -57,7 +57,7 @@ You must call `useI18n` at top of the `setup`.
5757

5858
The `useI18n` returns a Composer instance. The Composer instance provides a translation API such as the `t` function, as well as properties such as `locale` and `fallbackLocale`, just like the VueI18n instance. For more information on the Composer instance, see the [API Reference](../../api/composition#composer).
5959

60-
In the above example, there are no options for `useI18n`, so it returns a Composer instance that works with the global scope. As such, it returns a Composer instance that works with the global scope, which means that the localized message referenced by the spread `t` function here is the one specified in `createI18n`. This means that the locale message referenced by the spread `t` function here will be the locale message specified in `createI18n`.
60+
In the above example, there are no options for `useI18n`, so it returns a Composer instance that works with the global scope. As such, it returns a Composer instance that works with the global scope, which means that the localized message referenced by the spread `t` function here is the one specified in `createI18n`.
6161

6262
By returning `t` as render context in the `setup`, you can use `t` in the components template:
6363

@@ -77,7 +77,7 @@ The output follows:
7777

7878
## Message Translation
7979

80-
In the Legacy API mode, The messages were translated using either `$t` or the VueI18n instance of `t` to translate the message.
80+
In the Legacy API mode, the messages were translated using either `$t` or the VueI18n instance of `t`.
8181

8282
In the Composition API mode, the Message Format Syntax remains the same as in the Legacy API mode. You can use the Composer instance `t` to translate a message as follows:
8383

0 commit comments

Comments
 (0)