-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Description
Package.json file
fresh 2.10.3 backend and plugin starters
Node.js version
v22.13.1
Database and its version
PostgreSQL 17.2
Operating system name and version
macOS
Browser name
No response
What happended?
the "react-i18next" package is not marked as external in the admin-bundler. This means that plugins use a second instance of i18n that is never initialized.
It is currently not possible to use translations already provided by medusa in custom plugins(for example all the strings in a data table: pagination, search, filter, sort, create button etc)
I've added a reproduction repo below(just for convenience, since the plugin starter is quite old) with a minimal test page
Steps:
- [backend] setup the database, seed and create user
- [plugin]
npx medusa plugin:develop
ornpx medusa plugin:publish
- [backend]
npx medusa plugin:add my-medusa-plugin && yarn && rm -rf node_modules/.vite/deps && yarn dev
Solution:
Adding "react-i18next" in these 2 places:
"react-router-dom", |
"react-router-dom", |
Expected behavior
the strings provided by the dashboard should be available
Actual behavior
they aren't