Translation

AIZAWA Hina edited this page Aug 26, 2018 · 5 revisions

TRANSLATION

BASIC INFO AND REFERENCE

  • First, please read Yii Framework 2 I18N document (Particularly "Plural" Section).

  • The author, 相沢陽菜 AIZAWA Hina? ?, is not good at English. Living in Japan and speak only Japanese. So some sentences may ugly English.

  • Mainly, the website's messages in US-English. So, we should translate US-English to other languages.

  • Some Japanese texts are not translated and not written how to translate it on this page.

  • The website uses layered translation. For example, if a user shows in Canadian French, the website will refer to the files in the following order: fr-CA, fr, (not translated).

  • In stat.ink, the main country of use of the language is represented by language code only (except English and Chinese). For example:

    • Japanese (Japan) ja-JP : use ja
    • Spanish (Spain) es-ES : use es
    • French (France) fr-FR : use fr
    • German (Germany) de-DE : use de
    • Russian (Russia) ru-RU : use ru

    And in other regions, it's represented by country code and region code. For example:

    • Spanish (Latin America) : use es-MX (use code of Mexico, for technical reasons)
    • French (Canada) : use fr-CA

    About English, it's exceptional because "source language is en-US".

    • English (US) en-US : use en (and not use translation files)
    • English (UK) en-GB : use en-GB

    About Chinese, don't omit region codes.

    • Chinese (China, Simplified 简体) zh-CN : use zh-CN
    • Chinese (Taiwan, Traditional 繁體) zh-TW : use zh-TW

    These rules for only technical reasons. There is no political intention.

SUPPORT NEW LANGUAGE/REGION

Contact me. The author will create template files.

UPDATE EXISTS LANGUAGE/REGION

(The easist way, for trivial edit only)

  1. Create an account on GitHub if you haven't yet

  2. Open the issue page

  3. Click the "New issue" button on the top right

  4. Fill the form and submit it

    Please write these things:

    • Target locale (language and region) like "European French" or "French (France)"
    • The URL displayed the "wrong" sentence
    • The current "wrong" sentence
    • The new "right" sentence

(Easy way, for Git beginners)

  1. Create an account on GitHub if you haven't yet
  2. Visit the project page and click "Fork" button on the top right. Then, GitHub creates a "forked" repository like youraccount/stat.ink
  3. Open your repository page. (Maybe already opened!)
  4. Move to "messages/lanuguage-code" directory
  5. Open a file like "weapon2.php"
  6. Click the pen icon on the top right to edit the file
  7. Edit the file. It's in PHP format. If use single quotation mark or backslash, you need to escape characters like \' or \\
  8. Fill the "commit changes" form. Please select "create a new branch" option (for smoothly pull-requesting)
  9. Submit the form
  10. Move to your repository page. You'll see a "Pull Request" hint. Follow the hint and create a new "pull request".

(Normal way)

  1. Create an account on GitHub if you haven't yet
  2. Visit the project page and click "Fork" button on the top right. Then, GitHub creates a "forked" repository like youraccount/stat.ink
  3. Open your repository page (maybe already opened) and copy an URL from "Clone or download" button. It's like git@github.com:youraccount/stat.ink.git
  4. On your machine, paste the URL and clone it. $ git clone git@github.com:youraccount/stat.ink.git
  5. Create a new branch to smart pull request. $ git checkout -b french-patch-1
  6. Edit files. Translation files are located in "messages" directory
  7. Commit files. $ git add <edited files> $ git commit
  8. Push to your GitHub repository. $ git push origin french-patch-1
  9. Visit to GitHub again and create a new pull request
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.