Difference between revisions of "Development Information"

From AMule Project FAQ
Jump to: navigation, search
(Added link to aMule mind-map.)
(Added information on creating and submitting translations.)
Line 13: Line 13:
 
== Translations ==
 
== Translations ==
 
Here is a helpful documentation how the gettext catalogs and portable object files work: [http://fplanque.net/Blog/devblog/2003/08/18/introducing_gettext_and_po_files click me!]
 
Here is a helpful documentation how the gettext catalogs and portable object files work: [http://fplanque.net/Blog/devblog/2003/08/18/introducing_gettext_and_po_files click me!]
 +
It is a must read if you want to know the idea behind the gettext translation system and how developers and translators interact by using the appropriate conventions.
 +
 +
=== Updating translations ===
 +
Updating translations is done by checking translated text marked as fuzzy or by adding missing translations for text string. Check the [http://amule.sourceforge.net/translations/trunk/current_status.xml translation statistics] page to find out whether you can help completing the language of your choice. If the status of the specific language is below 100% it means that we need your help. Here is what you have to do to help the aMule project:
 +
 +
#Download the proper .po file for the language
 +
#Add .old to the file name. Example:
 +
#* ''mv hu.po hu.po.old''
 +
#Open the file with a gettext catalog editor (e.g: poedit)
 +
#Complete as much of the missing and fuzzy content as you can
 +
#Save your changes into a new .po file (e.g: hu.po.new)
 +
#Read the next section to find out how you can submit your changes
 +
 +
=== Creating the patch ===
 +
This step ensures that the correct template (.pot file) is used so that the line numbers of the translated text strings are up to date and gives you the minimal difference between the old .po file (the one you downloaded) and your new .po file (the one with your changes applied). This lets the aMule staff apply your changes without the need to upload the whole new translation file itself.
 +
 +
#Download the latest [http://amule.sourceforge.net/translations/trunk/amule.pot amule.pot] file from the translation statistics page
 +
#Merge your translation and the template into a final .po file. Example:
 +
#*''msgmerge hu.po.new amule.pot > hu.po''
 +
#Determine the changes in patch format. Example:
 +
#*''diff -u hu.po.old hu.po > hu.po.diff''
 +
#*'''Note:'''The first argument is the old file followed by the new one!
 +
 +
=== Submit the changes ===
 +
Visit the [http://forum.amule.org/index.php?board=40.0 aMule forum translations board] and post a message in the proper topic of the language and attach the .diff file to it. This step requires you to register to the aMule forum.
 +
That's it. [http://wiki.amule.org/index.php/Soon Soon] a moderator or administrator will apply your changes and you can have good conscience having helped the aMule community.
  
 
== Documented code ==
 
== Documented code ==
 
The source code of aMule is documented inline with Doxygen compatible comments. This enables the generation of linked HTML documentation using [http://www.stack.nl/~dimitri/doxygen Doxygen].<br>
 
The source code of aMule is documented inline with Doxygen compatible comments. This enables the generation of linked HTML documentation using [http://www.stack.nl/~dimitri/doxygen Doxygen].<br>
 
[http://members.chello.hu/balla.gyorgy/aMule/aMule-doxydoc.7z Here] you can find the newest compressed version of the aMule Doxygen documentation. Download and uncompress it, open the index.html file and start browsing.
 
[http://members.chello.hu/balla.gyorgy/aMule/aMule-doxydoc.7z Here] you can find the newest compressed version of the aMule Doxygen documentation. Download and uncompress it, open the index.html file and start browsing.

Revision as of 21:21, 9 October 2009

Introduction

This page was created to help new developers understand how aMule is implemented. Basically the best way to learn about aMule is to take a look at the code itself. This however takes quite some time and is difficult to begin with when you are new to the project and don't know about the components and their interactions. Read on to get some help on getting started improving the application. We wish you success!

aMule comes with different utilities and is therefore not the only part of the aMule project. This wiki page however focuses on the aMule client application only!

Note: This site is work in progress. It was started by Marcell, because he found aMule was lacking documentation for developers.

The big picture

To get a first glimpse about aMule with a little insight into the boring details look at the aMule mind-map.

Note: This mind-map is based on the current knowledge of Marcell regarding the aMule client.

Translations

Here is a helpful documentation how the gettext catalogs and portable object files work: click me! It is a must read if you want to know the idea behind the gettext translation system and how developers and translators interact by using the appropriate conventions.

Updating translations

Updating translations is done by checking translated text marked as fuzzy or by adding missing translations for text string. Check the translation statistics page to find out whether you can help completing the language of your choice. If the status of the specific language is below 100% it means that we need your help. Here is what you have to do to help the aMule project:

  1. Download the proper .po file for the language
  2. Add .old to the file name. Example:
    • mv hu.po hu.po.old
  3. Open the file with a gettext catalog editor (e.g: poedit)
  4. Complete as much of the missing and fuzzy content as you can
  5. Save your changes into a new .po file (e.g: hu.po.new)
  6. Read the next section to find out how you can submit your changes

Creating the patch

This step ensures that the correct template (.pot file) is used so that the line numbers of the translated text strings are up to date and gives you the minimal difference between the old .po file (the one you downloaded) and your new .po file (the one with your changes applied). This lets the aMule staff apply your changes without the need to upload the whole new translation file itself.

  1. Download the latest amule.pot file from the translation statistics page
  2. Merge your translation and the template into a final .po file. Example:
    • msgmerge hu.po.new amule.pot > hu.po
  3. Determine the changes in patch format. Example:
    • diff -u hu.po.old hu.po > hu.po.diff
    • Note:The first argument is the old file followed by the new one!

Submit the changes

Visit the aMule forum translations board and post a message in the proper topic of the language and attach the .diff file to it. This step requires you to register to the aMule forum. That's it. Soon a moderator or administrator will apply your changes and you can have good conscience having helped the aMule community.

Documented code

The source code of aMule is documented inline with Doxygen compatible comments. This enables the generation of linked HTML documentation using Doxygen.
Here you can find the newest compressed version of the aMule Doxygen documentation. Download and uncompress it, open the index.html file and start browsing.