Author: jcouteau Date: 2010-11-22 10:48:08 +0100 (Mon, 22 Nov 2010) New Revision: 1825 Url: http://nuiton.org/repositories/revision/i18n/1825 Log: - Translate index page to english - Fix small spelling mistakes - Fix two old bundle names Modified: trunk/src/site/apt/index.apt trunk/src/site/apt/presentation.apt trunk/src/site/en/apt/index.apt trunk/src/site/en/apt/presentation.apt Modified: trunk/src/site/apt/index.apt =================================================================== --- trunk/src/site/apt/index.apt 2010-11-21 14:29:43 UTC (rev 1824) +++ trunk/src/site/apt/index.apt 2010-11-22 09:48:08 UTC (rev 1825) @@ -52,7 +52,7 @@ Quoi de nouveau dans la version 2.0 - Depuis la version 2.0, les bundles i18n générés (dans <src/main.resources/i18n>) + Depuis la version 2.0, les bundles i18n générés (dans <src/main/resources/i18n>) sont compatibles avec l'api java de <ResourceBundle>, à savoir qu'on a remplacé les <<->> par des <<_>>. @@ -62,7 +62,7 @@ malib-fr_FR.properties ----------------------------------------------------------------------------- - Et maintentant c'est : + Et maintenant c'est : ----------------------------------------------------------------------------- malib_fr_FR.properties Modified: trunk/src/site/apt/presentation.apt =================================================================== --- trunk/src/site/apt/presentation.apt 2010-11-21 14:29:43 UTC (rev 1824) +++ trunk/src/site/apt/presentation.apt 2010-11-22 09:48:08 UTC (rev 1825) @@ -35,7 +35,7 @@ Les chaînes à traduire doivent être rentrées dans un fichier de propriétés situé dans le classpath de votre application, dans un dossier i18n, et nommé - de la manière suivante : xxx-fr_FR.properties par exemple. + de la manière suivante : xxx_fr_FR.properties par exemple. A l'initialisation, la librairie recherche dans le classpath tous les fichiers de traduction correspondant à la langue définie (dans les dossiers i18n du Modified: trunk/src/site/en/apt/index.apt =================================================================== --- trunk/src/site/en/apt/index.apt 2010-11-21 14:29:43 UTC (rev 1824) +++ trunk/src/site/en/apt/index.apt 2010-11-22 09:48:08 UTC (rev 1825) @@ -45,10 +45,68 @@ Have a look to the tutorials to see how to enrich your application with Nuiton I18n. - The three Nuiton I18n project modules : + The two Nuiton I18n project modules : - {{{./nuiton-i18n/index.html}I18n Api}} - {{{./maven-i18n-plugin/index.html}I18n Maven Plugin}} - - {{{./ant-i18n-task/index.html}I18n Ant task}} +What is new in the 2.0 version + + Since 2.0 version, the generated i18n bundles (in <src/main/resources/i18n>) + are compatible with the <ResourceBundle> Java API, meaning that we replaced + all <<->> by <<_>>. + + Before we had + +----------------------------------------------------------------------------- +mylib-fr_FR.properties +----------------------------------------------------------------------------- + + And now it is : + +----------------------------------------------------------------------------- +mylib_fr_FR.properties +----------------------------------------------------------------------------- + + * Migration to 2.0 version + + To use the 2.0 version, you first need to rename in your project the bundles + with the new names (or they will be generated at first execution and you will + be good for a copy/paste party. And anyway, it is best to rename existing + files to keep the history in your version control system). + + For the <<bundle>> mode (bundle mojo), no modification is necessary and it + will be compatible with libraries package with older i18n versions (1.x). + + * Add a JSP parser + + A new JSP parserhas been introduced to integrate the i18n detection system in + web developmments (using Struts for example). + + Take a look to the tutorials to see how to enhance your application using + Nuiton I18n. + + * Improve XML parsers + + The xml type parsers (at the moment we had only <<parserValidation>>) have + seen their design improved. Some parameters have become common to all parsers. + See the goal detail page to see what changed. + + We introduced the new <<parserXml>> that contains no key detection rules, the + user have to specify them by himself; this new mojo can allow key detection + in xml files not managed by the project. + + * Suppression of the <<I18n ant tasks>> module + + This module is not maintained for a long time, so it has been unactivated in + the default build. but it is still in the project and can be activated in a + profile named <<ant-task-profile>>. + + So to build the I18n project with this module, you just have to launch : + +----------------------------------------------------------------------------- +mvn install -Pant-task-profile +----------------------------------------------------------------------------- + + Modified: trunk/src/site/en/apt/presentation.apt =================================================================== --- trunk/src/site/en/apt/presentation.apt 2010-11-21 14:29:43 UTC (rev 1824) +++ trunk/src/site/en/apt/presentation.apt 2010-11-22 09:48:08 UTC (rev 1825) @@ -34,7 +34,7 @@ language,... The string to translate have to be put in a properties file located in your - application's classpath, in a i18n file, and named as : xxx-fr_FR.properties + application's classpath, in a i18n file, and named as : xxx_fr_FR.properties for example. On initialisation, the library looks in the classpath for all the translation