首页 > 其他分享 >How to translate Kdenlive

How to translate Kdenlive

时间:2022-12-18 20:03:06浏览次数:63  
标签:fr pot kdenlive How Kdenlive file translation translate po

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:

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».

  1. Checkout kdenlive from SVN:
    ​​​svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/trunk/kdenlive​
  2. Change directory to the "po" folder:
    ​​​cd po​kdenlive.pot file is the original English text. It does contain the translation.
  3. 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​
  4. Copy and rename kdenlive.pot to the new directory:
    ​​​cp kdenlive.pot fr/kdenlive.po​
  5. Translate the newly created po file using a .po editor, like one of the ones listed above.
  6. 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: ​
    cp da/CMakeList.txt fr/CMakeList.txt
    kwrite fr/CMakeList.txt​
    ​ Change the da to fr.
    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.
  7. 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.

  1. 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.
  2. 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

  1. Get in contact with the translator or with Kdenlive mailing list.
  2. Checkout Kdenlive from SVN.
  3. 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

相关文章