Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Latest commit

 

History

History
138 lines (101 loc) · 4.76 KB

CONTRIBUTING.md

File metadata and controls

138 lines (101 loc) · 4.76 KB

CONTRIBUTING

🎉🎉 First of all, THANK YOU for taking time to contribute this package! 🎉🎉

Which Languages can I Contribute?

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

Steps to Contribute

  1. please checkout Issues Page and Pull Request Page first in case there is already someone being assigned or working on it.

  2. fork this repo

  3. clone the repo you just forked to your disk

    git clone https://github.com/my-account/atom-i18n.git
  4. 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
  5. 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 locale
        cd 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
        },
      • add your locale code to the array in spec/locales.js
  6. please read translation guide before translation

  7. you may preview your translation by enabling DEV mode

  8. you may validate syntax of your translation. For example:

    npm test -- -- --locale ko
    npm run validation -- --locale ja
  9. 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
    
  10. create a pull request

Translation Guide

  1. 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
  2. in settings.cson, keys having underscore prefix (e.g. _label, _id) are identifiers for package execution whose values WILL NOT be translated

    Settings:
      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 ...
  3. 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)

How to Preview Your Translation in Development?

  1. uninstall atom-i18n if you have installed
  2. change into the package directory you have forked and cloned
  3. 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

  1. you can preview i18n result by launching (or reloading) Atom

    • after your development, remove package link
    cd path/to/fork/repo && apm unlink