- Ivan Demchuk (@Demivan)
Complete rewrite of the library since version 2
- Support Vue 3 and 2
- Composition api support
- Webpack loader for defining translation resources in SFC custom blocks
- Rollup/Vite plugin for defining translation resources in SFC custom blocks
- Added Typescript type definitions
- #472 Pass message attributes as i18n component slots props (@davidrios)
- Ivan Demchuk (@Demivan)
- Ivan Demchuk (@Demivan)
- Ivan Demchuk (@Demivan)
- Ivan Demchuk (@Demivan)
- Ivan Demchuk (@Demivan)
Initialization code changed from:
const enBundle = new FluentBundle('en')
const ukBundle = new FluentBundle('uk')
const fluent = createFluentVue({
locale: 'en',
bundles: [enBundle, ukBundle]
})
to:
const enBundle = new FluentBundle('en')
const ukBundle = new FluentBundle('uk')
const fluent = createFluentVue({
bundles: [enBundle]
})
Instead of using locale
property to select current locale, bundles
property is now used as current negotiated fallback chain of languages.
This allows consumers to choose language negotiation logic suitable for their app.
- Ivan Demchuk (@Demivan)
- Ivan Demchuk (@Demivan)
- Ivan Demchuk (@Demivan)
fluent-vue
fluent-vue
- Ivan Demchuk (@Demivan)
fluent-vue
- #472 Pass message attributes as i18n component slots props (@davidrios)
- David Rios (@davidrios)
- Ivan Demchuk (@Demivan)
- loader: trim leading and trailing newlines added by vue-loader (63d71fc)
- composition: Add $t and $ta methods to useFluent() (2697abe)
- component: fix runtime warning (80fae89)
- add hmr to fluent-vue-loader (4c05f49)
- allow $ta method to work without text (#170) (5597392)
- i18n component not working with message overrides (#236) (7b3c170)
- do not remove root context (de1042f)
- bring back ability to dynamically add bundles (e1360d3)
- loader: add webpack fluent-vue-loader (69e5423)
- plugin initialization code changed:
import { createFluentVue } from 'fluent-vue'
const fluent = createFluentVue({
locale: 'en',
bundles: bundles
})
Vue.use(fluent)
- instead of using order of bundles for selecting locale 'locale' property on fluent object should be used
- package: update yarn.lock to reduce vulnerabilities (faae0be)
- package: update @fluent/dedent to version 0.2.0 (2363355)
- package: update @fluent/sequence to version 0.5.0 (27e5d23)
- reduce bundle size by not bundling npm dependencies (6faca34)
- types: improve typescript type definitions (a07a8e3)
- package: make @fluent/bundle a peer dependency and @fluent/dedent a dev dependency (14c487c), closes #43
- package: update @fluent/bundle to version 0.15.0 (2991da9)
- component: add component for component interpolation (79bac0a)
- directive: add whitelist for allowed attributes on element (ee9c516), closes #11
- directive: allow to not set element textContent from translations (b4f67fd)
- directive: update translations when parameters change (3c7dfe4)
- method: add a way to get message attrs (48f68bb), closes #9
- refresh vue components when bundle list changes (bfc3039)
- plugin: allow passing multiple bundles to plugin (699838f)
- plugin: Instead on
bundle
option plugin now acceptsbundles
option with array of bundles
- directive: fix localization when element does not have attributes (a3581fd)
- directive: use directive argument for translation key (c0bf0c7)
- directive: initial directive implementation (31e4595)