Releases: labd/intl-extractor
v2.0.1
v2.0.0
Major Changes
-
9e5046e: Watch mode and updated workflows
Watch mode
This release adds watch mode using
@parcel/watcher
(optional dependency). Use--watch
or-w
cli flag to run.
Note: This is a simple implementation that just reprocesses all files once there's an update.Breaking change: Only one input directory is allowed instead of multiple, this is so we do not have to run multiple watchers for each input directory.
Other
- Update to pnpm 10
- Use corepack
- Use unified release workflow for Lab Digital packages
v1.1.0
v1.0.0
Major Changes
-
49b4b35: Output labels to a single json file
What changed
Instead of creating individual
<File>.labels.json
files for each TypeScript file it will now output a single JSON file containing all the namespaces and labels.
It conforms to hownext-intl
works and removes the inbetween step since we can automate with this tool.Next to this the argument for passing directories has changed from
--source
to--input
as it's confusing withsource.json
otherwise.Why
Individual
*.labels.json
files were helpful to colocate labels and merge them to the single required JSON file. But now that we have this extractor we can just check all usages ofuseTranslations
andgetTranslations
and merge them directly.Also the original implementation took file names as input instead of the used namespaces which led to unused labels and no support for multiple namespaces in one file.
How to update
- Make sure your output JSON file is completely up to date
- Update the extractor
- Use
--input
instead of--source
for input files - Run extractor
- Remove all
*.labels.json
files from your project :)