In this text github.com/pardus We will explain what you need to do if you want to provide translation support to projects at www.
This article is divided into the following main topics.
- What are PO and POT files and how are they used?
- How to get PO and POT files from GitHub?
- What tools are used for translation?
- How to upload the translation file to GitHub?
What are PO and POT Files and How Are They Used?
What is a PO File?
PO files contain many entries in pairs with the original text and translated text. For example, an entry in the tr.po file might look like this.
msgid "Hello world" msgid "Hello world"
Each language has its own po file. For example, tr.po for Turkish language, de.po for German language, fr.po… for French language.
What is POT File?
POT files are a template for po files. The entries in it also contain all the texts to be translated (msgstr parts are blank). For example, a pot file looks like this.
msgid "Hello world" msgid ""
A Little Note
There are a few differences between PO and POT files.
PO files are created from the POT file. For example, if you want to make a translation in portuguese and there is no portuguese translation file, i.e. pt.po file, you create the portuguese translation file pt.po using the POT file.
For detailed information, please refer to the address below.
Syntax Rules and Considerations
We briefly described PO and POT files. Now we will describe the contents and rules of these files.
The schematic structure of a po file entry is as follows.
white-space # interpreter comment #. stripped comment #: reference… #, flag… #| msgid previous untranslated text msgid untranslated text msgid translated text
If we explain the above schema;
- whitespace: All entries begin with a blank line. Indicates a inserted line space.
- # –> Indicates where the translator can write comments for the input.
- #. –> Refers to comments extracted by this program from the application's source code.
- #: –> Indicates the reference to the source code of the program.
- #, –> Indicates the flag placed so that it can better diagnose the user or translator.
- #| –> Refers to the previous untranslated text that the translator translated.
- msgid –> The line containing the original text.
- msgid –> Line containing the translation of the original text.
We have acquired the basic knowledge required while translating. Now let's see how we can access the translation files on GitHub.
How to Access PO and POT Files from GitHub?
In this section, let's follow the steps below to access the translation files on GitHub.
First, if you don't have an account on GitHub, create one.
Behind github.com/pardus Go to the website and select the project you want to translate.
After selecting the project, fork the project and create a copy in your own account.


After the forking process is finished, we download the forked project to our computer. For this, we first click on the code button of the project we forked. Then we download the file.

We have reached the files to be used for translation. Now let's look at tools and websites that will make our job easier for translation.
Which Tools Are Used for Translation?
There are some tools and websites that will make our job easier when translating. These;
- Tureng –> A detailed online dictionary with multiple languages.
- Translation Editor –> Translation editor with a clear user interface.
You can install the translation editor on your Pardus installed computer via the Pardus Software Center. Now let's get to know the Translation Editor program.
Setting Profiles in Your Translation Editor
Translation Editor ilk When you install it, it will ask you to create a profile.

Fill in the required fields in the Profile tab.

Then make the language settings. When you select the relevant language, the settings below automatically it will come if you want the settings elle You can edit.

You can see the settings you made on the confirmation screen. If there is a setting you want to change, you can go to the relevant tab and change it, or after completing the installation, you can make changes to the profile from within the application or add new profiles for different languages.
Creating a New Profile for Different Languages
Here we will show you how to create new profiles for different languages. If you don't want to create multiple profiles there's You can continue our article.
Playing
After completing the profile settings, we will install the pot file in the pardus-software project that we downloaded to our computer through the application. (pot files are usually located in the po folder of the respective project)
Click the Open button in the translation editor application and navigate to the po directory of the downloaded project. In our example, we go to the pardus-software/po directory.

Here if in the language you want to translate in the project shortcomings (fuzzy) exists and you want to translate it open the po file of the relevant language. If the language you want to translate does not have a po file, the project pot file open it. To open the pot file, change the file type from “Gettext translation” to “Gettext translation template” in the Open section and open the pot file.

Before making any changes to the pot file settings (button with three horizontal lines on top of each other)Edit TitleClick ”.

In the window that appears,ProjectSwitch to the ” tab. Here "Project Id VersionWe write the name of the relevant project in the ” field and close the window.


Finally "Save asWe click on the button “(The button with the down arrow sign to the right of the Save button).

Which language are we going to translate? language code – eg for Turkish “tr.po“, for German”warehouse“, for French”fr.poWe save it as ” with –.

Now your translation file is ready and you can start the translation process. When you finish the translation process, you can save and close the program.

After your translation process is finished, you can add a single translation file(s) back to our project on Github. pull request we have to throw.
How Do I Upload the Translation File to GitHub?
After preparing the translation file, add these files to the project via GitHub. pull request we will throw.
First of all, we have Github in our project. to the folder to change We are going. For us, this folder is the po folder.

After uploading the file, provide the required explanation. short We write and send.

Finally, to inform the project owner of all these changes we have made and to add these changes to the project. Pull request we throw For this our project We go to its home page and click “ContributeClick the ” button and the window that appears will appear.Open Pull RequestClick the ” button.

Here's what we did in the project all the changes detailed explaining in a wayCreate pull requestClick the ” button.

Recent changes we made project owner and other participants reviewed by if correct and appropriate is included in the project.

Our article on translation support ends here. You can find detailed information on the subject in the links below. You can send your questions about the subject via our Discord channel.
Related links: