How to translate JUpload ?

1) GENERAL PRESENTATION
2) HOWTO TRANSLATE
3) HOW DOES THE TRANSLATION build.xml SCRIPT WORKS

GENERAL PRESENTATION

This directory contains the translation stuff for JUpload. JUpload is used for two main open source developpement:

  • The applet itself. It is contained in the jupload sourceforge project.
    See http://sourceforge.net/projects/jupload/
  • A plugin for Coppermine, based on this applet. Coppermine is a nice picture gallery.
  • For more information on Coppermine: http://www.coppermine-gallery.net
  • For more information on the JUpload plugin for Coppermine: http://forum.coppermine-gallery.net/index.php/board,100.0.html
  • So the translation part also contains two parts:

    1. The text for the applet itself. The original text is encoded in UTF-16, and stored in the /wwwroot/translation directory. The text is then encoded in Unicode by the /wwwroot/translation/build_translation.xml and script, to be embedded into the applet. It's a java property file, filled with lines like: property = the translated text
    2. The text for the PHP part, specific to the JUpload Coppermine plugin. It's a PHP file, that fills an array. It contains an array initialization, like this:
      	$lang_jupload_php = array_merge (
      		$lang_jupload_php,
      		array(
      		  'link_comment' => 'Upload files to the gallery, with the help of an applet',
      		  ...
      		)
      	);
      

    2) HOWTO TRANSLATE

    For all translaters: Please also check/translate the Coppermine part, even if you don't use it. This will allow the plugin to be used by more and more people.

    The list of existing translations is available here (local package) and the reference is available translations (on SVN).

    Where are the original files ?

    The files are stored in the text subdirectory:

  • /wwwroot/translation/translation/applet.utf-16 contains the text for the applet itself
  • The texts for the CopperminePlugin are stored in a project, dedicated to this plugin.
  • File encoding

    To allow an easier management of characters specific to each languages (accents...), applet files are stored in UTF-16. The Coppermine files are in UTF-8, and I cant't change that. The file are publish in an HTML page, itself encoded in UTF-16.

    How to publish a new translation

    1. Please keep this UTF-16 file encoding, or publish files in a RTF document
    2. .
    3. Check the available translations (on SVN)
    4. If your language exists, please update the existing translation. All missing text is indicated there, in a comment, with the corresponding English translation. You just have to uncomment the line (remove the # at the beginning of the line), and translate the English text behind. Please also translate/check the Coppermine translation, even if you don't use it.
    5. If your language doesn't exist, please start from the English language, on the link below: lang.html (on SVN)
    6. To avoid any problem with character encoding, the easiest way is to save file as an RTF document.
    7. Get the last English translation for the two files below, translate them, and send them to my sourceforge mail address

    3) HOW DOES THE TRANSLATION build.xml SCRIPT WORKS

    All the material for JUpload translation is stored, in the /wwwroot/translation folder. This contains:

  • The applet translation text.
  • The /wwwroot/translation/build_translation.xml script, that get the translated from theses directories, and publish them in the target folder. This script is called by the main build script. It works this way:
  • The applet text is converted from UTF-16 to Unicode in /src/wjhk/jupload/lang, by a call to the native2ascii java utilities. Thanks to SVN capabilities, the file will be noted as changed only if the file content actually changed. This means that the build file can be run any number of time, without any impact, if no change occurred.
  • Both the applet and the CopperminePlugin text are published in one file per language, in the /wwwroot/translation/generated/html folder.
  • The available_translations.html file is built, to list the available translations.
  • These files are published on the JUpload web site , as quick as possible (at least for each release)