Releases: jshmrtn/vue3-gettext
Releases · jshmrtn/vue3-gettext
v4.0.0-alpha.8
Fixes
- Augment global types in
@vue/runtime-core
as well asvue
- 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
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
What's Changed
Breaking Changes
- Removed CommonJS outputs
- Minimum node version is not 20
- Renamed
GettextConfigOptions
toConfig
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
Enhancements ✨
- Add
fuzzyMatching
output option to allow disabling to pass --no-fuzzy-matching to msgmerge by @TheGlenn88 in #56
v4.0.0-alpha.4
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 toASCII
, 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
What's Changed
Enhancements ✨
- new simplified parser
Breaking Changes
- removed the long deprecated
<translate>
component andv-translate
directive - removed
disableHtmlEscaping
option - introduced
parserOptions
, removedjsExtractorOpts
- 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
Fixes
- Replaced broken
rollup
build withtsup
to fix #58
Full Changelog: v3.0.0-beta.5...v3.0.0-beta.6
v3.0.0-beta.5
What's Changed
Enhancements ✨
Breaking Changes
- increased minimum required Node version to 18
- use
declare module "@vue/runtime-core"
instead ofdeclare module "vue"
Full Changelog: v3.0.0-beta.4...v3.0.0-beta.5
v3.0.0-beta.4
What's Changed
Fixes
- fix: cosmiconfig update to allow ESM config file @cpontvieux-systra #54
Full Changelog: v3.0.0-beta.3...v3.0.0-beta.4
v3.0.0-beta.3
What's Changed
Enhancements ✨
- feat: allow gettext.config.mjs config files by @cpontvieux-systra in #52
New Contributors
- @cpontvieux-systra made their first contribution in #52
Full Changelog: v3.0.0-beta.2...v3.0.0-beta.3