Participate in Qt document translation project

Source: Internet
Author: User
Tags how to use git

Qt is an open-source C ++ library with huge source code. If you want to make your own contribution to Qt but cannot find the starting point, start with document translation!

I used to open a translation project on sourceforge.net. Today, we try to complete a real document Project: The result is submitted to the Qt code library, let everyone in the world read your translated code.

The source code of Qt uses git as the version control system. Git is a distributed version control system, similar to SVN, while the latter is a centralized version control system ). Simply put, each version of your file can be recorded in detail and restored to any version. If multiple users modify the same file at the same time, git ensures that your modifications are not lost. Since the Qt code library has been fully established, our workflow is to remove all source files from the git version library pull of Qt. This process is called check out in SVN, that is, check out), and then make your own modifications. After the modifications are completed, commit to your git repository. This is different from SVN. SVN commit will submit your modifications to the SVN repository, git's commit only submits the changes to the local resource library. That is to say, each client has a complete git resource library, which is the meaning of "distributed ), finally, it is equivalent to the SVN commit operation to push all the modified parts of the local database to the remote resource library at one time ). This is a simple step for git. After learning about this, we can submit our translation to the Qt code base.

Git is widely used in Linux, and Linux kernel uses git for version control. In Windows, you can install MSYSGIT to use git. If you want to make your own contribution to Qt, it is recommended that you carefully learn how to use git.

Our project address is in http://gitorious.org /~ Cavendish/qt/qt-l10n-zh_cn. Open this page and you will see the address of our project at the top of the page:

650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/1J944D17-0.png "/>

There are three options. If your account is not added to commiter, there are only two: GIT and HTTP. First, use the following command to download all the source files to the local device based on the address provided by it:

Git clone git: // gitorious.org /~ Cavendish/qt/qt-l10n-zh_cn.git

Note that this process will be slow. In view of the speed of the domestic network, it may take about half an hour or longer, totaling more than 800 mb. Now you have all the source files. The following is the doc/src, where the source code of the Qt document is placed. All we need to do is to translate all the files here into Chinese. The zh_CN folder has been created under src, which is our working directory. When you translate a document, copy it to the zh_CN folder and then translate it. Note: do not modify the labels in the file, such as \ list or data in {}. These are required when the document is generated. What we need to do is to translate the displayed content into Chinese. If you are not sure which content is displayed or where it is displayed, open the generated file and compare it with the translation. After you finish, use

Git commit

Submit the modifications to the local resource library. Finally, you can use git push to submit to the remote resource library. In this way, our qt-l10n-zh_CN resource library has your work. Then, you need to click the Request merge connection on the right side of the page to submit a merge Request to the Qt resource library. This operation only needs to be performed once, with the aim of requiring you to share the same legal terms. After you submit a merge request and obtain the permission, your code is added to the Qt code library. When someone else uses the latest pull code, they can get the code you submitted. To facilitate management, we hope that you can submit only one merge request to agree to the legal terms, all you have to do is push your modifications to the qt-l10n-zh_CN repository, where the creator makes merge request to Qt before the Qt release. In this way, no one needs to make this request.

This is our general process. If you are not a commiter, you do not have the permission to perform the push operation. At this point, you can use the Clone repository connection on the right side of the page to create your own repository and make the qt-l10n-zh_CN's merge request after the translation ends, so that we can move your modified merge to the qt-l10n-zh_CN, then, submit the application in a unified manner.

We hope to submit the Chinese version of Qt to the Qt source code library through this project, so that more people can understand and learn Qt. If you are not familiar with the version control system, it may be very inconvenient. However, if you try to learn it, you will find the benefits of the version control system, more and more applications will be applied in your own projects.

This article is from the "bean space" blog, please be sure to keep this source http://devbean.blog.51cto.com/448512/389439

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.