You are here: --/ Linux --/ A Quick and Dirty Guide to Poedit (on Linux)

A Quick and Dirty Guide to Poedit (on Linux)


Poedit is a cross-platform gettext catalogs(*.po files) editor. Usually, translators use conventional editors such as gedit, vim or kate for translation. These are basically text editors and there is possibility of making mistakes easily. Poedit offers several features which can help to translate the files much faster and in an efficient way. Poedit is released under the MIT license. Here are some of the features :
  • Translation memory : Poedit can generate a database of translated strings from the *.po and *.mo files that are already installed within the system.
  • Cross platform: Poedit is available for GNU/Linux, Mac OS X and Windows systems. In GNU/Linux Poedit can integrate with both GNOME and KDE desktop environments.
  • Unicode support : Poedit has full unicode support in GNU/Linux systems.
  • Poedit can also update the PO file creation time and other meta information automatically.

A full list of features are available here :

Installation:
Binary packages of Poedit are available for all the popular GNU/Linux distributions. You can use yum or apt-get to install Poedit, depending on your distribution.

In Fedora:
# yum install poedit

In Debian/Ubuntu:
#apt-get install poedit

The source and windows packages are available here.

Setting up Poedit:
Poedit can be launched from a terminal using the command “poedit” or from Applications –> Programming –> Poedit. On first run, Poedit asks some of the essential information such as your name, email address, translation memory settings, etc… You can also change the preferences at a later time from File –> Preferences .

Screenshot Poedit Preferences A Quick and Dirty Guide to Poedit (on Linux)

The Personalize and Translation Memory are the important tabs in the Preferences section. Provide your full name and email address in the Personalize tab. This information will be inserted on all the files that you work with poedit.

The Translation Memory setup is not a mandatory task, but doing so may ease the process of translation. This is an one time setting and you may not require to change unless you wish to add new po/mo files to the translation memory.

Screenshot Poedit Preferences TM A Quick and Dirty Guide to Poedit (on Linux)Click the Add button to add the language, it will give a popup window like this:
Screenshot Poedit preferences langauge code A Quick and Dirty Guide to Poedit (on Linux)Select the language and them press OK. Now generate the database for the said language by pressing the Generate Database button.

Screenshot Poedit Preferences Update TM A Quick and Dirty Guide to Poedit (on Linux)It will then show the list of locale paths that are associated with the selected language. Press Next to continue.

In some systems there may may not be any local in /usr/local. So remove it from the list, if you don’t have locale files in /usr/local.
Screenshot Poedit Preferences Update TM2 A Quick and Dirty Guide to Poedit (on Linux)Press Finish to generate the database. Poedit then scans the translated files and generate the database.
Screenshot Poedit Preferences scanning A Quick and Dirty Guide to Poedit (on Linux)
The preferences settings are now complete.

Setting up a new catalog:
In Poedit, each po file is referred as a catalog. There are two methods to create a Catalog – either from an existing POT file or from scratch. To create a catalog from an existing POT file, download the latest POT file from the project repository and point it to File –> New Catalog From POT file.
Screenshot Poedit Settings A Quick and Dirty Guide to Poedit (on Linux)Here you have to provide the name of the project and team information, which will be automatically updated in the meta section of the translated po file.

Provide a name for the translated file and save it. Usually the po file name will be the same as the POT file except that it has a .po file extension. Poedit can suggest translated strings if available. To know the available options, Right-Click on the original string.
Screenshot Poedit home rightclick A Quick and Dirty Guide to Poedit (on Linux)
You can also know the status of the translation towards the left-bottom of the poedit window.
Screenshot Poedit Status A Quick and Dirty Guide to Poedit (on Linux)

Copy from http://flossvalley.blogspot.com/2008/07/quick-and-dirty-guide-to-poedit.html

Bài viết liên quan

Tags: , , ,

Leave a Reply

 
Copyright © 20010 ..::VN Support::...All Right Reserved.
Design by Junkie and developed by Manlivo.
Contact:
  • sugiatinhyeu_thantinhyeu3
  • manlivo
  • manlivo@gmail.com
Powered by WordPress.
  • frontpage hit counter
  • Page Ranking Tool