Skip to content

0.4.0

Compare
Choose a tag to compare
@QuiiBz QuiiBz released this 08 Apr 20:05
· 113 commits to main since this release

Breaking changes

This release contains several breaking changes, as we move closer to a v1:

  • createI18n<typeof Locale>() doesn't require anymore a generic, you should now have createI18n()
  • useI18n hook now only returns a t function, instead of an object containing both t and scopedT functions
  • A new useScopedI18n hook replaces the old scopedT function, and works similarly

And some new features:

  • A new useCurrentLocale hook that is correctly typed and returns the current locale
  • Improved types for params extraction of the translations

The README has been updated to reflect those changes. Huge thanks to @baptisteArno and @mieszkosabo for landing these improvements!

What's Changed

  • feat(international-types): improve plural extraction by @QuiiBz in #45
  • fix(international-types): allow multiple params in plural by @QuiiBz in #46
  • feat: add use scoped i18n hook by @baptisteArno in #48
  • fix: use workspace:* protocol by @QuiiBz in #49
  • feat: better type-safety for locales by @mieszkosabo in #52

New Contributors

Full Changelog: 0.3.6...0.4.0