You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/unplugin-vue-i18n/README.md
+38-28Lines changed: 38 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -280,11 +280,17 @@ About details, See the [here](https://vue-i18n.intlify.dev/guide/advanced/optimi
280
280
281
281
If nothing is specified for this option, i.e. `undefined`, nothing is done to the resource in the above format.
282
282
283
-
> [!WARNING] > `json` resources matches this option, it will be handled **before the internal json plugin of bundler, and will not be processed afterwards**, else the option doesn't match, the bundler side will handle.
283
+
> [!WARNING]
284
+
>
285
+
> `json` resources matches this option, it will be handled **before the internal json plugin of bundler, and will not be processed afterwards**, else the option doesn't match, the bundler side will handle.
284
286
285
-
> [!WARNING] > `yaml` resources don't support multi documentation with `|`, alias with `&` and `*`, tags with `! `, `@`, etc. Only simple data structures.
287
+
> [!WARNING]
288
+
>
289
+
> `yaml` resources don't support multi documentation with `|`, alias with `&` and `*`, tags with `! `, `@`, etc. Only simple data structures.
286
290
287
-
> [!WARNING] > `js` and `ts` resources are set **simple export (`export default`) as locale messages object, as default**.
291
+
> [!WARNING]
292
+
>
293
+
> `js` and `ts` resources are set **simple export (`export default`) as locale messages object, as default**.
288
294
289
295
```js
290
296
exportdefault {
@@ -303,22 +309,22 @@ If you need to use programmatically dynamic resource construction, you would be
303
309
-**Type:**`string`
304
310
-**Default:**`'vue-i18n'`
305
311
306
-
> [!NOTE]
307
-
> This options is supported from v5.1.0, and works with vue-i18n v10 and later.
312
+
> [!NOTE]
313
+
> This options is supported from v5.1.0, and works with vue-i18n v10 and later.
308
314
309
-
Bundle target vue-i18n module. You can specify either `‘vue-i18n’` or `‘petite-vue-i18n’`.
315
+
Bundle target vue-i18n module. You can specify either `‘vue-i18n’` or `‘petite-vue-i18n’`.
310
316
311
-
The default is `'vue-i18n'`, and the following installed in node_modules will be bundled.
317
+
The default is `'vue-i18n'`, and the following installed in node_modules will be bundled.
312
318
313
-
- development: `vue-i18n.esm-bundler.js`
314
-
- production: `vue-i18n.runtime.esm-bundler.js`
319
+
- development: `vue-i18n.esm-bundler.js`
320
+
- production: `vue-i18n.runtime.esm-bundler.js`
315
321
316
-
In the case of `‘petite-vue-i18n’`, the following installed in node_modules will be bundled.
322
+
In the case of `‘petite-vue-i18n’`, the following installed in node_modules will be bundled.
If you are using petite-vue-i18n, you will need to set this value.
327
+
If you are using petite-vue-i18n, you will need to set this value.
322
328
323
329
### `strictMessage`
324
330
@@ -360,23 +366,23 @@ If you need to use programmatically dynamic resource construction, you would be
360
366
}
361
367
```
362
368
363
-
If you fetch some resources from the backend, the data **must be pre-compiled** for production. exmaple is [here](https://github.com/intlify/vue-i18n-next/tree/master/examples/backend).
369
+
If you fetch some resources from the backend, the data **must be pre-compiled** for production. example is [here](https://github.com/intlify/vue-i18n-next/tree/master/examples/backend).
364
370
365
371
### `jitCompilation`
366
372
367
373
-**Type:**`boolean`
368
374
-**Default:**`true`
369
375
370
376
> [!IMPORTANT]
371
-
> 'jitCompilation' option is deprected in v5.
377
+
> 'jitCompilation' option is deprecated in v5.
372
378
> This option will be supported with vue-i18n until v9 latest version.
373
379
374
-
Whether locale mesages should be compiled by JIT (Just in Time) compilation with vue-i18n's message compiler.
380
+
Whether locale messages should be compiled by JIT (Just in Time) compilation with vue-i18n's message compiler.
375
381
376
-
JIT compilation has been supported since vue-i18n v9.3. This means that since v9 was released until now, the message compiler compiles to executable JavaScript code, however it did not work in the CSP environment. Also, since this was an AOT (Ahead of Time) compilation, it was not possible to dynamically retrieve locale messages from the back-end Database and compose locale mesages with programatic.
382
+
JIT compilation has been supported since vue-i18n v9.3. This means that since v9 was released until now, the message compiler compiles to executable JavaScript code, however it did not work in the CSP environment. Also, since this was an AOT (Ahead of Time) compilation, it was not possible to dynamically retrieve locale messages from the back-end Database and compose locale messages with programatic.
377
383
378
384
> [!WARNING]
379
-
> Enabling JIT compilation causes the message compiler to generate AST objects for locale mesages instead of JavaScript code. If you pre-compile locale messages with a tool such as the [Intlify CLI](https://github.com/intlify/cli) and import them dynamically, you need to rebuild that resource.
385
+
> Enabling JIT compilation causes the message compiler to generate AST objects for locale messages instead of JavaScript code. If you pre-compile locale messages with a tool such as the [Intlify CLI](https://github.com/intlify/cli) and import them dynamically, you need to rebuild that resource.
380
386
381
387
About JIT compilation, See [here](https://vue-i18n.intlify.dev/guide/advanced/optimization.html#jit-compilation)
382
388
@@ -440,7 +446,7 @@ If do you will use this option, you need to enable `jitCompilation` option.
440
446
441
447
Whether to install the full set of APIs, components, etc. provided by Vue I18n. By default, all of them will be installed.
442
448
443
-
If `false` is specified, **buld-in components and directive will not be installed in vue and will be tree-shaken.**
449
+
If `false` is specified, **build-in components and directive will not be installed in vue and will be tree-shaken.**
444
450
445
451
For more details, See [here](https://vue-i18n.intlify.dev/guide/advanced/optimization.html#reduce-bundle-size-with-feature-build-flags)
446
452
@@ -597,8 +603,10 @@ If do you will use this option, you need to enable `jitCompilation` option.
597
603
598
604
This option that to use i18n custom blocks in `vue-class-component`.
599
605
600
-
> [!IMPORTANT] > `useClassComponent` option is deprecated in v5.
601
-
> This option will be supported with vue-i18n until v9 latest version.
606
+
> [!IMPORTANT]
607
+
>
608
+
> `useClassComponent` option is deprecated in v5.
609
+
> This option will be supported with vue-i18n until v9 latest version.
602
610
603
611
### `onlyLocales`
604
612
@@ -614,10 +622,12 @@ If do you will use this option, you need to enable `jitCompilation` option.
614
622
615
623
Whether to use the import name of `petite-vue-i18n` with the same import name as vue-i18n (`import { xxx } from 'vue-i18n'`).
616
624
617
-
This option allows a smooth migration from `petite-vue-i18n` to `vue-i18n` and allows progressive enhacement.
625
+
This option allows a smooth migration from `petite-vue-i18n` to `vue-i18n` and allows progressive enhancement.
618
626
619
-
> [!IMPORTANT] > `useVueI18nImportName` option is deprecated in v5.
620
-
> This option will be supported with vue-i18n until v9 latest version.
627
+
> [!IMPORTANT]
628
+
>
629
+
> `useVueI18nImportName` option is deprecated in v5.
630
+
> This option will be supported with vue-i18n until v9 latest version.
621
631
622
632
### `optimizeTranslationDirective`
623
633
@@ -628,8 +638,8 @@ If do you will use this option, you need to enable `jitCompilation` option.
628
638
629
639
If you want to put it manually, you can specify the signature of the translation function as a string or a string array.
630
640
631
-
> [!WARNING]
632
-
> About for manually signature, see the details [vue-i18n-extensions API docs](https://github.com/intlify/vue-i18n-extensions/blob/next/docs/%40intlify/vue-i18n-extensions-api.md#translationsignatures) and [usecase from vue-i18n-extensions PR](https://github.com/intlify/vue-i18n-extensions/pull/217/files#diff-3fb9543f91e011d4b0dc9beff44082fe1a99c9eab70c1afab23c3c34352b7c38R121-R200)
641
+
> [!WARNING]
642
+
> About for manually signature, see the details [vue-i18n-extensions API docs](https://github.com/intlify/vue-i18n-extensions/blob/next/docs/%40intlify/vue-i18n-extensions-api.md#translationsignatures) and [usecase from vue-i18n-extensions PR](https://github.com/intlify/vue-i18n-extensions/pull/217/files#diff-3fb9543f91e011d4b0dc9beff44082fe1a99c9eab70c1afab23c3c34352b7c38R121-R200)
633
643
634
644
### `transformI18nBlock`
635
645
@@ -681,8 +691,8 @@ If do you will use this option, you need to enable `jitCompilation` option.
681
691
</i18n>
682
692
```
683
693
684
-
> [!IMPORTANT]
685
-
> The function **must** return a string or the build will fail.
694
+
> [!IMPORTANT]
695
+
> The function **must** return a string or the build will fail.
0 commit comments