annotated tag v2.3 created (now 4ea6851)
This is an automated email from the git hooks/post-receive script. New change to annotated tag v2.3 in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git at 4ea6851 (tag) tagging 9cdb5eec2164d1e4f1ec29060a5e63ded6daf493 (commit) replaces i18n-2.2 tagged by Tony Chemit on Mon Jan 31 13:09:57 2011 +0000 - Log ----------------------------------------------------------------- fix scm + doc ----------------------------------------------------------------------- This annotated tag includes the following new commits: new 833e0d7 [maven-release-plugin] copy for tag i18n-2.2 new 4ac5882 preapre tag for release 2.3 new 8e70f2b Evolution #1275: Improve parserJava performance Improve it ano-672 new 393e98e Update documentation [maven-release-plugin] prepare release i18n-2.3 new 9cdb5ee fix scm + doc The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 9cdb5eec2164d1e4f1ec29060a5e63ded6daf493 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 13:09:57 2011 +0000 fix scm + doc commit 393e98e5fb987f74a1a0d6274ece1847f6527299 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 13:07:02 2011 +0000 Update documentation [maven-release-plugin] prepare release i18n-2.3 commit 8e70f2b587a9883776304631e6c8aae468c84201 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 12:49:25 2011 +0000 Evolution #1275: Improve parserJava performance Improve it ano-672 commit 4ac58825acef8a1fa5ae93bf020a4fc6a26f4ce9 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 12:29:28 2011 +0000 preapre tag for release 2.3 commit 833e0d76f8ceeb23adcc86cab949fae67536101b Author: Tony Chemit <chemit@codelutin.com> Date: Tue Jan 25 14:04:08 2011 +0000 [maven-release-plugin] copy for tag i18n-2.2 -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to annotated tag v2.3 in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git commit 4ac58825acef8a1fa5ae93bf020a4fc6a26f4ce9 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 12:29:28 2011 +0000 preapre tag for release 2.3 -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to annotated tag v2.3 in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git commit 8e70f2b587a9883776304631e6c8aae468c84201 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 12:49:25 2011 +0000 Evolution #1275: Improve parserJava performance Improve it ano-672 --- ant-i18n-task/pom.xml | 2 +- maven-i18n-plugin/pom.xml | 7 +- maven-i18n-plugin/src/it/ano-672/pom.xml | 6 +- .../src/main/java/org/nuiton/i18n/test/MyBean.java | 35 ----- .../main/resources/i18n/ano-672_en_GB.properties | 2 +- .../main/resources/i18n/ano-672_fr_FR.properties | 2 +- .../src/test/java/org/nuiton/i18n/I18nTest.java | 51 +++++-- .../i18n/plugin/parser/impl/ParserJavaMojo.java | 163 +++------------------ .../plugin/parser/impl/JavaFileParserTest.java | 151 +++++++++++++++++++ nuiton-i18n/pom.xml | 2 +- pom.xml | 2 +- 11 files changed, 224 insertions(+), 199 deletions(-) diff --git a/ant-i18n-task/pom.xml b/ant-i18n-task/pom.xml index 0b212e1..9bfefd9 100644 --- a/ant-i18n-task/pom.xml +++ b/ant-i18n-task/pom.xml @@ -34,7 +34,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>i18n</artifactId> - <version>2.2</version> + <version>2.3-SNAPSHOT</version> </parent> <groupId>org.nuiton.i18n</groupId> diff --git a/maven-i18n-plugin/pom.xml b/maven-i18n-plugin/pom.xml index 4daa919..b6767c5 100644 --- a/maven-i18n-plugin/pom.xml +++ b/maven-i18n-plugin/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>i18n</artifactId> - <version>2.2</version> + <version>2.3-SNAPSHOT</version> </parent> <groupId>org.nuiton.i18n</groupId> @@ -106,6 +106,11 @@ <scope>runtime</scope> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + </dependencies> <!-- ************************************************************* --> diff --git a/maven-i18n-plugin/src/it/ano-672/pom.xml b/maven-i18n-plugin/src/it/ano-672/pom.xml index e7b4d81..ffde2ad 100644 --- a/maven-i18n-plugin/src/it/ano-672/pom.xml +++ b/maven-i18n-plugin/src/it/ano-672/pom.xml @@ -58,7 +58,6 @@ <i18n.bundles>fr_FR,en_GB</i18n.bundles> </properties> - <dependencies> <dependency> @@ -66,7 +65,7 @@ <artifactId>nuiton-i18n</artifactId> <version>@pom.version@</version> </dependency> - + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> @@ -95,11 +94,10 @@ <executions> <execution> <goals> - <goal>parserJava</goal> <goal>gen</goal> <goal>bundle</goal> </goals> - </execution> + </execution> </executions> </plugin> </plugins> diff --git a/maven-i18n-plugin/src/it/ano-672/src/main/java/org/nuiton/i18n/test/MyBean.java b/maven-i18n-plugin/src/it/ano-672/src/main/java/org/nuiton/i18n/test/MyBean.java deleted file mode 100644 index e87cbdb..0000000 --- a/maven-i18n-plugin/src/it/ano-672/src/main/java/org/nuiton/i18n/test/MyBean.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * #%L - * I18n :: Maven Plugin - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2007 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ -package org.nuiton.i18n.test; - -import static org.nuiton.i18n.I18n._; -import static org.nuiton.i18n.I18n.n_; - -public class MyBean { - - protected String field1 = n_("javaGetter.key1"); - - protected String field2 = _("javaGetter.key2"); -} diff --git a/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_en_GB.properties b/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_en_GB.properties index 7659f42..276e656 100644 --- a/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_en_GB.properties +++ b/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_en_GB.properties @@ -1 +1 @@ -javaGetter.key1=Hello \ No newline at end of file +say.hello=Hello \ No newline at end of file diff --git a/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_fr_FR.properties b/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_fr_FR.properties index 26280a4..a452a57 100644 --- a/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_fr_FR.properties +++ b/maven-i18n-plugin/src/it/ano-672/src/main/resources/i18n/ano-672_fr_FR.properties @@ -1 +1 @@ -javaGetter.key1=Salut \ No newline at end of file +say.hello=Salut \ No newline at end of file diff --git a/maven-i18n-plugin/src/it/ano-672/src/test/java/org/nuiton/i18n/I18nTest.java b/maven-i18n-plugin/src/it/ano-672/src/test/java/org/nuiton/i18n/I18nTest.java index 45ab870..9b0c1b0 100644 --- a/maven-i18n-plugin/src/it/ano-672/src/test/java/org/nuiton/i18n/I18nTest.java +++ b/maven-i18n-plugin/src/it/ano-672/src/test/java/org/nuiton/i18n/I18nTest.java @@ -1,7 +1,7 @@ /* * #%L * I18n :: Maven Plugin - * + * * * $Id$ * $HeadURL$ * %% @@ -24,7 +24,9 @@ */ package org.nuiton.i18n; +import org.junit.After; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.nuiton.i18n.init.DefaultI18nInitializer; @@ -32,20 +34,51 @@ import java.util.Locale; public class I18nTest { + public static final String I18n_KEY = "say.hello"; + + public static final String FRENCH_HELLO = "Salut"; + + public static final String ENGLISH_HELLO = "Hello"; + + @Before + public void setup() { + I18n.init(new DefaultI18nInitializer("ano-672-i18n"), null); + } + + @After + public void after() { + I18n.close(); + } + @Test - public void testI18n() { + public void _() { + + String expected, actual; - I18n.setInitializer(new DefaultI18nInitializer("ano-672-i18n")); - I18n.init(Locale.FRANCE); + I18n.setDefaultLocale(Locale.FRANCE); - String expected = "Salut"; - String actual = I18n._("javaGetter.key1"); + expected = FRENCH_HELLO; + actual = I18n._(I18n_KEY); Assert.assertEquals(expected, actual); - I18n.init(Locale.ENGLISH); + I18n.setDefaultLocale(Locale.ENGLISH); + + expected = ENGLISH_HELLO; + actual = I18n._(I18n_KEY); + Assert.assertEquals(expected, actual); + } + + @Test + public void l_() { + + String expected, actual; + + expected = FRENCH_HELLO; + actual = I18n.l_(Locale.FRANCE, I18n_KEY); + Assert.assertEquals(expected, actual); - expected = "Hello"; - actual = I18n._("javaGetter.key1"); + expected = ENGLISH_HELLO; + actual = I18n.l_(Locale.UK, I18n_KEY); Assert.assertEquals(expected, actual); } diff --git a/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java b/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java index c062cb4..618dfef 100755 --- a/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java +++ b/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJavaMojo.java @@ -35,7 +35,6 @@ import org.nuiton.i18n.plugin.parser.SourceEntry; import org.nuiton.io.FileUpdater; import org.nuiton.io.FileUpdaterHelper; import org.nuiton.io.SortedProperties; -import org.nuiton.processor.filters.DefaultFilter; import java.io.File; import java.io.FileInputStream; @@ -130,14 +129,23 @@ public class ParserJavaMojo extends AbstractI18nParserMojo { protected static class JavaFileParser extends AbstractFileParser { - protected final I18nFilter filter; + /** + * Pattern used to detect i18n keys. + * + * @since 2.3 + */ + protected final Pattern i18nPattern = + Pattern.compile("(?:^_\\(\\s*\\\"|[^l]_\\(\\s*\\\"|l_\\([^,]+\\s*,\\s*\\\")(.*?)\""); public JavaFileParser(Log log, String encoding, SortedProperties oldParser, boolean showTouchedFiles) { super(log, encoding, oldParser, showTouchedFiles); - filter = new I18nFilter(log); + } + + public Pattern getI18nPattern() { + return i18nPattern; } @Override @@ -164,155 +172,20 @@ public class ParserJavaMojo extends AbstractI18nParserMojo { @Override public void parseLine(File file, String line) throws IOException { - String keysSet = filter.parse(line); + Matcher matcher = i18nPattern.matcher(line); - if (keysSet.equals(I18nFilter.EMPTY_STRING)) { - // no key detected on this line - return; - } + while (matcher.find()) { - // one key found in file, so file is marked as touched - setTouched(true); - // Found a set of i18n Strings, split it. - String[] keys = keysSet.split("="); - for (String key : keys) { + String key = matcher.group(1); if (getLog().isDebugEnabled()) { getLog().debug(file.getName() + " detected key = " + key); } - registerKey(key); - } - } - } - - /** - * Pour filtrer les clefs i18n dans un fichier java. - * - * @since 2.1 - */ - public static class I18nFilter extends DefaultFilter { - - /** Instance logger */ - private final Log log; - - // private String header = "_\\(\\s*\""; - private String header = "^_\\(\\s*\\\"|[^l]_\\(\\s*\\\"|l_\\([^,]+\\s*,\\s*\\\""; - - private String footer = "\"\\s*(\\)|,|\\+|$)"; - - private Pattern headerPattern = Pattern.compile(getHeader()); + // one key found in file, so file is marked as touched + setTouched(true); - private Pattern footerPattern = Pattern.compile(getFooter()); - - private Matcher matcher; - - public I18nFilter(Log log) { - this.log = log; - } - - protected void setFooter(String footer) { - this.footer = footer; - } - - protected void setHeader(String header) { - this.header = header; - } - - @Override - protected String getHeader() { - return header; - } - - @Override - protected String getFooter() { - return footer; - } - - @Override - public int getMatchIndexFor(String input, String sequence) { - int index = NOT_FOUND; - - setMatcher(null); - if (sequence.equals(getHeader())) { - setMatcher(getHeaderPattern().matcher(input)); - } else if (sequence.equals(getFooter())) { - setMatcher(getFooterPattern().matcher(input)); - } - if (getMatcher() != null) { - try { - getMatcher().find(); - index = getMatcher().start(); - } catch (RuntimeException e) { - if (log.isDebugEnabled()) { - log.debug("Could not match with " + getMatcher() + " input " + input); - } - } - } - - return index; - } - - @Override - public int getMatchLengthFor(String sequence) { - int length = NOT_FOUND; - - try { - length = getMatcher().end() - getMatcher().start(); - } catch (RuntimeException e) { - if (log.isDebugEnabled()) { - log.debug("Could not match with " + getMatcher() + " input " + sequence); - } + // register key + registerKey(key); } - - return length; - } - - /** - * methode appele lorsqu'on a la chaine entiere entre le header et le - * footer. - * - * @param ch la chaine trouve - * @return ce qu'il faut ecrire dans le fichier de sortie - */ - @Override - protected String performInFilter(String ch) { - return ch.replaceAll("\"\\s*\\+\\s*\"", "") + "="; - } - - @Override - public String performHeaderFooterFilter(String ch) { - return ch.substring(ch.indexOf('"') + 1, ch.lastIndexOf('"')); - } - - /** - * methode appele lorsqu'on a la chaine entiere a l'exterieur du - * header/footer - * - * @param ch la chaine trouve - * @return ce qu'il faut ecrire dans le fichier de sortie - */ - @Override - protected String performOutFilter(String ch) { - return EMPTY_STRING; - } - - /** @return Returns the footerPattern. */ - protected Pattern getFooterPattern() { - return footerPattern; - } - - /** @return Returns the headerPattern. */ - protected Pattern getHeaderPattern() { - return headerPattern; - } - - /** @return Returns the matcher. */ - protected Matcher getMatcher() { - return matcher; - } - - /** @param matcher The matcher to set. */ - protected void setMatcher(Matcher matcher) { - this.matcher = matcher; } } } diff --git a/maven-i18n-plugin/src/test/java/org/nuiton/i18n/plugin/parser/impl/JavaFileParserTest.java b/maven-i18n-plugin/src/test/java/org/nuiton/i18n/plugin/parser/impl/JavaFileParserTest.java new file mode 100644 index 0000000..9f4d77a --- /dev/null +++ b/maven-i18n-plugin/src/test/java/org/nuiton/i18n/plugin/parser/impl/JavaFileParserTest.java @@ -0,0 +1,151 @@ +/* + * #%L + * I18n :: Maven Plugin + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2007 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.i18n.plugin.parser.impl; + +import org.apache.maven.plugin.logging.SystemStreamLog; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.nuiton.io.SortedProperties; + +import java.io.File; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * Tests the class {@link ParserJavaMojo.JavaFileParser} + * + * @author tchemit <chemit@codelutin.com> + * @since 2.3 + */ +public class JavaFileParserTest { + + public static final String ENCODING = "utf-8"; + + protected static final SystemStreamLog log = new SystemStreamLog(); + + protected ParserJavaMojo.JavaFileParser parser; + + protected SortedProperties oldParser; + + protected Set<String> detectedKeys; + + @Before + public void setUp() throws Exception { + oldParser = new SortedProperties(ENCODING); + + + parser = new ParserJavaMojo.JavaFileParser( + log, + ENCODING, + oldParser, + false) { + @Override + protected void registerKey(String key) { + detectedKeys.add(key); + } + }; + detectedKeys = new HashSet<String>(); + } + + @After + public void tearDown() throws Exception { + detectedKeys.clear(); + detectedKeys = null; + parser = null; + } + + @Test + public void getKeys() throws IOException { + + File file = new File("getKeys"); + String line; + + line = "_(\"myKey\");"; + parseLine(file, line, "myKey"); + + line = "_(\"MyKey\" "; + parseLine(file, line, "MyKey"); + + line = " blabla _(\"myKey2\");"; + parseLine(file, line, "myKey2"); + + line = " blabla \n somewhere else..." + + "_(\"myKey3\");"; + parseLine(file, line, "myKey3"); + } + + @Test + public void getKeys2() throws IOException { + + String line; + File file = new File("getKeys2"); + + line = "n_(\"myKey\");"; + parseLine(file, line, "myKey"); + + line = "n_(\"MyKey\" "; + parseLine(file, line, "MyKey"); + + line = " blabla n_(\"myKey2\");"; + parseLine(file, line, "myKey2"); + + line = " blabla \n somewhere else..." + + "n_(\"myKey3\");"; + parseLine(file, line, "myKey3"); + } + + @Test + public void getKeys3() throws IOException { + + String line; + File file = new File("getKeys3"); + + line = "l_(Locale.UK, \"myKey\");"; + parseLine(file, line, "myKey"); + + line = "l_( Locale.UK , \"MyKey\""; + parseLine(file, line, "MyKey"); + + line = " blabla l_(Locale.UK, \"myKey2\");"; + parseLine(file, line, "myKey2"); + + line = " blabla \n somewhere else..." + + "l_(Locale.UK, \"myKey3\");"; + parseLine(file, line, "myKey3"); + } + + protected void parseLine(File f, String line, String... expectedKeys) throws IOException { + parser.parseLine(f, line); + for (String expectedKey : expectedKeys) { + + Assert.assertTrue("Key " + expectedKey + + " was expected from line " + line, + detectedKeys.contains(expectedKey)); + } + } +} diff --git a/nuiton-i18n/pom.xml b/nuiton-i18n/pom.xml index e6bc8d1..8c13c17 100644 --- a/nuiton-i18n/pom.xml +++ b/nuiton-i18n/pom.xml @@ -34,7 +34,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>i18n</artifactId> - <version>2.2</version> + <version>2.3-SNAPSHOT</version> </parent> <groupId>org.nuiton.i18n</groupId> diff --git a/pom.xml b/pom.xml index e5a5c7e..eedbd5f 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ </parent> <artifactId>i18n</artifactId> - <version>2.2</version> + <version>2.3-SNAPSHOT</version> <modules> <module>nuiton-i18n</module> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to annotated tag v2.3 in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git commit 393e98e5fb987f74a1a0d6274ece1847f6527299 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 13:07:02 2011 +0000 Update documentation [maven-release-plugin] prepare release i18n-2.3 --- ant-i18n-task/pom.xml | 2 +- maven-i18n-plugin/pom.xml | 2 +- nuiton-i18n/pom.xml | 2 +- pom.xml | 4 ++-- src/site/apt/index.apt | 31 +++++++++++++++++++++++++++---- src/site/en/apt/index.apt | 29 ++++++++++++++++++++++++++--- 6 files changed, 58 insertions(+), 12 deletions(-) diff --git a/ant-i18n-task/pom.xml b/ant-i18n-task/pom.xml index 9bfefd9..e62440e 100644 --- a/ant-i18n-task/pom.xml +++ b/ant-i18n-task/pom.xml @@ -34,7 +34,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>i18n</artifactId> - <version>2.3-SNAPSHOT</version> + <version>2.3</version> </parent> <groupId>org.nuiton.i18n</groupId> diff --git a/maven-i18n-plugin/pom.xml b/maven-i18n-plugin/pom.xml index b6767c5..15f6bea 100644 --- a/maven-i18n-plugin/pom.xml +++ b/maven-i18n-plugin/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>i18n</artifactId> - <version>2.3-SNAPSHOT</version> + <version>2.3</version> </parent> <groupId>org.nuiton.i18n</groupId> diff --git a/nuiton-i18n/pom.xml b/nuiton-i18n/pom.xml index 8c13c17..4d30f22 100644 --- a/nuiton-i18n/pom.xml +++ b/nuiton-i18n/pom.xml @@ -34,7 +34,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>i18n</artifactId> - <version>2.3-SNAPSHOT</version> + <version>2.3</version> </parent> <groupId>org.nuiton.i18n</groupId> diff --git a/pom.xml b/pom.xml index eedbd5f..7612617 100644 --- a/pom.xml +++ b/pom.xml @@ -33,11 +33,11 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>mavenpom4redmineAndCentral</artifactId> - <version>2.4.2</version> + <version>2.4.3</version> </parent> <artifactId>i18n</artifactId> - <version>2.3-SNAPSHOT</version> + <version>2.3</version> <modules> <module>nuiton-i18n</module> diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt index 2669397..a83334e 100644 --- a/src/site/apt/index.apt +++ b/src/site/apt/index.apt @@ -51,6 +51,32 @@ System.out.println(I18n._("This text will be translated")); - {{{./ant-i18n-task/index.html}I18n Ant task}} (ce module a été désactivé depuis la version 2.0) +Quoi de neuf dans la version 2.3 + + La version 2.3 améliore de façon considérable les temps de détection des clefs + i18n pour les fichiers java (mojo <<parserJava>>). + + Voir {{{http://nuiton.org/issues/show/1275}Evolution #1275: Improve parserJava performance}}. + + On passe à des temps très raisonnable (en de dessous de 5 millisecondes par + fichier!) montré ci-dessous : + +-------------------------------------------------------------------------------- +mvn package -Pnotests -Di18n.strictMode -DnuitonI18nVersion=2.2 + +[INFO] --- maven-i18n-plugin:2.2:parserJava (default) @ observe-business --- +[INFO] Parsing is done. [treated file(s) : 76/187](total time:19.852s) ( ~ 106.158ms / file) +[INFO] --- maven-i18n-plugin:2.2:parserJava (scan-sources) @ observe-swing --- +[INFO] Parsing is done. [treated file(s) : 151/206](total time:38.732s) ( ~ 188.021ms / file) + +mvn package -Pnotests -Di18n.strictMode -DnuitonI18nVersion=2.3-SNAPSHOT + +[INFO] --- maven-i18n-plugin:2.3-SNAPSHOT:parserJava (default) @ observe-business --- +[INFO] Parsing is done. [treated file(s) : 76/187](total time:640.602ms) ( ~ 3.426ms / file) +[INFO] --- maven-i18n-plugin:2.3-SNAPSHOT:parserJava (scan-sources) @ observe-swing --- +[INFO] Parsing is done. [treated file(s) : 151/206](total time:450.823ms) ( ~ 2.188ms / file) +-------------------------------------------------------------------------------- + Quoi de neuf dans la version 2.2 La version 2.2 supprimer juste des deux méthodes dépréciées en <2.1> : @@ -159,8 +185,5 @@ malib_fr_FR.properties Donc pour construire le projet I18n avec ce module il suffit de lancer : ----------------------------------------------------------------------------- -mvn install -Pant-task-profile +mvn install -Pextra-modules ----------------------------------------------------------------------------- - - - diff --git a/src/site/en/apt/index.apt b/src/site/en/apt/index.apt index 98b77ce..a3e89c4 100644 --- a/src/site/en/apt/index.apt +++ b/src/site/en/apt/index.apt @@ -51,6 +51,31 @@ System.out.println(I18n._("This text will be translated")); - {{{./maven-i18n-plugin/index.html}I18n Maven Plugin}} +What's new in 2.3 version + + Version 2.3 improves a lot performance on dectection of java file i18n keys + (mojo <<parserJava>>). + + Voir {{{http://nuiton.org/issues/show/1275}Evolution #1275: Improve parserJava performance}}. + + We are now having some nice times (under 5 millisecondes for a file!) as + shown below : + +-------------------------------------------------------------------------------- +mvn package -Pnotests -Di18n.strictMode -DnuitonI18nVersion=2.2 + +[INFO] --- maven-i18n-plugin:2.2:parserJava (default) @ observe-business --- +[INFO] Parsing is done. [treated file(s) : 76/187](total time:19.852s) ( ~ 106.158ms / file) +[INFO] --- maven-i18n-plugin:2.2:parserJava (scan-sources) @ observe-swing --- +[INFO] Parsing is done. [treated file(s) : 151/206](total time:38.732s) ( ~ 188.021ms / file) + +mvn package -Pnotests -Di18n.strictMode -DnuitonI18nVersion=2.3-SNAPSHOT + +[INFO] --- maven-i18n-plugin:2.3-SNAPSHOT:parserJava (default) @ observe-business --- +[INFO] Parsing is done. [treated file(s) : 76/187](total time:640.602ms) ( ~ 3.426ms / file) +[INFO] --- maven-i18n-plugin:2.3-SNAPSHOT:parserJava (scan-sources) @ observe-swing --- +[INFO] Parsing is done. [treated file(s) : 151/206](total time:450.823ms) ( ~ 2.188ms / file) +-------------------------------------------------------------------------------- What's new in 2.2 version @@ -158,7 +183,5 @@ mylib_fr_FR.properties So to build the I18n project with this module, you just have to launch : ----------------------------------------------------------------------------- -mvn install -Pant-task-profile +mvn install -Pextra-modules ----------------------------------------------------------------------------- - - -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to annotated tag v2.3 in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git commit 9cdb5eec2164d1e4f1ec29060a5e63ded6daf493 Author: Tony Chemit <chemit@codelutin.com> Date: Mon Jan 31 13:09:57 2011 +0000 fix scm + doc --- pom.xml | 6 +++--- src/site/apt/index.apt | 4 ++-- src/site/en/apt/index.apt | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 7612617..d08c1b3 100644 --- a/pom.xml +++ b/pom.xml @@ -200,11 +200,11 @@ <!-- Source control management. --> <scm> - <connection>scm:svn:http://svn.nuiton.org/svn/i18n/tags/i18n-2.2</connection> + <connection>scm:svn:http://svn.nuiton.org/svn/i18n/tags/i18n-2.3</connection> <developerConnection> - scm:svn:http://svn.nuiton.org/svn/i18n/tags/i18n-2.2 + scm:svn:http://svn.nuiton.org/svn/i18n/tags/i18n-2.3 </developerConnection> - <url>http://www.nuiton.org/repositories/browse/i18n/tags/i18n-2.2</url> + <url>http://www.nuiton.org/repositories/browse/i18n/tags/i18n-2.3</url> </scm> <profiles> diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt index a83334e..150c5e1 100644 --- a/src/site/apt/index.apt +++ b/src/site/apt/index.apt @@ -58,8 +58,8 @@ Quoi de neuf dans la version 2.3 Voir {{{http://nuiton.org/issues/show/1275}Evolution #1275: Improve parserJava performance}}. - On passe à des temps très raisonnable (en de dessous de 5 millisecondes par - fichier!) montré ci-dessous : + On passe à des temps très raisonnable (en dessous de 5 millisecondes par + fichier!) comme montré ci-dessous : -------------------------------------------------------------------------------- mvn package -Pnotests -Di18n.strictMode -DnuitonI18nVersion=2.2 diff --git a/src/site/en/apt/index.apt b/src/site/en/apt/index.apt index a3e89c4..393d335 100644 --- a/src/site/en/apt/index.apt +++ b/src/site/en/apt/index.apt @@ -53,10 +53,10 @@ System.out.println(I18n._("This text will be translated")); What's new in 2.3 version - Version 2.3 improves a lot performance on dectection of java file i18n keys + Version 2.3 improves a lot performance on detection of java file i18n keys (mojo <<parserJava>>). - Voir {{{http://nuiton.org/issues/show/1275}Evolution #1275: Improve parserJava performance}}. + See {{{http://nuiton.org/issues/show/1275}Evolution #1275: Improve parserJava performance}}. We are now having some nice times (under 5 millisecondes for a file!) as shown below : -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm