Skip to content
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

📜 Plans for v1.0.0 release #19

Open
3 of 10 tasks
yassinedoghri opened this issue Aug 22, 2022 · 16 comments
Open
3 of 10 tasks

📜 Plans for v1.0.0 release #19

yassinedoghri opened this issue Aug 22, 2022 · 16 comments

Comments

@yassinedoghri
Copy link
Owner

yassinedoghri commented Aug 22, 2022

astro-i18next is currently in beta. Before releasing v1.0.0, some things need to be worked out, mainly to improve DX.

Developers should be able to translate their Astro website / app as fast as possible --> reduce manual tasks to setup / use the integration.

Roadmap:


EDIT 2022-11-06: beta.13 is now out and I'm getting closer to a clean and simple API for everyone. Any feedback is welcome!

@yassinedoghri yassinedoghri changed the title Plans for v1.0.0 release 📜 Plans for v1.0.0 release Aug 22, 2022
@yassinedoghri yassinedoghri pinned this issue Aug 22, 2022
@aFuzzyBear
Copy link

if there anything you need from us just let me know @yassinedoghri 👊

@L1lith
Copy link

L1lith commented Aug 29, 2022

Hot Module Reloading localized pages instead of running the npx astro-i18next generate command manually. Probably by creating a Vite plugin and adding it to the astro:config:setup hook.

This sounds super awesome!

@jaysalvat
Copy link

Great! The Hot Module Reloading is a Must-have. Can't wait :)

@bobcafedev
Copy link

would be nice to have SSR with deno too, right now can't build : Cannot bundle Node.js built-in "fs" imported from "node_modules/i18next-fs-backend/esm/fs.cjs". Consider disabling ssr.noExternal or remove the built-in dependency.

@yassinedoghri
Copy link
Owner Author

would be nice to have SSR with deno too, right now can't build : Cannot bundle Node.js built-in "fs" imported from "node_modules/i18next-fs-backend/esm/fs.cjs". Consider disabling ssr.noExternal or remove the built-in dependency.

Hey @bobcafedev, i18next-fs-backend is not a dependency. It's a plugin you can install to load your translation files. Seeing its documentation, it can be used with deno. So in your astro-i18next config, I'm guessing you have to set the deno land url to use it:

/** @type {import('astro-i18next').AstroI18nextConfig} */
export default {
  defaultLanguage: "en",
  supportedLanguages: ["en", "fr"],
  i18next: {
    debug: true,
    initImmediate: false,
    backend: {
      loadPath: "./src/locales/{{lng}}.json",
    },
  },
  i18nextPlugins: { fsBackend: "https://deno.land/x/i18next_fs_backend/index.js" },
};

That being said, I've never used deno myself, and there maybe some more tweaking to be done in order to load i18next using its deno.land url. (https://deno.land/x/i18next/index.js)

@mvllow
Copy link

mvllow commented Nov 13, 2022

add i18next plugins to config
👉 removed in beta.13, astro-i18next takes care of the basic stuff (loading translation strings, locale detection, etc.)

Is there any documentation for supporting plugins again? Using i18next-decode-postprocessor has been crucial for avoiding loading translated strings with special characters as html, e.g. via dangerouslySetInnerHTML.

@yassinedoghri
Copy link
Owner Author

yassinedoghri commented Nov 15, 2022

Is there any documentation for supporting plugins again? Using i18next-decode-postprocessor has been crucial for avoiding loading translated strings with special characters as html, e.g. via dangerouslySetInnerHTML.

Not in beta.13. I'll add support for plugins in the next release. Sorry for the trouble.

Edit: it's back on beta.14

@lorenzolewis
Copy link

@yassinedoghri is there any help you'd like around the extract functionality? That's honestly the last bit I'd love to have before jumping in 100% and wouldn't mind helping out with it.

@yassinedoghri
Copy link
Owner Author

yassinedoghri commented Jan 18, 2023

@yassinedoghri is there any help you'd like around the extract functionality? That's honestly the last bit I'd love to have before jumping in 100% and wouldn't mind helping out with it.

@lorenzolewis I wouldn't mind the help, thank you! 🙂
Just found an easy way to extract keys using i18next-scanner + merge them to resource files. Then, I'm guessing that there would only need to be a custom config for astro-i18next.
Feel free to open a PR if you get it to work 👍

Edit: I've created an issue where we can discuss the implementation. #108

@onionhammer
Copy link

@yassinedoghri is there a separate issue for tracking "astro's injectRoute function in the astro:config:setup to inject localized routes" ?

@yassinedoghri
Copy link
Owner Author

@onionhammer just created it! #110

@salloom-domani
Copy link

salloom-domani commented Apr 24, 2023

@yassinedoghri
Any plans for supporting Cloudflare SSR adapter?

Edit: I'll be glad to help with it

@onionhammer
Copy link

@Luxauram you will need to incorporate the language into your links as well, the localizeUrl utility is for that

@Luxauram
Copy link

@Luxauram you will need to incorporate the language into your links as well, the localizeUrl utility is for that

Dude sorry, you look intelligent... I have a problem with i18next and 404. I actually can't localizePath with the 404. So when I'm in the second lang pages and I type some wrong urls I get redirect to the 404 WITH THE DEFAULT Lang, not the actual I'm into.... How is this manageable? Can you help me?

@fnowacki
Copy link

Hey @yassinedoghri 👋 any updates?

@danawoodman
Copy link

Plans for v1.0 release: abandon project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests