Skip to content

Latest commit

 

History

History
112 lines (79 loc) · 3.27 KB

CONTRIBUTING.md

File metadata and controls

112 lines (79 loc) · 3.27 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. 🌏 🌎 🌍
  • NOTE: Currently the author do not review grammar of the translation.

Steps to Contribute

  • fork this repo
  • clone the repo you just forked to your disk
git clone https://github.com/my-account/atom-i18n.git
  • change into directory then create a branch named as the locale you want to contribute. For example:
cd atom-i18n-cson && git checkout -b fr
  • open the cson file under folder def/MY_LOCALE you wanna translate

    • NOTE: if your locale is missing, please copy template folder and rename it as your locale
    cp -r template MY_LOCALE
  • please read translation guide before translation

  • you can examine what you translated by enabling DEV mode

  • commit the changes and push the branch you created to your remote

    git add ./
    git commit -m "translate something"
    git push -u origin MY_BRANCH
    
  • create a pull request

Translation Guide

  • you can ONLY translate values rather than keys in the cson file

    • for example, let's translate context.cson:
    Context:
      "atom-workspace":
        "application:inspect": "Inspect Element"
        # more ...

and only content "Inspect Element" can be translated

  • in settings.cson, keys having underscore prefix (e.g. _label, _id) are identifiers for package execution whose values SHOULD 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 ...
  • for the menu label containing hotkey hint &, we should preserve it with braces wrapped at the end.

    • for example let's checkout how def/ja/menu_win32.cson is translated into Japanese:
    Menu:
      "&File":
        value: "ファイル(&F)"
        submenu:
          "New &Window":
            value: "新規ウインドウ(&W)"
          # more ...

the value of key "&File" ,"New &Window" are translated into "ファイル(&F)", "新規ウインドウ(&W)"

How to Test I18N Result in DEV Mode

  • 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
  • your package directory has been linked to ~/.atom/packages/atom-i18n
  • then you can test it by launching (or reloading) Atom
  • after your development, remove link
cd path/to/fork/repo && apm unlink