- Git. You must install git to getting stared
- VSCode. The highly recommended editor for translator to translate. It have integrated UI tool to help you find the translation key.
- Node.js >=18.17.0. If you want to test your translation locally, you need this. You can just install latest version.
- pnpm. If you want to test your translation locally, you need this. You can follow its installation page to install.
You need to fork & clone the project using git.
Suppose you already fork the project in Github to your repo:
git clone --recurse-submodules https://github.com/your-id/x-minecraft-launcher
Optional, install the project using pnpm:
Under the folder you cloned, e.g. x-minecraft-launcher
, run command
pnpm install
Optional if you are using VSCode.
Install the i18n-ally (lokalise.i18n-ally) extension. The VSCode might hint you to install recommended extensions, which should already include this extension.
You need to find the corresponding locale yaml file under
- xmcl-keystone-ui/locales
- xmcl-electron-app/main/locales
The file name is the locale code. You can reference this document to choice the locale.
Optional. You need to first install the project. See #Install section above.
In VSCode, click the button on the sidebar Run and Debug
, select the Electron: Main (launch)
, and click play button.
Or, you can try to press F5
which might be the hotkey for this operation.
This should start the launcher. You can switch to your language in setting page to test.
Optional.
If you are adding a new language, you need to also go to the assets\locales.json
and add the new language key value there.
Suppose you want to add French
(fr
), you can open the file assets\locales.json
{
"zh-CN": "简体中文",
"zh-TW": "繁體中文",
"en": "English",
"ru": "Русский язык",
"es-ES": "Español"
}
adding a new line at the end
{
"zh-CN": "简体中文",
"zh-TW": "繁體中文",
"en": "English",
"ru": "Русский язык",
"es-ES": "Español",
"fr": "French"
}
Please follow the github guide about how to send pull request.