Skip to content

v4.0.0-alpha.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@lzurbriggen lzurbriggen released this 08 Aug 16:05
· 0 commits to master since this release

What's Changed

Enhancements ✨

  • Implemented another new parser

Breaking Changes

  • Message ids are not trimmed anymore. this was likely initially implemented to deal with ids in HTML (using <translate>/v-translate)
  • Line breaks are now normalized to LF across the board (\r\n in messages will always become \n)
  • The generated .pot now uses UTF-8 encoding (generated .po files then defaulted to ASCII, which was problematic)

Fixes

  • Package exports pointed to the wrong file extensions
    • (CommonJS module is still available, it will soon be removed)

New Parser 2

  • It is now a recursive descent parser
    • A bit more code, but it's easier to deal with some edge cases this way
  • The API is unstable, but it is exposed, you can import e.g. import { tokenize } from "vue3-gettext";