-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project: Paraglide JS 2.0 (variants, pluralization, gendering) #201
Project: Paraglide JS 2.0 (variants, pluralization, gendering) #201
Comments
This could be fixed: #146 (it is really annoying) |
@juliomuhlbauer added to the project that comes after paraglide js 2.0 (metaframework overhaul) #217 |
Progress is halted until the message format plugin, which most paraglide users use, is updated to v3 #221. While updating the message format to v3, the data model showed inconsistencies, see opral/inlang-sdk#195. Number 1 prio is to resolve the data model problems. Work on paralglide 2.0 will continue afterward |
From discord https://discord.com/channels/897438559458430986/1094614450004303993/1286100529210064960 End to end import, CRUD, export achieved Milestone achieved. We are now entering the phase of taking the observations from an end to end workflow to fix bugs and do adjustemnts where useful/required Uploading CleanShot 2024-09-18 at 19.00.29.mp4… |
Work on paraglide 2.0 continues. Might have a pre-release by the end of the day!
|
Update: The tests are passing now, but a release of Paraglide JS 2.0 is postponed until we have lix 1.0, which powers Paraglide JS. That's likely in January or February.
Shifting.the.primary.focus.from.Inlang.to.Lix.mp4 |
it would be nice to also implement something like that in v2 |
Paraglide JS 2.0 Beta has been released
Here are examples to get started https://github.com/opral/monorepo/tree/main/inlang/packages/paraglide-js/examples Paraglide.js.2.0.Beta.Overview.-converted.mp4 |
I'm very glad that you added a generic form of pluralization using Intl.PluralRules. Reading the examples and documentation, I have some feedback. Sorry if this turns out already covered by your overview video, I can't watch it because of network error. I notice the plurals need a lot of boilerplate:
With a note:
Is there a plan to make Paraglide infer the most typical case of declarations and selectors (the one documented) from a shorthand:
Otherwise I seem to need a lot of copy-pasting and the translation file will grow vertically way too fast. |
@nykula Yes, most inputs are inferred. The inlang message format plugin is responsible for the syntax. Any other syntax can be used as well (icu1, i18next, etc.). That said, expressing messages with variants is complex. So complex that we are optimizing for tooling rather than handwriting and managing JSON files. |
@samuelstroschein hi! thank you for your work! |
@gooonzick Yes. I will put updating these docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/storage-format on my todo list today |
updated the docs! |
Question about the API. Should Paraglide JS 2.0 👀 prefix import { availableLocales, type AvailableLocale, assertAvailableLocale } from "./paraglide/runtime.js"
const locale: AvailableLocale = "en"
if (availableLocales.includes("de")){
//
}
const x = assertAvailableLocale("fr") 🚀 or drop the import { locales, type Locale, assertLocale } from "./paraglide/runtime.js"
const locale: Locale = "en"
if (locales.includes("de")){
//
}
const x = assertLocale("fr") Vote with 👀 for |
Progress update end of the week (Jan 17)Jan 12 - Jan 17 ✅ paraglide js 2.0 beta ✅ astro adapter beta ❌ sveltekit adapter beta ✅ metaframework adapter overhaul approach Focus in Jan 20 - Jan 24
Targets for end of january
Paraglider.JS.2.0.Beta.Update.mp4 |
The adapters have been released as beta. Try them out and give feedback.
Target for next week
If everything goes well, have the release candidate for paraglide js 2.0 by next Friday 🔥 |
This is an error I am encountering when running
Using |
Can you try renaming your next config to .mjs? I encountered several esm related issues with nextjs that went away after renaming the config to mjs |
Does Paraglide support the next config in .ts? |
It should but on my machine a If you get a |
Oh right, I have probably forgotten to read release notes or similar. In my next config I had this: import { paraglide } from "@inlang/paraglide-next/plugin";
// ^ note the ./plugin import, hence the error mentioning "./plugin"
export default paraglide({
paraglide: {
project: "./project.inlang",
outdir: "./paraglide",
},
// ...other settings
}) But now I need to change it to import { withParaglideNext } from "@inlang/paraglide-next";
// ^ removed /plugin, imported the new function
export default withParaglideNext({
paraglide: {
project: "./project.inlang",
outdir: "./paraglide",
},
// ...other settings
}) I was also amused to see that there were no other exports from the next adapter package, and seemingly no replacement of Despite that, it works flawlessly now!! |
On track for #346: Progress.Update.on.Paraglide.js.mp4 |
I am trying to upgrade to Paraglide V2 with the nextjs adapter but I am currently getting this issue in my middleware.ts file:
I am using the same next config and middleware from this example https://github.com/opral/monorepo/tree/main/inlang/packages/paraglide/paraglide-next/example
Any help would be greatly appreciated. Thanks! |
Are you using the |
Hi. The Error: |
Arghhhhh why are beta releases so broken on NPM? Will fix this today |
New batch of beta's released:
The new beta's have the #346 API: strategy: ["pathname", "cookie", "baseLocale"] Please try it out and give feedback. If you encounter issues, please open separate issues to keep this thread clean with updates on the beta. Next steps
|
In the paraglide sveltekit beta, it seems that the logic to replace This logic : https://github.com/opral/monorepo/blob/inlang-v1/inlang/source-code/paraglide/paraglide-sveltekit/src/runtime/hooks/handle.server.ts#L162 |
Also I can't find the way to translate pathnames in the paraglide sveltekit beta? |
@mquandalle see #359 |
Context
This issue serves as "subscribe here to stay up to date with paraglide js 2.0".
Changelog
Tasks/issues
See issues with the "v2.0" label
The text was updated successfully, but these errors were encountered: