Size: 3209
Comment: missing edit-log entry for this revision
|
Size: 3180
Comment: poEdit -> Poedit, URL update, some minor updates to reflect "best practices"
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
poEdit serves as a front-end to gettext. It allows you to edit catalog files in a comfortable way. | Poedit serves as a front-end to gettext. It allows you to edit catalog files in a comfortable way. |
Line 5: | Line 5: |
== Where you can get poEdit from == | == Where you can get Poedit from == |
Line 7: | Line 7: |
* [http://poedit.sourceforge.net/ poEdit] | * [http://www.poedit.net/ Poedit] |
Line 9: | Line 9: |
== How to setup poEdit for Python/wxPython == | == How to setup Poedit for Python/wxPython == |
Line 11: | Line 11: |
* Download poEdit from the above site and install it. | * Download Poedit from the above site and install it. |
Line 13: | Line 13: |
* Start poEdit and select File/Preferences and create a new Parser on the Parsers tab with the following settings: | * Start Poedit and select File/Preferences and create a new Parser on the Parsers tab with the following settings: |
Line 22: | Line 22: |
* Start poEdit and select File/New Catalog | * Start Poedit and select File/New Catalog |
Line 27: | Line 27: |
* Select a charset, e.g. iso-8859-1 | * Select a charset, e.g. utf-8 |
Line 37: | Line 37: |
5. poEdit will automatically scan the directories you defined in step two and create the .po, .mo and its .po.poedit files. | 5. Poedit will automatically scan the directories you defined in step two and create the .po and .mo files. |
Line 43: | Line 43: |
If you do turn the following setting on, so poEdit starts with the Catalog Manager. | If you do turn the following setting on, so Poedit starts with the Catalog Manager. |
Line 45: | Line 45: |
* Start poEdit and select File/Preferences and select * Open catalogs manager on poEdit startup |
* Start Poedit and select File/Preferences and select * Open catalogs manager on Poedit startup |
Line 60: | Line 60: |
* Start poEdit and select the appropriate project and language you want to work on, this will open the poEdit with the appropriate .po file | * Start Poedit and select the appropriate project and language you want to work on, this will open the Poedit with the appropriate .po file |
Line 63: | Line 63: |
3. When done save it and poEdit will create the .mo file (unless you changed your Preferences/Editor | 3. When done save it and Poedit will create the .mo file (unless you changed your Preferences/Editor |
Introduction
- Poedit serves as a front-end to gettext. It allows you to edit catalog files in a comfortable way.
Where you can get Poedit from
[http://www.poedit.net/ Poedit]
How to setup Poedit for Python/wxPython
- Download Poedit from the above site and install it.
- Create a parser setup
- Start Poedit and select File/Preferences and create a new Parser on the Parsers tab with the following settings:
- Language = Python
- List of extensions = .py
- Parser command = C:\Python23\Python.exe C:\Python23\Tools\i18n\pygettext.py -o %o %K %F
- An item in keywords list = -k%k
- An item in inputs files list = %f
- Start Poedit and select File/Preferences and create a new Parser on the Parsers tab with the following settings:
Creating a new translation catalog
- Start Poedit and select File/New Catalog
- On the Project info tab enter the following:
- Enter the Project name, Team, and e-mail address
- Select the Language, e.g. German
- DO NOT select a Country unless you want to have country specific translations (in which case you have to setup your directory structure accordingly)
- Select a charset, e.g. utf-8
- On the Paths tab enter the following:
- Your base path, e.g. "C:\Dev" (where you keep all your development)
- Under paths enter the directory where your .\locale dir is, e.g. "ivcm"
- On the keywords tabs you don't need to enter anything assuming that you are using the _() macro for your translation strings.
- Press OK and save the catalog in the appropriate directory, e.g. "C:\Dev\ivcm\locale\de\LC_MESSAGE" and name it "ivcm.po"
- Poedit will automatically scan the directories you defined in step two and create the .po and .mo files.
- On the Project info tab enter the following:
Use the Catalog Manager for your translation projects
I would recommend to use the catalog manager, as it gives you fast and easy access to all your translation projects. If you do turn the following setting on, so Poedit starts with the Catalog Manager.
- Start Poedit and select File/Preferences and select
- Open catalogs manager on Poedit startup
- Create a project (in the catalog manager)
- Create the directory structure as explained on the previous page.
- Click on the icon "Create new translations project"
- Name the project, e.g. "ivcm"
- Define the directories per language (replace the ".\" with the full path name where you do your development for this project
- .\locale\en\LC_MESSAGES
- .\locale\fr\LC_MESSAGES
- .\locale\de\LC_MESSAGES
- Define the directories per language (replace the ".\" with the full path name where you do your development for this project
Updating .po and .mo files after you made source code changes
- Update from sources
- Start Poedit and select the appropriate project and language you want to work on, this will open the Poedit with the appropriate .po file
- Click on the wheel icon or select Catalog/Update from sources
- Review strings marked as "fuzzy" (yellow) or "not translated (greenish)
- When done save it and Poedit will create the .mo file (unless you changed your Preferences/Editor
Comments
Any suggestions to enhance this page are welcome. You can contact me at [werner.bruhin@free.fr]