docs: docs for next release (#13907)

This commit is contained in:
Shahed Nasser
2025-10-31 11:28:42 +02:00
committed by GitHub
parent 9d3e199c71
commit 7975d8522e
8 changed files with 160 additions and 8 deletions
@@ -157,6 +157,42 @@ Next, [change the admin language](!user-guide!/settings/profile#edit-profile-det
---
## Translation Auto-Completion
<Note>
Translation auto-completion is available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2).
</Note>
To enhance your development experience, you can set up auto-completion for translation keys. This will allow you to auto-complete translation keys from Medusa's default translations as well as your custom translations.
To set up auto-completion, create the file `src/admin/i18next.d.ts` with the following content:
```ts title="src/admin/i18n/i18next.d.ts"
// Import Medusa keys
import type { Resources } from "@medusajs/dashboard"
// Import your custom translation keys
// For example, import the English translation file
import type enTranslation from "./i18n/en.json"
// add other imports for different languages if needed...
// import type esTranslation from "./i18n/es.json"
declare module "i18next" {
interface CustomTypeOptions {
fallbackNS: "translation"
resources: {
translation: Resources["translation"]
// Optional: add custom namespaces here
// For example, if you have a custom namespace called 'brands':
brands: typeof enTranslation & Resources["translation"]
}
}
}
```
---
## How Translations are Loaded
When you load the translations with the `translation` key in `src/admin/i18n/index.ts`, your custom Medusa Admin translations are merged with the default Medusa Admin translations:
@@ -273,6 +273,20 @@ This will return all products that are linked to the brand with the name `Acme`.
---
## Trigger Index Reingestion
<Note>
The Index API routes are available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2).
</Note>
Medusa provides API routes to view and trigger index reingestion or syncing. This is useful if you want to reingest data manually, for example, after a large data import.
Refer to the [Index API Reference](!api!/admin#index) for more information about the available API routes and how to use them.
---
## Apply Pagination with the Index Module
Similar to Query's `graph` method, the Index Module accepts a `pagination` object to paginate the results.
+2 -2
View File
@@ -121,7 +121,7 @@ export const generatedEditDates = {
"app/learn/fundamentals/workflows/errors/page.mdx": "2025-04-25T14:26:25.000Z",
"app/learn/fundamentals/api-routes/override/page.mdx": "2025-05-09T08:01:24.493Z",
"app/learn/fundamentals/module-links/index/page.mdx": "2025-05-23T07:57:58.958Z",
"app/learn/fundamentals/module-links/index-module/page.mdx": "2025-10-27T09:30:26.957Z",
"app/learn/fundamentals/module-links/index-module/page.mdx": "2025-10-30T11:31:29.704Z",
"app/learn/introduction/build-with-llms-ai/page.mdx": "2025-10-02T15:10:49.394Z",
"app/learn/installation/docker/page.mdx": "2025-10-24T08:53:46.445Z",
"app/learn/fundamentals/generated-types/page.mdx": "2025-07-25T13:17:35.319Z",
@@ -135,5 +135,5 @@ export const generatedEditDates = {
"app/learn/fundamentals/workflows/locks/page.mdx": "2025-09-15T09:37:00.808Z",
"app/learn/codemods/page.mdx": "2025-09-29T15:40:03.620Z",
"app/learn/codemods/replace-imports/page.mdx": "2025-10-09T11:37:44.754Z",
"app/learn/fundamentals/admin/translations/page.mdx": "2025-10-27T09:29:59.965Z"
"app/learn/fundamentals/admin/translations/page.mdx": "2025-10-30T11:55:32.221Z"
}
+43 -1
View File
@@ -7544,6 +7544,38 @@ Next, [change the admin language](https://docs.medusajs.com/user-guide/settings/
***
## Translation Auto-Completion
Translation auto-completion is available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2).
To enhance your development experience, you can set up auto-completion for translation keys. This will allow you to auto-complete translation keys from Medusa's default translations as well as your custom translations.
To set up auto-completion, create the file `src/admin/i18next.d.ts` with the following content:
```ts title="src/admin/i18n/i18next.d.ts"
// Import Medusa keys
import type { Resources } from "@medusajs/dashboard"
// Import your custom translation keys
// For example, import the English translation file
import type enTranslation from "./i18n/en.json"
// add other imports for different languages if needed...
// import type esTranslation from "./i18n/es.json"
declare module "i18next" {
interface CustomTypeOptions {
fallbackNS: "translation"
resources: {
translation: Resources["translation"]
// Optional: add custom namespaces here
// For example, if you have a custom namespace called 'brands':
brands: typeof enTranslation & Resources["translation"]
}
}
}
```
***
## How Translations are Loaded
When you load the translations with the `translation` key in `src/admin/i18n/index.ts`, your custom Medusa Admin translations are merged with the default Medusa Admin translations:
@@ -14369,6 +14401,16 @@ This will return all products that are linked to the brand with the name `Acme`.
***
## Trigger Index Reingestion
The Index API routes are available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2).
Medusa provides API routes to view and trigger index reingestion or syncing. This is useful if you want to reingest data manually, for example, after a large data import.
Refer to the [Index API Reference](https://docs.medusajs.com/api/admin#index) for more information about the available API routes and how to use them.
***
## Apply Pagination with the Index Module
Similar to Query's `graph` method, the Index Module accepts a `pagination` object to paginate the results.
@@ -62073,7 +62115,7 @@ By following this tutorial, you'll learn how to:
![Diagram showing the relation between product categories and their images](https://res.cloudinary.com/dza7lstvk/image/upload/v1760522310/Medusa%20Resources/category-images-summary_l1duwj.jpg)
- [Full Code](https://github.com/medusajs/examples/tree/main/category-images): Find the full code for this tutorial in this repository.
- [OpenApi Specs for Postman](https://res.cloudinary.com/dza7lstvk/raw/upload/v1755010179/OpenApi/Product-Builder_wvhqtq.yaml): Import this OpenApi Specs file into tools like Postman.
- [OpenApi Specs for Postman](https://res.cloudinary.com/dza7lstvk/raw/upload/v1760540368/OpenApi/category-images.openapi_azg6xy.yaml): Import this OpenApi Specs file into tools like Postman.
***