Highlights
New Translations features
This release expands the capabilities of Translations. Note that Translations is still an experimental feature. Refer to our documentation on how to get started.
New translatable core data models
We have extended the set of core translatable data models to include:
- Shipping Option
- Region
- Customer Group
- Shipping Option Type
If you need additional core data models to be translatable, please feel free to open an issue and we will address it as soon as possible.
Support for custom data models
We have added support for translating data models from custom modules. These can be specified in the module options of the @medusajs/translation module, as shown below:
module.exports = defineConfig({
projectConfig: { ... },
modules: [
{
resolve: "@medusajs/translation",
options: {
entities: [{ type: "post", fields: ["title"] }],
},
},
],
featureFlags: {
translation: true,
},
})The API is still under development and may change in a future release.
When custom data models are specified in the module options, they are automatically detected and will allow merchants to add translations from the admin dashboard without any additional setup.
Fetching the localized version of your data is easily done with query.graph:
const { data } = query.graph(
{
entity: "post",
fields: ["title"]
},
{
locale: "de-DE"
}
)Simply pass the locale option and Medusa will take care of the rest under the hood.
Generate types during build
This release improves our build-tooling to generate types in .medusa/types/ during the build. This ensures that types used during development will not cause the production build to fail.
Resolved risk of critical data loss
This release solves an issue with order-deletion, that could lead to critical data loss. See PR here. The issue was reported by @mo6zes and solved shortly after. We will publish an advisory describing the details soon.
Although, the data loss could only happen under rare circumstances, we advise upgrading to the latest version as soon as possible.
Features
- feat(): Auto generated types generation upon build by @adrien2p in #14337
- feat(): Translation settings + user configuration + admin hook and js sdk + dashboard by @adrien2p in #14355
- feat(dashboard): Add first and last name inputs to update order shipping and billing address forms by @NicolasGorga in #14394
- feat(translation,core-flows): translate remaining core entities and sync shipping option <> method translations by @NicolasGorga in #14358
- feat(core-flows,utils): Shipping options workflow events emission by @NicolasGorga in #14388
- feat(dashboard,draft-order): Remove hardcoded strings and replace with translations in draft orders list page by @NicolasGorga in #14400
- feat(medusa,utils,core-flows): add reset password metdata by @riqwan in #14417
- feat(translation): Update wording in translation list for translation… by @adrien2p in #14453
- feat(translation): Order translastable entities ordered alphabetically by @adrien2p in #14451
- feat(translation): Add support for locale to the graph query by @adrien2p in #14454
- feat(translation): Improve translation alert in empty languages state by @adrien2p in #14464
Bugs
- fix(core-flows): fix type of getTranslatedLineItemsStep by @shahednasser in #14338
- fix(medusa): fix type of product variant request param by @shahednasser in #14342
- fix(order): Prevent fetching all db adjustments when no items are pre… by @adrien2p in #14351
- fix(medusa): allow passing null to cart API routes by @shahednasser in #14381
- fix(medusa,framework): HMR file watch by @carlos-r-l-rodrigues in #14390
- fix(types): add missing completed_at property for carts by @shahednasser in #14412
- fix(dashboard): fix customer details page crashing when their order is refunded by @shahednasser in #14413
- fix(dashboard): form reset for across allocation by @fPolic in #14369
- fix(core-flows): Avoid checking inventory items on fulfillment cancel for unmanaged inventory variants by @NicolasGorga in #14177
- fix(core-flows): conditionally create customer on order email update if unset by @NicolasGorga in #14264
- fix(translation): omit id from types properties by @adrien2p in #14445
- fix(js-sdk): add metadata parameter to request body type of reset-password route by @shahednasser in #14458
- fix(create-medusa-app): fix version option not working with Next.js storefront by @shahednasser in #14462
Documentation
- docs: document cloud sign in methods, usage and add-on changes by @shahednasser in #14333
- docs: generate API reference for 2.12.3 by @shahednasser in #14341
- docs: generate references manually for 2.12.3 by @shahednasser in #14340
- docs: add vite configuration to docker guide by @shahednasser in #14352
- docs: fixes related to troubleshooting by @shahednasser in #14353
- docs: fix total descriptions across docs by @shahednasser in #14366
- docs: add admin extensions to navbar by @shahednasser in #14368
- docs: add line highlight validation by @shahednasser in #14380
- docs-utils: add operator map to docs generator knowledge base by @shahednasser in #14382
- docs: small fixes and improvements to text by @shahednasser in #14385
- docs-utils: performance improvements for the clean OAS script by @shahednasser in #14386
- docs: resolve example tag in DML properties by @shahednasser in #14383
- docs: allow stop generation of answer in AI assistant by @shahednasser in #14387
- docs: various improvements to introduction guides by @shahednasser in #14398
- docs: use 200 for routes response across docs by @shahednasser in #14418
- docs: add how-to guide for removing country code in storefront prefix by @shahednasser in #14419
- docs: added support for tests in www workspace by @shahednasser in #14415
- docs: add examples for migrations by @shahednasser in #14420
- docs: added callouts in search and AI assistant by @shahednasser in #14421
- docs: added tests for components in api-reference project by @shahednasser in #14428
- docs: fix styling of code elements in headers by @shahednasser in #14440
Chores
- chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #14336
- chore(docs): Update version in documentation (automated) by @github-actions[bot] in #14334
- chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in #14335
- chore: fix TSDocs of total fields to be accurate by @shahednasser in #14367
- chore: Ensure isolated order deletion by @olivermrbl in #14405
- chore: Create publishable API key as part of the defaults by @olivermrbl in #14356
- chore: Add Claude Code commands by @olivermrbl in #14438
- chore: fix eslint config in root by @shahednasser in #14444
- chore(medusa): add missing fields and filters to product variants endpoint by @NicolasGorga in #14448
- chore: Require manual trigger of Claude review by @olivermrbl in #14455
- chore: update TSDocs + export getTranslatedShippingOptionsStep from core-flows by @shahednasser in #14460
Other Changes
- fix(translation): prevent duplicate locale error on server restart by @0xFl4g in #14345
- feat(medusa): add generated .medusa/types to local plugins by @leobenzol in #13777
- Revert "feat(medusa): add generated .medusa/types to local plugins" by @adrien2p in #14361
- feat: added ka-GE to the default list of locales by @homosape in #14364
- feat: add Medusa Cloud OAuth provider by @peterlgh7 in #14395
- Fix typo in Medusa API key instructions by @Arpitgoyalgg in #14435
- Update PostHog API Key link in page.mdx by @calebro-xyz in #14433
- chore: Add Claude Code GitHub Workflow by @olivermrbl in #14439
New Contributors
- @homosape made their first contribution in #14364
- @Arpitgoyalgg made their first contribution in #14435
- @calebro-xyz made their first contribution in #14433
Full Changelog: v2.12.3...v2.12.4