A step by step guide to setting up Lokalize & svn for translations

Raghavendra Kamath raghu at raghukamath.com
Tue Aug 18 09:27:20 BST 2020


Hi Everyone,

I recently started using Lokalize & svn to work on Hindi translations for KDE. 
The Lokalize handbook [1] is a good resource but I felt that I needed more 
simplified step by step guide to set up the work environment and get started.

After setting it up for my self I am sharing it here so that any new Lokalize 
& svn user will find it easy. I can also direct new users to this mail for 
setting up their environment. This guide is made for linux users but you can 
use it for other platforms too except for the step where we install the 
software. So here it goes.

## Install  Lokalize and subversion from your distribution repository. 

```
sudo apt install lokalize subversion  # for ubuntu/debian distros
pacman -S lokalize subversion  # for Arch
```

## Clone the Hindi and template folder to get the source and output folder for 
our translations.

```
# Make a parent folder where we will have our translation work
mkdir translations
cd translation
```

## The following  command clones the hindi  (hi)  folder where we will save 
the translated .PO files. This will we cloned inside the translation folder.

```
svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/hi
```
The following command clones the template folder where the original 
untranslated .pot files are stored. We take these .pot files and add 
translations to them, save them as .po file in the hi folder under relevant 
project sub folder. Lokalize does this automatically for us.

```
svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/templates
```

Once we have cloned both folder in to our machine, the directory structure 
will be:

translations (parent folder)
----> hi (sub folder)
----> templates (sub folder)

## Setup Lokalize

1 - Open Lokalize and go to `Settings > Configure Lokalize`
2- In the identities tab put your name email and choose the default language 
as Hindi (hi). Default mailing list - kde-l10n-hi at kde.org. Default language 
team - Kde-hindi and lastly add your name in hindi for lokalized name.

## Setup our project.

1. To open our project go to - `Project > Open Project`
2. Browse to the hi folder that we cloned earlier and choose the 
index.lokalize file present in the folder. It will fetch all the translations 
and files and will show the status of translations in the project overview tab.

The Red progress bar means there is no translation yet, green means translated 
and yellow means the string has changed and the translation needs an update.

3. Make sure the project is correctly set up. Go to `projects > configure 
projects` and check the details in the general and advanced section:

*General*
ID: kde-hi
Target language: Hindi(hi)
Mailing list: kde-l10n-hi at kde.org
Root folder : path of the hi folder that we cloned
Glossary: path_of_the_hi_folder/terms.tbx

* Advanced* (Paths subsection)
Template files folder: path to the templates folder we cloned earlier
Branch Folder: path to the hi folder

## Get started
Now that we have set up Lokalize, get your self familiar with it by reading 
the Lokalize handbook. Read the translation style guide given here -> http://
fuelproject.org/newlook/wp-content/uploads/2016/04/fuel-translation-style-and-
convention-guide-hi.pdf. And start working 😃 👍🏽

Choose a small project first to get the understanding and add in your 
translations.

## Checking and submitting your translations
Once you have worked and are ready to send your translations for review you 
must first check for any errors. The following commands can help you will 
checking the translated files for any error.
```
msgfmt --check <your_newly_translated_file.po>
```
It will give you line numbers if there are any error, which you have to 
correct.

Now after the file is error free, send a mail to this mailing list that you 
have completed the translation for a project and want to request review. 
Someone will answer your mail and then send them the files. They will review it 
and commit to the main repository.

Note: I am also a new contributor so some of the steps may be long or may have 
some other way of doing it. If anyone notices any error please correct me.

Thank you

[1](https://docs.kde.org/stable5/en/kdesdk/lokalize//)
-- 
Raghukamath




More information about the Kde-l10n-hi mailing list