Skip to content

Releases: jshmrtn/vue3-gettext

v4.0.0-alpha.8

30 Aug 12:42
Compare
Choose a tag to compare
v4.0.0-alpha.8 Pre-release
Pre-release

Fixes

  • Augment global types in @vue/runtime-core as well as vue
    • One works in some project while the other works in others, despite using the same vue/typescript/vue-tsc versions, I do not know why.

v4.0.0-alpha.7

21 Aug 11:45
Compare
Choose a tag to compare
v4.0.0-alpha.7 Pre-release
Pre-release

What's Changed

Fixes

  • Replace backslashes in paths to fix extraction on Windows (see Windows section in glob)
  • Make tokenizer more robust when dealing with random string delimiters

v4.0.0-alpha.6

21 Aug 09:29
Compare
Choose a tag to compare
v4.0.0-alpha.6 Pre-release
Pre-release

What's Changed

Breaking Changes

  • Removed CommonJS outputs
  • Minimum node version is not 20
  • Renamed GettextConfigOptions to Config

Fixes

  • Fix bin paths so the scripts can be called with their names again
  • Order file paths during message extraction to make it more deterministic and prevent unnecessary diffs

v4.0.0-alpha.5

08 Aug 17:32
Compare
Choose a tag to compare
v4.0.0-alpha.5 Pre-release
Pre-release

Enhancements ✨

  • Add fuzzyMatching output option to allow disabling to pass --no-fuzzy-matching to msgmerge by @TheGlenn88 in #56

v4.0.0-alpha.4

08 Aug 16:05
Compare
Choose a tag to compare
v4.0.0-alpha.4 Pre-release
Pre-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";

v4.0.0-alpha.2

07 Aug 18:59
Compare
Choose a tag to compare
v4.0.0-alpha.2 Pre-release
Pre-release

What's Changed

Enhancements ✨

  • new simplified parser

Breaking Changes

  • removed the long deprecated <translate> component and v-translate directive
  • removed disableHtmlEscaping option
  • introduced parserOptions, removed jsExtractorOpts
  • declare global types in vue instead of @vue/runtime-core (this seems to work with current dev toolings)
  • flat output is now enabled by default

New Parser

I finally got around to replacing the parse5 based parser in favor of a simple, regex-based parser. It has not yet been extensively tested but for now seems to be more robust when dealing with some of the issues the community found.

  • It can extract messages from non-js files
    • It can extract custom keywords but is otherwise not very flexible. I'm trying to keep this as simple as possible so it may not work for languages with non C-like syntax.
    • At this time, it will extract anything in the shape of $npgettext("foo", "bar", "bars"
    • It does pattern match and not fully parse files, this has some caveats:
      • It will extract messages from comments
      • It will ignore the context surrounding the message and extract even if it is syntactically invalid. One example: foo$gettext("bar"

v3.0.0-beta.6

12 Jun 09:39
Compare
Choose a tag to compare
v3.0.0-beta.6 Pre-release
Pre-release

Fixes

  • Replaced broken rollup build with tsup to fix #58

Full Changelog: v3.0.0-beta.5...v3.0.0-beta.6

v3.0.0-beta.5

03 Jun 08:40
Compare
Choose a tag to compare

What's Changed

Enhancements ✨

Breaking Changes

  • increased minimum required Node version to 18
  • use declare module "@vue/runtime-core" instead of declare module "vue"

Full Changelog: v3.0.0-beta.4...v3.0.0-beta.5

v3.0.0-beta.4

19 Dec 09:30
7304133
Compare
Choose a tag to compare

What's Changed

Fixes

Full Changelog: v3.0.0-beta.3...v3.0.0-beta.4

v3.0.0-beta.3

05 Dec 09:10
5ba9637
Compare
Choose a tag to compare

What's Changed

Enhancements ✨

New Contributors

Full Changelog: v3.0.0-beta.2...v3.0.0-beta.3