How to translate Kdenlive
If you would like to help or add a new translation, please contact us on the Mailing List so that the translation work can be coordinated.
Translation tools
It is recommended to use a specific translation tool rather than edit in a text editor. Translation tools offer better support for search, translation memory and spelling checking. Feel free to use:
- lokalize (part of kde-sdk package) under KDE4
- kbabel is a KDE3 translation program
- gtranslator for Gnome
Note that there often exist localized tutorials on how to use the above listed programs. Try searching in your own language for a guide/tutorial on how to use them.
Making a new translation
Here is an example of creating a new translation for the French language, which has the ISO name «fr».
- Checkout kdenlive from SVN:
svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/trunk/kdenlive
- Change directory to the "po" folder:
cd po
kdenlive.pot file is the original English text. It does contain the translation. -
kdenlive.po is the translation. For technical reasons, each kdenlive.po file needs to be placed in a subdirectory, in this case fr/kdenlive.po. So create a subdirectory with the iso name of the language:
mkdir fr
- Copy and rename kdenlive.pot to the new directory:
cp kdenlive.pot fr/kdenlive.po
- Translate the newly created po file using a .po editor, like one of the ones listed above.
- If you want to test the newly created po file, you need to set up the build system to include it. Copy a CMakeList.txt file from another po directory and change it:
Change the da to fr.
cp da/CMakeList.txt fr/CMakeList.txt
kwrite fr/CMakeList.txt
Then, add the name (fr) of your newly created directory to the file po/CMakeList.txt in order:
kwrite CMakeList.txt
Finally you have to run CMake as you would normally and install kdenlive to test your new translation. - Present your work on the kdenlive mailing list and send us the po file for integration.
We do appreciate it if translators are willing to become registered as SVN writers, so they can update translations themselves.
Update a .po file (translation) with a .pot file (English source text)
To update an existing translation you need to install kdesdk-scripts to get extractrc needed for the first step, and gettext for the second step.
- Go to the kdenlive directory and run Messages.sh to update the .pot file.
./Messages.sh
This script reads all strings that need to be translated from the source code files and adds them to kdenlive.pot. - Go to the .po directory to merge the translated file with the updated .pot file:
msgmerge -U fr/kdenlive.po kdenlive.pot
(where fr is the ISO name of the language/translation you want to update). Then use a tool to edit fr/kdenlive.po
Reviewing a translation
- Get in contact with the translator or with Kdenlive mailing list.
- Checkout Kdenlive from SVN.
- Correct the translation and send a patch to the translator. Example:
svn diff > mydiff.patch
If you want to get involved, send me a mail: jb (at) kdenlive org
标签:fr,pot,kdenlive,How,Kdenlive,file,translation,translate,po From: https://blog.51cto.com/u_15082498/5951079