github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/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 Hyperledger Fabric 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  Hyperledger Fabric documentation is being translated into many different
    18  languages. For example:
    19  
    20  * [Chinese](https://github.com/hyperledger/fabric-docs-i18n/tree/master/docs/locale/zh_CN)
    21  * [Malayalam](https://github.com/hyperledger/fabric-docs-i18n/tree/master/docs/locale/ml_IN)
    22  * [Brazilian Portuguese](https://github.com/hyperledger/fabric-docs-i18n/tree/master/docs/locale/pt_BR)
    23  * [Japanese](https://github.com/hyperledger/fabric-docs-i18n/tree/master/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/fabric/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/master/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/master/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     Also request adding collaborators if you want to be able to assign issues. They need to become members of the community by asking core repo maintainers to add those translators to the [`Hyperledger Github Organization`](https://github.com/orgs/hyperledger/teams)
   143  
   144  Congratulations! A community of translators can now translate your newly-created
   145  language in the `fabric-docs-i18n` repository.
   146  
   147  ## First topics
   148  
   149  Before your new language can be published to the documentation website, you must
   150  translate the following topics.  These topics help users and translators of your
   151  new language get started.
   152  
   153  * [Fabric front page](https://hyperledger-fabric.readthedocs.io/zh_CN/latest/)
   154  
   155    This is your advert! Thanks to you, users can now see that the documentation
   156    is available in their language. It might not be complete yet, but its clear
   157    you and your team are trying to achieve. Translating tis page will help you
   158    recruit other translators.
   159  
   160  
   161  * [Introduction](https://hyperledger-fabric.readthedocs.io/en/latest/whatis.html)
   162  
   163    This short topic gives a high level overview of Fabric, and because it's
   164    probably one of the first topics a new user will look at, it's important that
   165    it's translated.
   166  
   167  
   168  * [Contributions Welcome!](https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html)
   169  
   170    This topic is vital -- it helps contributors understand **what**, **why** and
   171    **how** of contributing to Fabric. You need to translate this topic so that
   172    others can help you collaborate in your translation.
   173  
   174  
   175  * [Glossary](https://hyperledger-fabric.readthedocs.io/en/latest/glossary.html)
   176  
   177    Translating this topic provides the essential reference material that helps
   178    other language translators make progress; in short, it allows your workgroup
   179    to scale.
   180  
   181  Once this set of topics have been translated, and you've created a language
   182  workgroup, your translation can be published on the documentation website. For
   183  example, the Chinese language docs are available
   184  [here](https://hyperledger-fabric.readthedocs.io/zh_CN/latest/).
   185  
   186  You can now request, via the [`i18n rocket
   187  channel`](https://chat.hyperledger.org/channel/i18n), that your translation is
   188  included on the documentation website.
   189  
   190  ## Translation tools
   191  
   192  When translating topics from US English to your international language, it's
   193  often helpful to use an online tool to generate a first pass of the translation,
   194  which you then correct in a second pass review.
   195  
   196  Language workgroups have found the following tools helpful:
   197  
   198  * [`DocTranslator`](https://www.onlinedoctranslator.com/)
   199  
   200  * [`TexTra`](https://mt-auto-minhon-mlt.ucri.jgn-x.jp/)
   201  
   202  ## Suggested next topics
   203  
   204  Once you have published the mandatory initial set of topics on the documentation
   205  website, you are encouraged to translate these topics, in order. If you choose
   206  to adopt another order, that's fine; you still will find it helpful to agree an
   207  order of translation in your workgroup.
   208  
   209  * [Key concepts](https://hyperledger-fabric.readthedocs.io/en/latest/key_concepts.html)
   210  
   211      For solution architects, application architects, systems architects, developers,
   212      academics and students alike, this topic provides a comprehensive conceptual
   213      understanding of Fabric.
   214  
   215  
   216  * [Getting started](https://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html)
   217  
   218    For developers who want to get hands-on with Fabric, this topic provides key
   219    instructions to help install, build a sample network and get hands-on with
   220    Fabric.
   221  
   222  
   223  * [Developing applications](https://hyperledger-fabric.readthedocs.io/en/latest/developapps/developing_applications.html)
   224  
   225    This topic helps developers write smart contracts and applications; these
   226    are the core elements of any solution that uses Fabric.
   227  
   228  
   229  * [Tutorials](https://hyperledger-fabric.readthedocs.io/en/latest/tutorials.html)
   230  
   231    A set of hands-on tutorials to help developers and administrators try out
   232    specific Fabric features and capabilities.
   233  
   234  
   235  * [What's new in Hyperledger Fabric
   236    v2.x](https://hyperledger-fabric.readthedocs.io/en/latest/whatsnew.html)
   237  
   238    This topic covers the latest features in Hyperledger Fabric.
   239  
   240  
   241  Finally, we wish you good luck, and thank you for your contribution to
   242  Hyperledger Fabric.
   243  
   244  <!--- Licensed under Creative Commons Attribution 4.0 International License
   245  https://creativecommons.org/licenses/by/4.0/ -->