github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/docs/source/international_languages.md (about)

     1  # Creating a new translation
     2  
     3  **Audience**: Writers who would like to create a new Fabric translation.
     4  
     5  If the Hechain documentation is not available in your chosen language
     6  then why not start a new language translation? It's relatively easy to get
     7  started, and creating a new language translation can be a very satisfying
     8  activity for you and other Fabric users.
     9  
    10  In this topic, we're going to cover:
    11  * [An introduction to international language support](#introduction)
    12  * [How to create a new language workgroup](#create-a-new-workgroup)
    13  * [How to create a new language translation](#create-a-new-translation)
    14  
    15  ## Introduction
    16  
    17  Hechain documentation is being translated into many different
    18  languages. For example:
    19  
    20  * [Chinese](https://github.com/hyperledger/fabric-docs-i18n/tree/main/docs/locale/zh_CN)
    21  * [Malayalam](https://github.com/hyperledger/fabric-docs-i18n/tree/main/docs/locale/ml_IN)
    22  * [Brazilian Portuguese](https://github.com/hyperledger/fabric-docs-i18n/tree/main/docs/locale/pt_BR)
    23  * [Japanese](https://github.com/hyperledger/fabric-docs-i18n/tree/main/docs/locale/ja_JP)
    24  
    25  If your chosen language is not available, then the first thing to do is to
    26  create a new language workgroup.
    27  
    28  ## Create a new workgroup
    29  
    30  It's much easier to translate, maintain, and manage a language repository if you
    31  collaborate with other translators. Start this process by adding a new workgroup
    32  to the [list of international
    33  workgroups](https://wiki.hyperledger.org/display/I18N/International+groups),
    34  using one of the existing workgroup pages as an exemplar.
    35  
    36  Document how your workgroup will collaborate; meetings, chat and mailing lists
    37  can all be very effective. Making these mechanisms clear on your workgroup page
    38  can help build a community of translators.
    39  
    40  Then use [Rocket chat channels](./advice_for_writers.html#rocket-chat) to let
    41  other people know you've started a translation, and invite them to join the
    42  workgroup.
    43  
    44  ## Create a new translation
    45  
    46  Follow these instructions to create your own language repository. Our sample
    47  instructions will show you how to create a new language translation for Spanish
    48  as spoken in Mexico:
    49  
    50  1. Fork the [`fabric-docs-i18n`
    51     repository](https://github.com/hyperledger/fabric-docs-i18n) to your GitHub
    52     account.
    53  
    54  1. Clone your repository fork to your local machine:
    55     ```bash
    56     git clone git@github.com:YOURGITHUBID/fabric-docs-i18n.git
    57     ```
    58  
    59  1. Select the Fabric version you are going to use as a baseline. We recommend
    60     that you start with Fabric 2.2 as this is an LTS release. You can add other
    61     releases later.
    62  
    63     ```bash
    64     cd fabric-docs-i18n
    65     git fetch origin
    66     git checkout release-2.2
    67     ```
    68  1. Create a local feature branch:
    69     ```bash
    70     git checkout -b newtranslation
    71     ```
    72  1. Identify the appropriate [two or four letter language
    73     code](http://www.localeplanet.com/icu/).  Mexican Spanish has the language
    74     code `es_MX`.
    75  
    76  1. Update the fabric
    77     [`CODEOWNERS`](https://github.com/hyperledger/fabric-docs-i18n/blob/main/CODEOWNERS) file
    78     in the root directory. Add the following line:
    79     ```bash
    80     /docs/locale/ex_EX/ @hyperledger/fabric-core-doc-maintainers @hyperledger/fabric-es_MX-doc-maintainers
    81     ```
    82  
    83  1. Create a new language folder under `docs/locale/` for your language.
    84     ```bash
    85     cd docs/locale
    86     mkdir es_MX
    87     ```
    88  
    89  1. Copy the language files from another language folder, for example
    90     ```bash
    91     cp -R pt_BR/ es_MX/
    92     ```
    93     Alternatively, you could copy the `docs/` folder from the `fabric`
    94     repository.
    95  
    96  1. Customize the `README.md` file for your new language using [this
    97     example](https://github.com/hyperledger/fabric-docs-i18n/tree/main/docs/locale/pt_BR/README.md).
    98  
    99  1. Commit your changes locally:
   100     ```
   101     git add .
   102     git commit -s -m "First commit for Mexican Spanish"
   103     ```
   104  
   105  1. Push your `newtranslation` local feature branch to the `release-2.2` branch
   106     of your forked `fabric-docs-i18n` repository:
   107  
   108     ```bash
   109     git push origin release-2.2:newtranslation
   110  
   111  
   112     Total 0 (delta 0), reused 0 (delta 0)
   113     remote:
   114     remote: Create a pull request for 'newtranslation' on GitHub by visiting:
   115     remote:      https://github.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation
   116     remote:
   117     To github.com:ODOWDAIBM/fabric-docs-i18n.git
   118     * [new branch]      release-2.2 -> newtranslation
   119     ```
   120  
   121  1. Connect your repository fork to ReadTheDocs using these
   122     [instructions](./docs_guide.html#building-on-github). Verify that your
   123     documentation builds correctly.
   124  
   125  1. Create a pull request (PR) for `newtranslation` on GitHub by visiting:
   126  
   127     [`https://github.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation`](https://github.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation)
   128  
   129     Your PR needs to be approved by one of the [documentation
   130     maintainers](https://github.com/orgs/hyperledger/teams/fabric-core-doc-maintainers).
   131     They will be automatically informed of your PR by email, and you can contact
   132     them via Rocket chat.
   133  
   134  1. On the [`i18n rocket channel`](https://chat.hyperledger.org/channel/i18n)
   135     request the creation of the new group of maintainers for your language,
   136     `@hyperledger/fabric-es_MX-doc-maintainers`. Provide your GitHubID for
   137     addition to this group.
   138  
   139     Once you've been added to this list, you can add others translators from your
   140     workgroup.
   141  
   142  Congratulations! A community of translators can now translate your newly-created
   143  language in the `fabric-docs-i18n` repository.
   144  
   145  ## First topics
   146  
   147  Before your new language can be published to the documentation website, you must
   148  translate the following topics.  These topics help users and translators of your
   149  new language get started.
   150  
   151  * [Fabric front page](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/)
   152  
   153    This is your advert! Thanks to you, users can now see that the documentation
   154    is available in their language. It might not be complete yet, but its clear
   155    you and your team are trying to achieve. Translating this page will help you
   156    recruit other translators.
   157  
   158  
   159  * [Introduction](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/whatis.html)
   160  
   161    This short topic gives a high level overview of Fabric, and because it's
   162    probably one of the first topics a new user will look at, it's important that
   163    it's translated.
   164  
   165  
   166  * [Contributions Welcome!](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/CONTRIBUTING.html)
   167  
   168    This topic is vital -- it helps contributors understand **what**, **why** and
   169    **how** of contributing to Fabric. You need to translate this topic so that
   170    others can help you collaborate in your translation.
   171  
   172  
   173  * [Glossary](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/glossary.html)
   174  
   175    Translating this topic provides the essential reference material that helps
   176    other language translators make progress; in short, it allows your workgroup
   177    to scale.
   178  
   179  Once this set of topics have been translated, and you've created a language
   180  workgroup, your translation can be published on the documentation website. For
   181  example, the Chinese language docs are available
   182  [here](https://hyperledger-fabric.readthedocs.io/zh_CN/{BRANCH_DOC}/).
   183  
   184  You can now request, via the [`i18n rocket
   185  channel`](https://chat.hyperledger.org/channel/i18n), that your translation is
   186  included on the documentation website.
   187  
   188  ## Translation tools
   189  
   190  When translating topics from US English to your international language, it's
   191  often helpful to use an online tool to generate a first pass of the translation,
   192  which you then correct in a second pass review.
   193  
   194  Language workgroups have found the following tools helpful:
   195  
   196  * [`DocTranslator`](https://www.onlinedoctranslator.com/)
   197  
   198  * [`TexTra`](https://mt-auto-minhon-mlt.ucri.jgn-x.jp/)
   199  
   200  ## Suggested next topics
   201  
   202  Once you have published the mandatory initial set of topics on the documentation
   203  website, you are encouraged to translate these topics, in order. If you choose
   204  to adopt another order, that's fine; you still will find it helpful to agree an
   205  order of translation in your workgroup.
   206  
   207  * [Key concepts](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/key_concepts.html)
   208  
   209      For solution architects, application architects, systems architects, developers,
   210      academics and students alike, this topic provides a comprehensive conceptual
   211      understanding of Fabric.
   212  
   213  
   214  * [Getting started](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/getting_started.html)
   215  
   216    For developers who want to get hands-on with Fabric, this topic provides key
   217    instructions to help install, build a sample network and get hands-on with
   218    Fabric.
   219  
   220  
   221  * [Developing applications](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/developapps/developing_applications.html)
   222  
   223    This topic helps developers write smart contracts and applications; these
   224    are the core elements of any solution that uses Fabric.
   225  
   226  
   227  * [Tutorials](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/tutorials.html)
   228  
   229    A set of hands-on tutorials to help developers and administrators try out
   230    specific Fabric features and capabilities.
   231  
   232  
   233  * [What's new in Hechain
   234    v2.x](https://hyperledger-fabric.readthedocs.io/en/{BRANCH_DOC}/whatsnew.html)
   235  
   236    This topic covers the latest features in Hechain.
   237  
   238  
   239  Finally, we wish you good luck, and thank you for your contribution to
   240  Hechain.
   241  
   242  <!--- Licensed under Creative Commons Attribution 4.0 International License
   243  https://creativecommons.org/licenses/by/4.0/ -->