Personal tools
Namespaces
Variants
Actions
Navigation
Projects
Toolbox

AC3Filter:How to translate

From AC3Filter
Jump to: navigation, search

Translation is easy! This manual describes how to make a new translation of AC3Filter or fix bugs in an existing one using poEdit program.

Contents

[edit] Installing poEdit

First, you need to install the latest official AC3Filter package. This guarantees that you have the latest translation template file (a file with a list of all original untranslated strings).

Next, download Windows version of poEdit, install and run it. On the first run it will ask you for your name and e-mail. This information will be saved in the translation files you create, so people can contact you about bugs in your translation.

Note, that this program is fully translated into many languages (it would be strange if it were not :) so you can work comfortably. But in this manual I will use English interface, so you may need to switch your language to English to be able to navigate through the menu.

[edit] Creating a new translation

In poEdit pulldown menu choose File->New translation from POT file. POT file is a translation template file, with a list of original untranslated strings. This file is installed with the filter into AC3Filter_dir\lang folder (where AC3Filter_dir is a folder where AC3Filter is installed; default folder is C:\Program Files\AC3Filter). Choose ac3filter.pot file.

Next dialog gives details of your new translation. Complete it like this:

AC3Filter-How to translate-New translation.png

In Project name and version field indicate the filter version you're making translation for. Leave charset as utf8 as the most portable format.

After you're done with the form, the program will ask you where you want to save the result. Write PO file (the resulting file with translated messages) back to the AC3Filter_dir\lang. The name of the file must be a 2 or 3-letter code of you language. See the list of language codes.

After it you'll see something like this:

AC3Filter-How to translate-Untranslated.png

It is a list of all strings at the top of the window. In the example above IDC_CHK_JITTER is selected. Below you can see the fields for untranslated string, developer's comment (not editable) and your translation.

There're two types of strings:

AC3Filter-How to translate-Controls.png

You need to translate the original control label that can be found at the developer's comment.

When you finish the translation you'll see something like:

AC3Filter-How to translate-Translated.png

[edit] Translation guides

If you're not sure how to translate something, leave it untranslated. Do not make fuzzy translation!

Input\tmean: %ims\tstddev: %ims\n
Output\tmean: %ims\tstddev: %ims

This text is about jitter parameters. First string is about input jitter and second is about output. 'mean' is arithmetic mean (average value). 'stddev' is common name for standard deviation. 'ms' is milliseconds.

[edit] Testing the translation

You may need to test your translation from time to time (for example to make ensure that there's enough space for your translated string). To do this, save your translation. This will create 2 files: lng.po (text file with the translated strings) and lng.mo (machine-oriented file). You need to place the last to the proper location.

Create folder AC3Filter_dir\lang\lng\LC_MESSAGES where AC3Filter_dir is a folder where AC3Filter is installed and lng is 3-character language code. (For Russian translation and default filter location you can see the following folder: c:\Program Files\AC3Filter\lang\rus\LC_MESSAGES) Copy your lng.mo file there and rename it to ac3filter.mo.

That's all. Now you can open filter configuration and choose your language!

[edit] Editing an existing translation

You can edit an existing translation in the same way. All PO files for languages supported are distributed with the filter. Just open a PO file you want to modify.

It is a good idea to contact the file creator or the last translator before modifying the file. You can find contact details in the translation info when you choose a language in AC3Filter:

AC3Filter-How to translate-Translation info.png

[edit] Including the translation into AC3Filter distribution.

Just contact the author and send the PO file you have created/updated.

[edit] More info about translation

AC3Filter uses GNU gettext library for internationalization. You can find more info about how it works, about manipulating PO/MO files and much more in this manual.