Translate *.po Files with Poedit for LXDE

Posted by maces on 6. Januar 2009 – 20:25

Klicke hier für die Deutsche Version

As you might know I’m involved in the LXDE Project. I’m manly helping by making translations for the components of LXDE, translate the Wiki into German or helping out in the Forum. Here now a Howto how you can help translating LXDE:

Original post (by me)

Many of you wanted to help translating LXDE but only a few know how to do this, until now. Here is a description on how to help translating the components of LXDE. You can also view this article in the Wiki:

Translate *.po files with Poedit

This is a description how to translate LXDE components with Poedit. It is not complete and may be wrong at some places edit when I missed something important or even said something wrong (hope not ;) ).

Get the code

First of all you should get the latest code from svn. To do so type in the following

 svn co https://lxde.svn.sourceforge.net/svnroot/lxde/trunk/ ./lxde

into a Terminal. You also can use a script for this.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# svn_co_lxde.sh
# autor maces
 
if [ -z $1 ]
then
	xterm -e $0 copy
else
        echo "starting"
        echo "------------------"
        svn co https://lxde.svn.sourceforge.net/svnroot/lxde/trunk/ ./lxde
 
        echo "------------------"
        echo "(program exited with code: $?)"
        echo "Press return to continue"
        #to be more compatible with shells like dash
        dummy_var=""
        read dummy_var
fi
exit

The script opens xterm and execute the same command as above. Make sure to make it executable (chmod 755 ./svn_co_lxde.sh). You now should have the latest code in ./lxde.

Install Poedit

Of course we need Poedit, so just install it (as root).

Archlinux:

 pacman -Sy poedit

Debian/Ubuntu:

 aptitude install poedit

Please add the command for your Distro

Translating

In this example we are going to translate LXMusic (Just change the path for another Program).

Open a *.pot file

This way when there is no yourlanguage.po file. Click on File->New catalog from POT file, navigate to ./lxde/lxmusic/po and open lxmusic.pot with Poedit and open the file. Now insert the wanted informations (if you want) and click OK. Now you have to choose the *.po file which will be generated. Please name it like de_DE.po/es_ES.po/zh_TW.po/… .

Open a *.po file

This way when you want to edit an existing yourlanguage.po file. Click on File->Open navigate to ./lxde/lxmusic/po and open lxmusic.po with Poedit and open the file.

Start translating

You should see something like this (If it doesn’t check Menu->View).

Here is a explanation of what you see.

Now we start translating. Simply select the strings you want to translate by click on them and insert the translation in the empty box under the original text (look at the Image). Go on like this until you are ready.

(hint: ctrl+up/down arrow moves between the strings)

Fuzzy translations

A translation can be marked as fuzzy, a fuzzy translation can originate from more or less to sources. The first one being yourself – or one of your peers. If a string is roughly translated and needs more attention it’s wise to mark it fuzzy to make it easy to find and review. The second source for fuzzy strings are msgmerge or something similar, when mergin an old translation with an updated template (.pot) msgmerge will note updated english strings with fuzzy to notify the translator to review the translations.

Do not leave fuzzy strings in translations considered done!

Image:Fuzzy-button.png

Edit Comment

For editing/making a comment simply click on the edit button (next to fuzzy button) and insert a comment in the Window which will appear.

Image:Edit-comment.png

You easily can see if a translation contains a comment by the comment icon in front of the original text in the mainview.

Image:Comment-symbol.png

What have I changed

To check what you have changed look for lines with a star in front of the original text.

Image:Changed-symbol.png

Save the translation

To save the .*po file just Click on File->Save.

Upload translation

There are (at the moment)two ways to upload the translations.

Way1 – The tracker

For this way you need an SF.net account. Go to https://sourceforge.net/tracker2/?group_id=180858&atid=894871 and click on add new artifact. As subject use something like “German translation for lxmusic” and choose “Translations” as Category. Type in a nice text and don’t forget to attach your *.po file. After this click on Add Artifact and you are ready.

