User Tools

Site Tools


tupi_translation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tupi_translation [2019/07/16 20:31]
tupi_translation [2017/03/11 18:22] (current)
Line 1: Line 1:
 +;#;
 +[[misc_doc#​Miscellaneous Tupi Resources|Back to Previous Page]]
 +;#;
 +=====How to translate Tupi to any language=====
 +Learn to use linguist and understand how it works. Let's start from the beginning. Tupi is a software application developed using the Qt API, which is written in C++. The good news is that you don't have to learn Qt or C++ to help us translating stuff.
 +Nevertheless,​ it's important that you understand that Qt is not just a development API, but a set of many additional tools that make easier the development of applications. One of them is linguist, a very simple software which is included with the Qt installation and let you create new language supports for Tupi.
  
 +{{ linguist_01_en.png }}
 +;#;
 +**Fig 1**. Linguist Application
 +;#;
 +
 +If you have installed Qt in your computer, surely you already have linguist installed too. Search for the application launcher in the main menu of your graphical environment,​ in the Programming section:
 +
 +{{ linguist_02_en.png }}
 +;#;
 +**Fig 2**. Launching Linguist Application
 +;#;
 +
 +The basic input for this utility is a plain text file with extension "​.ts"​. Using this file you could translate all the messages included in '''​Tupi'''​ to the language you want to. A good news is that you don't have to start from the scratch, because we already have one (tupi_es.ts) from our website. Download it and rename it counting on the language you want to translate it. In example, if you want to create the Spanish support for Tupi, then you should rename the file to tupi_es.ts and open it from the linguist software like this:
 +
 +{{ linguist_03_en.png }} 
 +{{ linguist_04_en.png }}
 +;#;
 +**Fig 3**. Openning a translation file (.ts)
 +;#;
 +
 +Now, let's take a look to the main components of ''​linguist'',​ specifically those that we are going to use. The first is the context list. Its name sounds a little complex, but is just a list of "word categories"​. We mean, every item of the list that we see at the picture, simply represents a set of words related to that context. ​
 +
 +{{ linguist_05_en.png }}
 +;#;
 +**Fig 4**. Context List
 +;#;
 +
 +The next component, is the list of words or messages related to a context. These messages are used by '''​Tupi'''​ and they are our target to translate. Every context can have a variable number of messages to translate. Regardless of it, all the words must be translated.
 + 
 +{{ linguist_06_en.png }}
 +;#;
 +**Fig 5**. Words List of a Context
 +;#;
 +
 +For now, we already have identified the names of the sets (contexts) and the list of words for every context. Now, let's identify the most important part of the tool, the translation form:
 +
 +{{ linguist_07_en.png }}
 +;#;
 +**Fig 6**. Translations Forms
 +;#;
 +
 +Now, let's see in detail, which are the fields we must take care about, in the translation form:
 +
 +{{ linguist_08_en.png }}
 +;#;
 +**Fig 7**. Detailed View of the Translation Form
 +;#;
 +
 +The field marked in red contains the word we have to translate; in this specific case, the word "​Pen"​. The field marked in green contains the space where we must write the translation for the word. In this particular case, for the Spanish translation it is: "​L├ípiz"​.
 +
 +Ok, now that we made an specific example, let's make a general description of the whole process: Once we have opened the language support file (i.e. tupi_it.ts),​ we must to pick every context (1), one by one. For every context selected, we have to click on every word from the list in the second column of the interface (2), to translate them from the form placed in the bottom side (3). Once we have finished with all the contexts and every word or message has been translated, we will have finished with our mission. ​
 +
 +{{ linguist_09_en.png }}
 +;#;
 +**Fig 8.** Main components of the Linguist Application
 +;#;
 +
 +Finally, we have to save the changes and send our file by email to the development team. This "​.ts"​ file will be included in further versions of '''​Tupi''',​ giving support to a new Language thanks to you!
 +
 +{{ linguist_10_en.png }} {{ linguist_11_en.png }}
 +;#;
 +**Fig 9**. Saving the translation project (.ts)
 +;#;
 +
 +If you want to learn more about ''​linguist'',​ you can visit the official manual at: [[ http://​doc.qt.io/​qt-5/​qtlinguist-index.html ]]
 +
 +;#;
 +[[misc_doc#​Miscellaneous Tupi Resources|Back to Previous Page]]
 +;#;