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:
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:
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 https://github.com/medusajs/medusa/pull/14337
feat(): Translation settings + user configuration + admin hook and js sdk + dashboard by @adrien2p in https://github.com/medusajs/medusa/pull/14355
feat(dashboard): Add first and last name inputs to update order shipping and billing address forms by @NicolasGorga in https://github.com/medusajs/medusa/pull/14394
feat(translation,core-flows): translate remaining core entities and sync shipping option <> method translations by @NicolasGorga in https://github.com/medusajs/medusa/pull/14358
feat(core-flows,utils): Shipping options workflow events emission by @NicolasGorga in https://github.com/medusajs/medusa/pull/14388
feat(dashboard,draft-order): Remove hardcoded strings and replace with translations in draft orders list page by @NicolasGorga in https://github.com/medusajs/medusa/pull/14400
feat(medusa,utils,core-flows): add reset password metdata by @riqwan in https://github.com/medusajs/medusa/pull/14417
feat(translation): Update wording in translation list for translation… by @adrien2p in https://github.com/medusajs/medusa/pull/14453
feat(translation): Order translastable entities ordered alphabetically by @adrien2p in https://github.com/medusajs/medusa/pull/14451
feat(translation): Add support for locale to the graph query by @adrien2p in https://github.com/medusajs/medusa/pull/14454
feat(translation): Improve translation alert in empty languages state by @adrien2p in https://github.com/medusajs/medusa/pull/14464
Bugs
fix(core-flows): fix type of getTranslatedLineItemsStep by @shahednasser in https://github.com/medusajs/medusa/pull/14338
fix(medusa): fix type of product variant request param by @shahednasser in https://github.com/medusajs/medusa/pull/14342
fix(order): Prevent fetching all db adjustments when no items are pre… by @adrien2p in https://github.com/medusajs/medusa/pull/14351
fix(medusa): allow passing null to cart API routes by @shahednasser in https://github.com/medusajs/medusa/pull/14381
fix(medusa,framework): HMR file watch by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/14390
fix(types): add missing completed_at property for carts by @shahednasser in https://github.com/medusajs/medusa/pull/14412
fix(dashboard): fix customer details page crashing when their order is refunded by @shahednasser in https://github.com/medusajs/medusa/pull/14413
fix(dashboard): form reset for across allocation by @fPolic in https://github.com/medusajs/medusa/pull/14369
fix(core-flows): Avoid checking inventory items on fulfillment cancel for unmanaged inventory variants by @NicolasGorga in https://github.com/medusajs/medusa/pull/14177
fix(core-flows): conditionally create customer on order email update if unset by @NicolasGorga in https://github.com/medusajs/medusa/pull/14264
fix(translation): omit id from types properties by @adrien2p in https://github.com/medusajs/medusa/pull/14445
fix(js-sdk): add metadata parameter to request body type of reset-password route by @shahednasser in https://github.com/medusajs/medusa/pull/14458
fix(create-medusa-app): fix version option not working with Next.js storefront by @shahednasser in https://github.com/medusajs/medusa/pull/14462
Documentation
docs: document cloud sign in methods, usage and add-on changes by @shahednasser in https://github.com/medusajs/medusa/pull/14333
docs: generate API reference for 2.12.3 by @shahednasser in https://github.com/medusajs/medusa/pull/14341
docs: generate references manually for 2.12.3 by @shahednasser in https://github.com/medusajs/medusa/pull/14340
docs: add vite configuration to docker guide by @shahednasser in https://github.com/medusajs/medusa/pull/14352
docs: fixes related to troubleshooting by @shahednasser in https://github.com/medusajs/medusa/pull/14353
docs: fix total descriptions across docs by @shahednasser in https://github.com/medusajs/medusa/pull/14366
docs: add admin extensions to navbar by @shahednasser in https://github.com/medusajs/medusa/pull/14368
docs: add line highlight validation by @shahednasser in https://github.com/medusajs/medusa/pull/14380
docs-utils: add operator map to docs generator knowledge base by @shahednasser in https://github.com/medusajs/medusa/pull/14382
docs: small fixes and improvements to text by @shahednasser in https://github.com/medusajs/medusa/pull/14385
docs-utils: performance improvements for the clean OAS script by @shahednasser in https://github.com/medusajs/medusa/pull/14386
docs: resolve example tag in DML properties by @shahednasser in https://github.com/medusajs/medusa/pull/14383
docs: allow stop generation of answer in AI assistant by @shahednasser in https://github.com/medusajs/medusa/pull/14387
docs: various improvements to introduction guides by @shahednasser in https://github.com/medusajs/medusa/pull/14398
docs: use 200 for routes response across docs by @shahednasser in https://github.com/medusajs/medusa/pull/14418
docs: add how-to guide for removing country code in storefront prefix by @shahednasser in https://github.com/medusajs/medusa/pull/14419
docs: added support for tests in www workspace by @shahednasser in https://github.com/medusajs/medusa/pull/14415
docs: add examples for migrations by @shahednasser in https://github.com/medusajs/medusa/pull/14420
docs: added callouts in search and AI assistant by @shahednasser in https://github.com/medusajs/medusa/pull/14421
docs: added tests for components in api-reference project by @shahednasser in https://github.com/medusajs/medusa/pull/14428
docs: fix styling of code elements in headers by @shahednasser in https://github.com/medusajs/medusa/pull/14440
Chores
chore(docs): Updated UI Reference (automated) by @github-actions[bot] in https://github.com/medusajs/medusa/pull/14336
chore(docs): Update version in documentation (automated) by @github-actions[bot] in https://github.com/medusajs/medusa/pull/14334
chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in https://github.com/medusajs/medusa/pull/14335
chore: fix TSDocs of total fields to be accurate by @shahednasser in https://github.com/medusajs/medusa/pull/14367
chore: Ensure isolated order deletion by @olivermrbl in https://github.com/medusajs/medusa/pull/14405
chore: Create publishable API key as part of the defaults by @olivermrbl in https://github.com/medusajs/medusa/pull/14356
chore: Add Claude Code commands by @olivermrbl in https://github.com/medusajs/medusa/pull/14438
chore: fix eslint config in root by @shahednasser in https://github.com/medusajs/medusa/pull/14444
chore(medusa): add missing fields and filters to product variants endpoint by @NicolasGorga in https://github.com/medusajs/medusa/pull/14448
chore: Require manual trigger of Claude review by @olivermrbl in https://github.com/medusajs/medusa/pull/14455
chore: update TSDocs + export getTranslatedShippingOptionsStep from core-flows by @shahednasser in https://github.com/medusajs/medusa/pull/14460
Other Changes
fix(translation): prevent duplicate locale error on server restart by @0xFl4g in https://github.com/medusajs/medusa/pull/14345
feat(medusa): add generated .medusa/types to local plugins by @leobenzol in https://github.com/medusajs/medusa/pull/13777
Revert "feat(medusa): add generated .medusa/types to local plugins" by @adrien2p in https://github.com/medusajs/medusa/pull/14361
feat: added ka-GE to the default list of locales by @homosape in https://github.com/medusajs/medusa/pull/14364
feat: add Medusa Cloud OAuth provider by @peterlgh7 in https://github.com/medusajs/medusa/pull/14395
Fix typo in Medusa API key instructions by @Arpitgoyalgg in https://github.com/medusajs/medusa/pull/14435
Update PostHog API Key link in page.mdx by @calebro-xyz in https://github.com/medusajs/medusa/pull/14433
chore: Add Claude Code GitHub Workflow by @olivermrbl in https://github.com/medusajs/medusa/pull/14439
New Contributors
@homosape made their first contribution in https://github.com/medusajs/medusa/pull/14364
@Arpitgoyalgg made their first contribution in https://github.com/medusajs/medusa/pull/14435
@calebro-xyz made their first contribution in https://github.com/medusajs/medusa/pull/14433
Full Changelog: https://github.com/medusajs/medusa/compare/v2.12.3...v2.12.4