Way2 – The Mailinglist

For this way you need to subscribe to translation@mailinglist.lxde.org. If you are subscribed write a email to translation@mailinglist.lxde.org with Something like “German translation for lxmusic” as subject. Type in a nice text and don’t forget to attach your *.po file. After this send the email and you are ready.

Links

Wiki:

Translation project:

Mailinglist:


Deutsche Version

Wie ihr vieleicht wisst, arbeite ich an LXDE mit. Hauptsächlich durch das Übersetzen der LXDE Komponenten, übersetzen des Wikis in Deutsch oder durch Hilfe im Forum. Hier nun ein Tutorial wie ihr mithelfen könnt LXDE zu Übersetzen:

Originaler Beitrag (von mir)

Übersetze *.po Dateien mit Poedit

Das ist eine Beschreibung, wie man LXDE Komponenten mit Poedit übersetzen kann. Sie ist allerdings noch nicht ganz Fertig, daher sind Verbesserungsvorschläge erwünscht ;) .

Hole den Code

Als erstes brauchst du den aktuellsten Code aus dem svn. Dafür gibst du folgendes in ein Terminal ein.

 svn co https://lxde.svn.sourceforge.net/svnroot/lxde/trunk/ ./lxde

Du kannst aber auch ein Skript dafür nutzen.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# svn_co_lxde.sh
# autor maces
 
if [ -z $1 ]
then
	xterm -e $0 copy
else
        echo "starting"
        echo "------------------"
        svn co https://lxde.svn.sourceforge.net/svnroot/lxde/trunk/ ./lxde
 
        echo "------------------"
        echo "(program exited with code: $?)"
        echo "Press return to continue"
        #to be more compatible with shells like dash
        dummy_var=""
        read dummy_var
fi
exit

Das Skript startet Xterm und führt den selben Befehl wie oben aus. Stelle sicher, das die Datei ausführbar ist (chmod 755 ./svn_co_lxde.sh). Jetzt solltest du den aktuellsten Code in ./lxde haben.

Installiere Poedit

Natürlich brauchen wir Poedit, also (als root) installieren.

Archlinux:

 pacman -Sy poedit

Debian/Ubuntu:

 aptitude install poedit

Übersetzen

In diesem Beispiel übersetzen wir LXMusic (Ändere einfach den Pfad für ein anderes Programm).

Eine *.pot Datei öffnen

Nutze diesen Weg wenn es noch keine deinesprache.po Datei gibt. klicke auf Datei->Neuer Katalog aus POT Datei, navigiere zu ./lxde/lxmusic/po und öffne lxmusic.pot mit Poedit. Jetzt fülle die gewünschten Informationen aus (Wenn du magst) und klicke OK. Jetzt kannst du die *.po Datei aussuchen die generiert wird. Bitte nenne sie ähnlich wie de_DE.po/es_ES.po/zh_TW.po/… .

Eine *.po Datei öffnen

Nutze diesen Weg wenn du eine bereits vorhandene *.po Datei editieren möchtest. Klicke auf Datei->Öffnen navigiere zu ./lxde/lxmusic/po und öffne lxmusic.po mit Poedit.

Mit dem Übersetzen starten

Du solltest etwas wie das Hier vorfinden (Falls nicht schau mal in Menü/Ansicht).

Hier eine Beschreibung was du siehst.

Jetzt starten wir das eigentliche Übersetzen. Klicke einfach auf einen String den du übersetzen willst und füge die Übersetzung in die Lehr Box unten ein (beachte das Bild). Mach so weiter bis du alles Übersetzt hast.

(Tip: Strg+hoch/runter Pfeile wechselt zwischen den Strings)

Fuzzy Übersetzungen

