source: 3thparty/jupload/maven-translation-plugin/src/site/apt/overview.apt @ 3951

Revision 3951, 4.6 KB checked in by alexandrecorreia, 13 years ago (diff)

Ticket #1709 - Adicao de codigo fonte java do componente jupload

Line 
1           --------------------
2           JUpload - jupload-translation - Translation overview
3           --------------------
4           --------------------
5           --------------------
6
7
8  <<Content>>
9 
10  * {{{A}General presentation}}
11 
12  * {{{B}Why this plugin was developped?}}
13 
14  * {{{C}What does it do?}}
15 
16
17           
18{A}. General presentation
19~~~~~~~~~~~~~~~~~~~~~~~~~
20
21  By default, __the plugin is not activated__. That is: if you execute a standard Maven compilation, the applet code is
22  compiled with the translation files, stored in JUpload package, whether you are using a JUpload release package, or
23  a checkout from JUpload SVN. If you __updated translation__, please read the {{{./howto-useit.html}HowTo use it}} page.
24
25  This plugin manages the translation files. It makes it easy for translator to produce new translation, and (more difficult)
26  to update existing translation, especially for adding the missing translation files.
27 
28  The plugin is based on two set of files:
29 
30  * The ''./jupload-translation/src/lang'' folder contains the human readable files. The translator should work on these
31  files only. These files are formatted by the plugin. So all files are generated, according to the lang.property file.
32  In each translation, each missing text (based on the lang.property file) is replaced by a commented line, beginning by
33  MISSING, and containing the English translation. It makes it easy for translator to update an existing translation. 
34 
35  * The ''./jupload-translation/src/resources/lang'' are generated from the previous one. They are used only by java code,
36  during the applet execution. They should not be used by translators.
37
38
39{B}. Why this plugin was developped?
40~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41
42* Missing text
43
44  JUpload is widely translated (more than 20 languages). But most translation are partial ones: new text may appear in
45  new JUpload version, and the existing translation are not maintained by the original translator, who may have no need
46  to upgrade to the last JUpload version. To make this easier, previous version contained a translation formatter which
47  generates comments like this one:
48 
49---------------------
50  #MISSING key = The English translation
51---------------------
52
53* Unicode formatting
54 
55  But then, communicating new translation is not easy: the need is to send to the project administrator new translation. Java
56  properties behavior implies that these translation are translated in 'native' text (that is: all non-ASCII characters are
57  transformed in \uNNNN strings, where NNNN is the unicode code for these characters). The result is hardly understandable,
58  and make it hard for translator to contribute to existing translation.
59 
60   
61* Translation code complexity
62
63  In previous version, the managing of the translation files was done in ant scripts. These scripts are complex to manage
64  and can hardly be modified by other people.
65 
66  The use of maven plugin make this code be in Java. It is then easier to understand, and fully covered by JUnit tests. 
67 
68  One consequence is that it's difficult to identify the lacking   
69
70 
71{C}. What does it do?
72 
73    The plugins follows these steps, to manage the translation files:
74   
75    * It reads all input files, from the input folder (default to: ./jupload-translation/src/lang folder)
76   
77    * The lang.properties is the default language, in the applet code. It is also the format template for the jupload-translation
78    plugin
79   
80    * All files from the input folder, are formatted according to the lang.properties file, and stored in UTF-8 (that is,
81    in human readable format) in the work folder (default to ./jupload-translation/target/translation).
82   
83    * Once all files are successfully translated:
84   
85      * The UTF-8 files are copied "as is" to the input folder. This folder is
86      the 'true' source for further translation improvement.
87     
88      * The UTF-8 are translated in ASCII containing unicode (\uNNNN strings) files, which are written into the resourcesLang
89      folder (default to ./jupload-translation/src/resources/lang), where the Java code expects them for use during
90      the applet execution.
91     
92      []
93
94    []
95   
96    __Note:__ this last step should not exist, with maven build. All generated code should be out of SVN. That is: these
97    generated files should be written directly beneath the target folder. This behavior is kept to maintain compatibility
98    with ant build. This also makes JUpload be a mono-module project, which make it easier to handle for most people.
Note: See TracBrowser for help on using the repository browser.