Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (27 sloc) 1.47 KB

Motrix Contributing Guide

🌍 Translation Guide

First you need to determine the English abbreviation of a language as locale, such as en-US, this locale value should strictly refer to the electron's documentation.

The internationalization of Motrix is divided into two parts:

  • Element UI
  • Menu & Main Interface

Element UI

The internationalization of Element UI is provided by the Element community, then find the language pack file corresponding to locale (both locale naming may be inconsistent), which is import in src/shared/locales/all.js, such as

import eleLocaleEn from 'element-ui/lib/locale/lang/en'
import eleLocaleZhCN from 'element-ui/lib/locale/lang/zh-CN'

Menu & Main Interface

Motrix uses the i18next library for internationalization, so you need a quick look at how to use it. The configuration files are divided by locale: src/shared/locales, such as src/shared/locales/en-US and src/shared/locales/zh-CN.

There are language files in the directory according to the business module.

After the menu module is refactored, the internationalization of the menu has been dispersed into the following files, and there is no need to copy the configuration in src/main/menus.

  • about.js
  • app.js
  • edit.js
  • help.js
  • index.js
  • menu.js
  • preferences.js
  • subnav.js
  • task.js
  • window.js
You can’t perform that action at this time.