Eine Übersetzung kann als “fuzzy” markiert werden. Eine “fuzzy” Übersetzung  kann z.B. dem Quellcode entstammen. Falls ein String also schlecht Übersetzt ist, muss er als “fuzzy”markiert werden, um ihn schneller zu finden. Der zweite Grund für “fuzzy” Übersetzungen ist das zusammenführen von alten Übersetzungen mit neuen Vorlagen (.pot). msgmerge erkennt “fuzzy” Übersetzungen und Informiert den Übersetzer, die Übersetzung noch einmal nachzusehen.

Lasse keine fuzzy Strings in deiner Übersetzung bevor du sie hoch lädst!

Image:Fuzzy-button.png

Bearbeite Kommentar

Um einen Kommentar zu erstellen/editieren klicke einfach auf den Button (neben dem fuzzy Button)und füge den Kommentar in das Fenster, welches erscheint, ein.

Image:Edit-comment.png

Du kannst einfach an dem Kommentarsymbol erkennen ob eine Übersetzung einen Kommentar beinhaltet.

Image:Comment-symbol.png

Was habe ich verändert

Um zu prüfen was man selber geändert hat, sucht man einfach nach dem Sternsymbol neben den Originalen Strings.

Image:Changed-symbol.png

Die Übersetzung speichern

Um die *.po Datei zu speichern klicke auf Date->Speichern.

Übersetzung hochladen

Es gibt momentan zwei Wege die Übersetzungen hochzuladen.

Weg1 – Der Tracker

Für diesen weg brauchst du einen  SF.net Account. Gehe zu https://sourceforge.net/tracker2/?group_id=180858&atid=894871 Und klicke auf “add new artifact”. Als Betreff gib etwas wie “German translation for lxmusic” an und wähle  “Translations” als Kategorie. Tippe einen netten Text ein und vergesse nicht deine *.po Datei/en anzuhängen. Danach klickst du auf “Add Artifact” und du bist Fertig.

Weg2 – Die Mailinglist

Für diesen Weg musst du in der translation@mailinglist.lxde.org sein. Wenn du hinzugefügt wurdest schreibe eine Email an translation@mailinglist.lxde.org mit etwas wie “German translation for lxmusic” als Titel. Tippe einen netten Text ein und vergesse nicht deine *.po Datei/en anzuhängen. Danach schickst du die Email ab und du bist Fertig.

Links

Wiki:

Übersetzungs Projekt:

Mailinglist:

Tags: , , , , ,
This post is under “Allgemein, LXDE, LXDE-eng” and has 3 respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

3 Responds so far- Add one»

  1. 1. EGA Said:

    Wenn ich Dateien mit Poedit öffne, können Umlaute nicht dargestellt werden! Was tun?

  2. 2. maces Said:

    Hi

    Die Codierung der *.po Datei sollte auf UTF-8 stehen. Katalog -> Optionen -> Projektinfo -> Zeichensatz -> utf-8

    maces

  3. 3. EGA Said:

    Alles klar. Danke!

Post a reply




Ihr Browser versucht gerade eine Seite aus dem sogenannten Internet auszudrucken. Das Internet ist ein weltweites Netzwerk von Computern, das den Menschen ganz neue Möglichkeiten der Kommunikation bietet.

Da Politiker im Regelfall von neuen Dingen nichts verstehen, halten wir es für notwendig, sie davor zu schützen. Dies ist im beidseitigen Interesse, da unnötige Angstzustände bei Ihnen verhindert werden, ebenso wie es uns vor profilierungs- und machtsüchtigen Politikern schützt.

Sollten Sie der Meinung sein, dass Sie diese Internetseite dennoch sehen sollten, so können Sie jederzeit durch normalen Gebrauch eines Internetbrowsers darauf zugreifen. Dazu sind aber minimale Computerkenntnisse erforderlich. Sollten Sie diese nicht haben, vergessen Sie einfach dieses Internet und lassen uns in Ruhe.

Die Umgehung dieser Ausdrucksperre ist nach §95a UrhG verboten.

Mehr Informationen unter www.politiker-stopp.de.