Skip to content

Commit e10e0ee

Browse files
authored
prerelease release v9.0.0-beta.9 (#208)
* prerelease release v9.0.0-beta.9 * docs: update
1 parent 367ee90 commit e10e0ee

File tree

3 files changed

+38
-295
lines changed

3 files changed

+38
-295
lines changed

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11

2+
## v9.0.0-beta.9 (2020-12-04)
3+
4+
#### :star: Features
5+
* [#206](https://github.com/intlify/vue-i18n-next/pull/206) feat: resources merge to global scope ([@kazupon](https://github.com/kazupon))
6+
* [#200](https://github.com/intlify/vue-i18n-next/pull/200) feat: add te for composition API ([@kazupon](https://github.com/kazupon))
7+
8+
#### :bug: Bug Fixes
9+
* [#199](https://github.com/intlify/vue-i18n-next/pull/199) fix: plural rules compatibilites ([@kazupon](https://github.com/kazupon))
10+
11+
#### :zap: Improvement Features
12+
* [#197](https://github.com/intlify/vue-i18n-next/pull/197) improve: component injection properties typing hints on VSCode ([@kazupon](https://github.com/kazupon))
13+
14+
#### :boom: Breaking Change
15+
* [#204](https://github.com/intlify/vue-i18n-next/pull/204) breaking: change globalInjection default disable ([@kazupon](https://github.com/kazupon))
16+
17+
#### :pencil: Documentation
18+
* [#203](https://github.com/intlify/vue-i18n-next/pull/203) docs: typos in website header and submenu ([@chartrandf](https://github.com/chartrandf))
19+
20+
#### Committers: 2
21+
- Francis Chartrand ([@chartrandf](https://github.com/chartrandf))
22+
- kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
23+
24+
225
## v9.0.0-beta.8 (2020-11-18)
326

427
#### :bug: Bug Fixes

README.md

+14-294
Original file line numberDiff line numberDiff line change
@@ -32,52 +32,12 @@ Internationalization plugin for Vue.js
3232

3333
## Status: Beta ![Test](https://github.com/intlify/vue-i18n-next/workflows/Test/badge.svg)
3434

35-
The current codebase has most of the existing features on Vue I18n v8.x and is usable.
35+
- [Documetantion](https://vue-i18n-next.intlify.dev/) (beta)
36+
- If you use stable Vue I18n version, see this [repository](https://github.com/kazupon/vue-i18n)
3637

37-
Since the library is still unstable **and because we want feedback** on bugs and missing features, **it will probably go through a few breaking changes**.
38-
39-
If you use stable Vue I18n version, see this [repository](https://github.com/kazupon/vue-i18n)
40-
41-
## :star: New Features
42-
43-
### Message Format Syntax
44-
- Literal Interpolation
45-
- You can use a single quote `'` and "Mustache" like (`{` `}` ) to make the message literal.
46-
- e.g. `foo{'@'}domain.com`
47-
- Message Functions
48-
- As with Vue's render function, vue-i18n-next (and future releases) support the **Message** functions.
49-
- Using the Message function has the following advantages:
50-
- Accelerate evaluation of vue-i18n messages (pre-compilation)
51-
- Support for complex i18n that cannot be handled by message format
52-
53-
### Composition API
54-
55-
New style API for Vue Composition API. See the following docs:
56-
57-
- [createI18n](https://vue-i18n-next.intlify.dev/api/general.html#createi18n)
58-
- [I18nOptions](https://vue-i18n-next.intlify.dev/api/general.html#i18noptions)
59-
- [ComposerOptions](https://vue-i18n-next.intlify.dev/api/composition.html#composeroptions)
60-
- [VueI18nOptions](https://vue-i18n-next.intlify.dev/api/legacy.html#vuei18noptions)
61-
- [useI18n](https://vue-i18n-next.intlify.dev/api/composition.html#usei18n)
62-
- [ComposerOptions](https://vue-i18n-next.intlify.dev/api/composition.html#composeroptions)
63-
- [Composer](https://vue-i18n-next.intlify.dev/api/composition.html#composer)
64-
- [VueI18n](https://vue-i18n-next.intlify.dev/api/legacy.html#vuei18n)
65-
66-
### `<i18n-t>` Component (formerly called `<i18n>` component)
67-
68-
You can use pluralization on the component. See the below examples:
69-
70-
- [Example with using Composition API](https://github.com/intlify/vue-i18n-next/blob/master/examples/composition/components/translation.html)
71-
- [Example with using Legacy API](https://github.com/intlify/vue-i18n-next/blob/master/examples/legacy/components/translation.html)
72-
73-
### `<i18n-d>` Component
74-
75-
You can use datetime format on the component, like `<i18n-n>` component.
76-
77-
See the below examples:
78-
79-
- [Example with using Composition API](https://github.com/intlify/vue-i18n-next/blob/master/examples/composition/components/datetime-format.html)
80-
- [Example with using Legacy API](https://github.com/intlify/vue-i18n-next/blob/master/examples/legacy/components/datetime-format.html)
38+
## :raising_hand: About support for v9 and earlier
39+
- v6 and earlier: drop supporting
40+
- v7 and v8: become LTS upon vue-i18n v9 release with an 12 months maintenance lifespan
8141

8242
## :lollipop: Examples
8343

@@ -86,262 +46,22 @@ See the [`examples`](https://github.com/intlify/vue-i18n-next/tree/master/exampl
8646
The examples are offered in thee following two API styles:
8747

8848
- composition
89-
- Examples with using new vue-i18n API optimized for Vue 3
49+
- Examples with using new vue-i18n API for Vue 3 Composition API
9050
- legacy
9151
- Examples with using vue-i18n API that are almost compatible with vue-i18n v8.x
9252

93-
## :raising_hand: About support for v9 and earlier
94-
- v6 and earlier: drop supporting
95-
- v7 and v8: become LTS upon vue-i18n v9 release with an 15 months maintenance lifespan
96-
97-
## :heavy_exclamation_mark: Known issues
98-
99-
### :boom: Breaking changes compared to vue-i18n v8.x
100-
101-
#### Message Format Syntax
102-
- Special characters
103-
- Since vue-i18n-next, the message format syntax is handled by the compiler.
104-
- List interpolation is no longer allowed for array-like objects (e.g. `{ '0': 'hello' }`).
105-
- The following characters used in the message syntax are processed by the compiler as special characters:
106-
- `{`, `}`, `@`, `$`, `|`
107-
- If you want to use these special characters, you can use **literal interpolation** to get around it.
108-
- Linked messages
109-
- No longer use grouping by brackets for key of linked messages.
110-
- v9 and later use **named, list, and literal interpolations**
111-
112-
#### APIs
113-
- The return value of `$t` and `t` methods is **string** only. object and array values are no longer returned.
114-
- As an alternative way, you can use `$tm` / `tm`
115-
- The return value of `$tc` and `tc` methods is **string** only. object and array values are no longer returned.
116-
- As an alternative way, you can use `$tm` / `tm`
117-
- `VueI18n` class cannot used with `new`. It can only be used via the `$i18n` property of Vue instance.
118-
- In vue-i18n-next, by replacing `new VueI18n` with `createI18n`, you can use existing `VueI18n` options as they are.
119-
- See the `examples/legacy` directory.
120-
- `VueI18n.prototype.getChoiceIndex`
121-
- -> Legacy API style: `pluralizationRules` option of `createI18n` factory function (like `new VueI18n(...)`)
122-
- -> Compsable API style: `pluralRules` option of `createI18nComposer` factory function
123-
- `warnHtmlInMessage` option:
124-
- Composition API: `warnHtmlMessage` boolean property, default `true`.
125-
- Legacy API: `warnHtmlInMessage` property.
126-
- For development mode, warning is default.
127-
- For production mode, HTML message detect is not check due to performance.
128-
- `v-t` directive
129-
- `preserve` modifier deprecated, keep Element content
130-
- Legacy API `preserveDirectiveContent` option, and property deprecated
131-
- `VueI18n.version` -> `import { VERSION } from 'vue-i18n'`
132-
- `VueI18n.availabilities` -> `import { availabilities } from 'vue-i18n'`
133-
- See the details [here](https://github.com/intlify/vue-i18n-next/blob/master/docs/api/vue-i18n.md)
134-
135-
#### Components
136-
- `<i18n>` component
137-
- Rename to `<i18n-t>` component
138-
- Remove `Boolean` type from `tag` prop
139-
- if `tag` prop is not specified, return the Fragment
140-
- Remove the below props:
141-
- `place` prop
142-
- `places` prop
143-
- `path` prop (Rename to `keypath` prop)
144-
- `<i18n-n>` component
145-
- Remove `Boolean` type from `tag` prop
146-
- if `tag` prop is not specified, return the Fragment
147-
148-
### :zap: Improvements
149-
150-
- See the [vue-i18n issues](https://github.com/kazupon/vue-i18n/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Ready%22) that are labeled with `Status: Ready`
151-
152-
153-
### :hammer: Missing features
154-
155-
- Custom formatting
156-
- Tooling
157-
- `@intlify/devtools`
158-
- `vue-cli-plugin-i18n`
159-
- `@intlify/eslint-plugin-vue-i18n`
160-
161-
162-
## :cd: Installation
163-
164-
### npm
165-
166-
```bash
167-
npm install --save vue-i18n@next
168-
```
169-
170-
### yarn
171-
```bash
172-
yarn add vue-i18n@next
173-
```
174-
175-
## :package: About dist files
176-
177-
### From CDN or without a Bundler
178-
179-
- **`vue-i18n.global(.prod).js`**:
180-
- For direct use via `<script src="...">` in the browser. Exposes the `VueI18n` global.
181-
- Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and are only meant for direct use via `<script src="...">`.
182-
- Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `*.prod.js` files for production.
183-
184-
- **`vue-i18n.esm-browser(.prod).js`**:
185-
- For usage via native ES modules imports (in browser via `<script type="module">`.
186-
- Shares the same runtime compilation, dependency inlining and hard-coded prod/dev behavior with the global build.
187-
188-
### With a Bundler
189-
190-
- **`vue-i18n.esm-bundler.js`**:
191-
- For use with bundlers like `webpack`, `rollup` and `parcel`.
192-
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler)
193-
- Does not ship minified builds (to be done together with the rest of the code after bundling)
194-
195-
#### Bundler Build Feature Flags
196-
197-
Starting with 9.0.0-beta.2, `esm-bundler` builds now exposes global feature flags that can be overwritten at compile time:
198-
199-
- `__VUE_I18N_FULL_INSTALL__` (enable/disable, in addition to vue-i18n APIs, components and directives all fully support installation: `true`)
200-
- `__VUE_I18N_LEGACY_API__` (enable/disable vue-i18n legacy style APIs support, default: `true`)
201-
- `__INTLIFY_PROD_DEVTOOLS__` (enable/disable intlify-devtools and vue-devtools support in production, default: `false`)
202-
203-
The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree-shaking in the final bundle. To configure these flags:
204-
205-
- webpack: use [DefinePlugin](https://webpack.js.org/plugins/define-plugin/)
206-
- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
207-
- Vite: configured by default, but can be overwritten using the [`define` option](https://github.com/vitejs/vite/blob/a4133c073e640b17276b2de6e91a6857bdf382e1/src/node/config.ts#L72-L76)
208-
209-
Note: the replacement value **must be boolean literals** and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions.
210-
21153

212-
## :white_check_mark: TODOs
213-
<details>
54+
## :white_check_mark: Tasks for release
21455

215-
- Intlify message format compiler
216-
- [x] vue-i18n message format
217-
- [x] sourcemap
218-
- [x] HTML format handling
219-
- [ ] more unit (fuzzing) tests
220-
- [x] performance tests (benchmark)
221-
- Intlify core runtime
222-
- [x] translate function
223-
- [x] datetime function
224-
- [x] number function
225-
- [x] warnHtmlMessage
226-
- [x] improve translate `args` typing
227-
- [x] improve locale messages typing: `LocaleMessages` / `LocaleMessage` / `LocaleMessageDictiory`
228-
- [x] postTranslation context option
229-
- Composition API: I18n Composer
230-
- properties
231-
- [x] locale
232-
- [x] fallbackLocale
233-
- [x] inheritLocale
234-
- [x] availableLocales
235-
- [x] messages
236-
- [x] modifiers
237-
- [x] pluralRules
238-
- [x] missingWarn
239-
- [x] fallbackWarn
240-
- [x] fallbackRoot
241-
- [x] fallbackFormat
242-
- [x] dateTimeFormats
243-
- [x] numberFormats
244-
- [x] warnHtmlMessage
245-
- [x] escapeParameter
246-
- methods
247-
- [x] t
248-
- [x] getLocaleMessages
249-
- [x] setLocaleMessages
250-
- [x] mergeLocaleMessages
251-
- [x] d
252-
- [x] getDateTimeFormat
253-
- [x] setDateTimeFormat
254-
- [x] mergeDateTimeFormat
255-
- [x] n
256-
- [x] getNumberFormat
257-
- [x] setNumberFormat
258-
- [x] mergeNumberFormat
259-
- [x] getPostTranslationHandler
260-
- [x] setPostTranslationHandler
261-
- [x] getMissingHandler
262-
- [x] setMissingHandler
263-
- [x] tm
264-
- Legacy API: compatible supporting
265-
- VueI18n
266-
- [x] locale
267-
- [x] fallbackLocale
268-
- [x] sync
269-
- [x] availableLocales
270-
- [x] messages
271-
- [x] pluralizationRules
272-
- [x] dateTimeFormats
273-
- [x] numberFormats
274-
- [x] formatter
275-
- [x] missing
276-
- [x] silentTranslationWarn
277-
- [x] silentFallbackWarn
278-
- [x] formatFallbackMessages
279-
- [x] preserveDirectiveContent
280-
- [x] warnHtmlInMessage
281-
- [x] escapeParameterHtml
282-
- [x] postTranslation
283-
- [x] componentInstanceCreatedListener
284-
- [x] t
285-
- [x] tc
286-
- [x] te
287-
- [x] getLocaleMessage
288-
- [x] setLocaleMessage
289-
- [x] mergeLocaleMessage
290-
- [x] d
291-
- [x] getDateTimeFormat
292-
- [x] setDateTimeFormat
293-
- [x] mergeDateTimeFormat
294-
- [x] n
295-
- [x] getNumberFormat
296-
- [x] setNumberFormat
297-
- [x] mergeNumberFormat
298-
- [x] getChoiceIndex
299-
- [x] tm
300-
- Inejcted in Vue Prototype API
301-
- [x] $i18n
302-
- [x] $t
303-
- [x] $tc
304-
- [x] $te
305-
- [x] $d
306-
- [x] $n
307-
- [x] $tm
308-
- Component options
309-
- [x] messages
310-
- [x] pluralRule
311-
- [x] dateTimeFormats
312-
- [x] numberFormats
313-
- [x] sharedMessages
314-
- [x] plugin install & mixin
315-
- [x] version
316-
- [x] IntlAvailability availabilities
317-
- Components
318-
- [x] Translation `<i18n-t>`
319-
- [x] NumberFormat `<i18n-n>`
320-
- [x] DatetimeFormat `<i18n-d>`
321-
- Directive
322-
- [x] `v-t`
323-
- Tool Chains
324-
- [ ] intlify devtools
325-
- [x] vue-devtools
326-
- [x] vue-i18n-extensions
327-
- [x] vue-i18n-loader
328-
- [x] rollup-plugin-vue-i18n
329-
- [x] vite-plugin-vue-i18n
330-
- [ ] vue-cli-plugin-i18n
331-
- [-] eslint-plugin-vue-i18n
332-
- [ ] transformer for vue-jest
333-
- Others
334-
- [ ] documentation
335-
- [x] fallback localization (bubble up)
336-
- [x] SSR
337-
- General tasks
338-
- [x] error handlings
339-
- Next Tasks (v9.1)
340-
- [ ] monorepo
341-
- [ ] message format pre-compilation tools
56+
- [ ] monorepo packaging
57+
- [ ] support fully univarsal environments (CSP)
58+
- [ ] support i18n resources packing (pre-compilation) CLI
59+
- [ ] vue-cli-plugin-i18n
60+
- [ ] support i18n custom blocks sourcemaps
34261

343-
</details>
62+
## :muscle: Contribution
34463

64+
Please make sure to read the [Contributing Guide](https://github.com/intlify/vue-i18n-next/blob/master/.github/CONTRIBUTING.md) before making a pull request.
34565

34666
## :copyright: License
34767

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-i18n",
33
"description": "Internationalization plugin for Vue.js",
4-
"version": "9.0.0-beta.8",
4+
"version": "9.0.0-beta.9",
55
"author": {
66
"name": "kazuya kawaguchi",
77
"email": "[email protected]"

0 commit comments

Comments
 (0)