This PR includes documentation that preps for v2 docs (but doesn't introduce new docs). _Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._ ## Changes - Change Medusa version in base OAS used for v2. - Fix to docblock generator related to not catching all path parameters. - Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules. - Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used. - Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment. - Upgraded docusaurus to v3.0.1 - Added new Vale rules to ensure correct spelling of Medusa Admin and module names. - Added new components to the `docs-ui` package that will be used in future documentation changes.
2.2 KiB
sidebar_label, sidebar_position
| sidebar_label | sidebar_position |
|---|---|
| Admin Translation | 2 |
Contribute by Translating Admin
In this document, you'll learn how you can contribute to Medusa by translating the Medusa Admin.
Overview
The Medusa Admin supports multiple languages, with the default being English. To ensure a wide support for different languages, your contribution by translating to other languages you're fluent in is highly appreciated.
This type of contribution is a no-code contribution, meaning you don't need advanced technical skills to contribute.
How to Contribute Translation
1. Clone the Medusa monorepository to your local machine:
git clone https://github.com/medusajs/medusa.git
If you already have it cloned, make sure to pull the latest changes from the develop branch.
2. Create a branch that will be used to open the pull request later:
git checkout -b feat/translate-<LANGUAGE>
Where <LANGUAGE> is your language name. For example, feat/translate-da.
3. Create a new directory under packages/admin-ui/ui/public/locales with its name being the ISO 2 character code of your language. For example, da. In the new directory, create the file translation.json.
4. Copy the content of the English translation file located at packages/admin-ui/ui/public/locales/en/translation.json and paste it in your new translation.json file.
5. In the file, leave the key names as-is, and only translate the values.
6. Next, you need to add the new language into the multi-language configurations. To do that, go to the file packages/admin-ui/ui/src/i18n/index.ts.
7. In packages/admin-ui/ui/src/i18n/index.ts, add the new language to the supportedLanguages array as an object. The object accepts two properties: locale for the ISO 2 character code, and name for the name of the language. The name of the language should be the translated name, not the English name. For example:
export const supportedLanguages = [
// other languages...
{
locale: "da",
name: "Dansk",
},
]
8. Once you're done, push the changes into your branch and open a pull request on GitHub.