Skip to content
AIZAWA Hina edited this page Oct 10, 2022 · 10 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. i.e., the directory zh cannot exist.

    • Chinese (PRC, Simplified 简体) zh-CN : use zh-CN
    • Chinese (Taiwan/Hong Kong/Macau, Traditional 繁體) zh-TW : use zh-TW

    I know that I should essentially be using zh-hans or zh-hant (if different translations are used in Taiwan and Hong Kong, zh-hans-TW and zh-hans-HK should be used).
    However, I decided to use zh-CN and zh-TW for compatibility with many libraries.
    Please let me know if I should split the translation between Taiwan and Hong Kong. If so, I would create zh-HK.

    These rules for only technical reasons. There is no political intention.
    i.e., the rules don't mean that the version of the language used in any region is superior, nor does it mean what is an independent country.

    messages/
      ja/        # ... for Japanese. Japanese is used only in Japan and no inherited data.
      es/        # ... for European Spanish (i.e., Spain's)
      es-MX/     # ... for American Spanish
      en/        # ... for American English (i.e., US's); Special rule for English
      en-GB/     # ... for European English (i.e., UK's)
      zh-CN/     # ... for Simplified Chinese (People's Republic of China); Special rule for Chinese
      zh-TW/     # ... for Traditional Chinese (Taiwan, Hong Kong, Macau)
    
  • Starting in late August 2020, we began using machine translated messages. The messages have been translated using DeepL. Users can be configured not to use machine translation.

    The translated files are located in the messages/_deepl directory.

    messages/
      _deepl/
        de/     # German translations
        es/     # Spanish translations
        fr/     # French translations
        it/     # Italian translations
        nl/     # Nederlands translations
        ru/     # Russian translations
        zh/     # Simplified Chinese translations
        zh-TW/  # Traditional Chinese translations
    

    These probably include improper translations. You guys can review these files, but you can't request modifications. These files are automatically generated, and any changes you make to them will be destroyed in the future.

    If you encounter problems with the quality of the machine translation, please submit a request to make changes to the regular translation files (located in messages/LANGCODE/, not in _deepl directory).

    Special rule to Traditional Chinese: Because DeepL only supports Simplified Chinese, we use automatic conversion from Simplified Chinese to generate Traditional Chinese. We use OpenCC for this conversion.

SUPPORT POLICY

  • Official supported languages (ja, en, fr, es...): We can translate all words, of course.

  • Not official supported languages: We can translate except proper-nouns. For example, the users may played in English or other language version of game copy. So, we can't determine translate to which language. Common words such as "battle", "good/bad guys" will be helpful to the user by translating. Please refer to comments of this issue.

Proper nouns: weapons', stages' and so on.

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