RFC: Message extraction #2036
Replies: 12 comments 29 replies
-
|
Question from @jurerotar:
Answer: Yep, namespaces are being considered, they are currently only briefly mentioned in regard to monorepos in the catalog generation section. E.g.: const t = useExtracted('namespace');
t('Hey there!');… would generate e.g.: {
"namespace": {
"5VpL9Z": "Hey there"
}
}I think the point is valid and this should be clarified more visibly (and perhaps not just be a "future exploration"). The ultimate goal for Does that answer the question? |
Beta Was this translation helpful? Give feedback.
-
|
Quick poll: After reading the section on File formats & AI translation, which file format would you prefer as a default?
|
Beta Was this translation helpful? Give feedback.
-
|
Another poll: Do you prefer import {useExtracted} from 'next-intl';
function InlineMessages() {
const t = useExtracted();
return <h1>{t('Look ma, no keys!')}</h1>;
}import {useInlined} from 'next-intl';
function InlineMessages() {
const t = useInlined();
return <h1>{t('Look ma, no keys!')}</h1>;
}Please vote with your preference:
I'd also appreciate if you leave a comment here explaining why you prefer a particular option! (or why the alternative is bad) |
Beta Was this translation helpful? Give feedback.
-
|
Some thoughts on rich text formatting from @niieani:
I think it's an interesting approach, somewhere in the middle of using direct concatenation and using arguments in ICU strings. Kind of a hybrid solution in contrast to what the RFC currently discusses. |
Beta Was this translation helpful? Give feedback.
-
|
A first release is out in Learn more: |
Beta Was this translation helpful? Give feedback.
-
|
Thanks again for working on this. I wanted to share some initial feedback: 1. Source string in PO filesRight now, the In other frameworks using Gettext (like Phoenix), the It would be great to have an option for this behavior, or at least include the source string as a comment above each 2. Deterministic compilationCurrently, every Ideally, the output should be deterministic and only update when translations are actually added, modified, or removed. |
Beta Was this translation helpful? Give feedback.
-
|
Something else I just noticed: Fallback for untranslated stringsRight now, untranslated strings render as empty. It would be great if they could fall back to the default locale. For example, if a string isn’t yet translated to |
Beta Was this translation helpful? Give feedback.
-
|
Is the package tree-shakeable and does it bundle only the messages used by the current page — similar to how @inlang/paraglide-sveltekit works for SvelteKit? |
Beta Was this translation helpful? Give feedback.
-
|
Should it work with monorepo? Seems like message aren't picked up from packages at build or dev. |
Beta Was this translation helpful? Give feedback.
-
|
i dont have src folder and i want extract from root folder so when use srcPath: "./",instead of srcPath: ["./actions", "./app", "./components", "./lib", "./schemas"],messages not extracted
|
Beta Was this translation helpful? Give feedback.
-
|
Will this work if |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Please use this thread to share feedback related to the RFC on message extraction.
This is my public TODO list for the feature: #2087 (but please keep the feedback here)
Beta Was this translation helpful? Give feedback.
All reactions