🎉🎉 First of all, THANK YOU for taking time to contribute this package! 🎉🎉
- Any language is welcomed. Anyone is welcomed to contribute. 🌏 🌎 🌍
- There are several issues require your help.
- NOTE: Currently the author do not review grammar of the translation.
-
please checkout Issues Page and Pull Request Page first in case there is already someone being assigned or working on it.
-
fork this repo
-
clone the repo you just forked to your disk
git clone https://github.com/my-account/atom-i18n.git
-
install npm dependencies then create a branch named as the locale you want to contribute. For example:
cd atom-i18n && npm install && git checkout -b fr
-
open the cson file under folder
def/MY_LOCALE
you wanna translate-
NOTE: if your locale is missing, please do:
- copy
def/template
folder and rename it as your localecd def && cp -r template MY_LOCALE
- insert one menu item in package.json under
configSchema.locale.enum
field{ "value": "pl", # your locale code "description": "Polski (pl)" # menu item displayed },
- copy
-
-
please read translation guide before translation
-
you may preview your translation by enabling DEV mode
-
you may validate syntax of your translation. For example:
npm test -- -- --locale ko npm run validation -- --locale ja
-
commit the changes and push the branch you created to your remote
git add def/ git commit -m "translate something" git push -u origin MY_BRANCH
-
only translate values rather than keys in the cson file
- for example, let's translate
context.cson
:
Context: "atom-workspace": "application:inspect": "Inspect Element" # translate "Inspect Element" please # more ...
- in previous example, only string
"Inspect Element"
need to be translated
- for example, let's translate
-
in
settings.cson
, keys having underscore prefix (e.g._label
,_id
) are identifiers for package execution whose values WILL NOT be translatedSettings: menu: [ { _label: "Core" # DO NOT translate this line! value: "Core" # translate please } { _id: 'editor.lineHeight' # DO NOT translate this line! title: "Line Height" # translate please desc: "line-height (number)" # translate please } # more ...
-
for the menu label containing hotkey hint
&
, we can preserve it in the word or preserve it with braces wrapped at the end. It's up to user experience.- let's look at
menu_win32.cson
:
# preserve it in the word (fr) Menu: "&File": value: "&Fichier" # "&File" -> "&Fichier" (hotkey hint: &F) submenu: "New &Window": value: "Nouvelle &fenêtre" # "New &Window" -> "Nouvelle &fenêtre" (hotkey hint: &w) # or preserve it with braces (ja) Menu: "&File": value: "ファイル(&F)" # "&File" -> "ファイル(&F)" (hotkey hint: &F) submenu: "New &Window": value: "新規ウインドウ(&W)" # "New &Window" -> "新規ウインドウ(&W)" (hotkey hint: &w)
- let's look at
- uninstall
atom-i18n
if you have installed - change into the package directory you have forked and cloned
- use
apm
command to link the package to atom user directory
apm link
Now your package directory has been linked to ~/.atom/packages/atom-i18n
-
you can preview i18n result by launching (or reloading) Atom
- after your development, remove package link
cd path/to/fork/repo && apm unlink