-
-
Notifications
You must be signed in to change notification settings - Fork 350
Open
Labels
enhancementNew feature or requestNew feature or request
Description
With next-intl@4.5, there's now experimental support for useExtracted.
The next phase will be to collect feedback, fix bugs, potentially incorporate changes and fill in the gaps for missing features and docs.
TODO
- "Frozen" mode? (ref)
- Could be that some change events are dropped (ref)
- Ensure extraction runs before build (ref)
-
addDependency/addContextDependencyinstead of watcher? - Options for excluding line numbers? (ref, ref)
- useExtracted auto-generated message keys starting with
/cause Google crawler 404 errors #2250 - Support calling
await getExtractedwithPromise.all? - Docs/demo for monorepos (ref)
- Not shared messages (
transpilePackages: ['@acme/ui']can be used, but not necessarily) - Shared messages (what if consumers build messages themselves after running extraction script? (ref))
- Not shared messages (
- Docs about not touching target locales (but only extract to source catalog)
- Docs about static analyzability (check if errors are thrown)
- SWC plugins are "experimental" (see Remove JS-based loader bridge for SWC plugin of
useExtractedto further improve transform performance #2187) - Autocomplete with type augmentation, but allow new messages (ref). It doesn't work for .po unfortunately though.
- We should mention in docs that messages are read during build (this might be non-obvious).
- Think more about fallbacks (ref). Should we treat empty messages as errors in
next-intl? This would be a minor breaking change. People can guard against this though witht.has. - Reconsider
msgidfor .po to be ID or source message (ref 1, ref 2). Should we accept ID-less messages and generate them on demand? - Ask for more feedback
- Node.js website team
Future explorations
- How to migrate from hand-crafted keys to autogenerated ones (Codemod? Contributions are welcome)
- A way to migrate catalogs when changing the format
- Tool calls for get all missing translations / translate missing / etc.
- A way to fix source text, i.e. pick a message by key and migrate it to a new message that is synced back into source code (e.g. with an editor, or could we also just watch the source catalog and automatically sync to source?)
- Validation that extracted message for source locale matches source code
- ESLint rule that checks that you're not using dynamic expressions with
t - Provide supplemental descriptions for translations automatically via AI (related: Crowdin Context Harvester)
- Improve/add defaults
- Detect
srcPathautomatically (like Tailwind) - Also all others could have defaults, but the question remains whether extraction remains opt-in
- Detect
- Remove JS-based loader bridge for SWC plugin of
useExtractedto further improve transform performance #2187 - Support for
use-intl(related to ☂️ Umbrella: Support for other frameworks #1863)
This list acts as my personal todo list that I want to share for transparency, but please be sure to comment here if you have feedback for the feature:
→ #2036
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request