Files
medusa-store/www/apps/docs/content/contribution/admin-translations.md
Shahed Nasser fa7c94b4cc docs: create docs workspace (#5174)
* docs: migrate ui docs to docs universe

* created yarn workspace

* added eslint and tsconfig configurations

* fix eslint configurations

* fixed eslint configurations

* shared tailwind configurations

* added shared ui package

* added more shared components

* migrating more components

* made details components shared

* move InlineCode component

* moved InputText

* moved Loading component

* Moved Modal component

* moved Select components

* Moved Tooltip component

* moved Search components

* moved ColorMode provider

* Moved Notification components and providers

* used icons package

* use UI colors in api-reference

* moved Navbar component

* used Navbar and Search in UI docs

* added Feedback to UI docs

* general enhancements

* fix color mode

* added copy colors file from ui-preset

* added features and enhancements to UI docs

* move Sidebar component and provider

* general fixes and preparations for deployment

* update docusaurus version

* adjusted versions

* fix output directory

* remove rootDirectory property

* fix yarn.lock

* moved code component

* added vale for all docs MD and MDX

* fix tests

* fix vale error

* fix deployment errors

* change ignore commands

* add output directory

* fix docs test

* general fixes

* content fixes

* fix announcement script

* added changeset

* fix vale checks

* added nofilter option

* fix vale error
2023-09-21 20:57:15 +03:00

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 check -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.