r1822 - in trunk/maven-i18n-plugin/src/it/parsers: newProject newProject/src/main newProject/src/main/i18n newProject/src/main/webapp newProject/src/main/webapp/jsp withNewKeys withNewKeys/src/main withNewKeys/src/main/i18n withNewKeys/src/main/resources/i18n withNewKeys/src/main/webapp withNewKeys/src/main/webapp/jsp
Author: tchemit Date: 2010-11-21 11:04:23 +0100 (Sun, 21 Nov 2010) New Revision: 1822 Url: http://nuiton.org/repositories/revision/i18n/1822 Log: add jsp parser in it Added: trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/i18n/ trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/i18n/jsp.rules trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/webapp/ trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/webapp/jsp/ trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/webapp/jsp/MyJsp.jsp trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/MyJsp.jsp trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/i18n/ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/i18n/jsp.rules trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/webapp/ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/webapp/jsp/ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/webapp/jsp/MyJsp.jsp Modified: trunk/maven-i18n-plugin/src/it/parsers/newProject/pom.xml trunk/maven-i18n-plugin/src/it/parsers/newProject/verify.groovy trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/pom.xml trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/i18n/parsers-withNewKeys_fr_FR.properties trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/verify.groovy Modified: trunk/maven-i18n-plugin/src/it/parsers/newProject/pom.xml =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/newProject/pom.xml 2010-11-20 14:25:42 UTC (rev 1821) +++ trunk/maven-i18n-plugin/src/it/parsers/newProject/pom.xml 2010-11-21 10:04:23 UTC (rev 1822) @@ -43,19 +43,8 @@ <groupId>org.nuiton.i18n</groupId> <artifactId>parsers-newProject</artifactId> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> - <name>I18n Test :: parsers-new</name> - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> - - <packaging>jar</packaging> - - <dependencies> <dependency> @@ -83,7 +72,22 @@ <goals> <goal>parserJava</goal> <goal>parserValidation</goal> + </goals> + </execution> + <execution> + <id>jsp</id> + <goals> + <goal>parserJsp</goal> </goals> + <configuration> + <userRulesFiles> + <file>${basedir}/src/main/i18n/jsp.rules</file> + </userRulesFiles> + <namespaces> + <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s> + <jsp>http://java.sun.com/JSP/Page</jsp> + </namespaces> + </configuration> </execution> <execution> <!-- this execution is to test thread with no files --> Added: trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/i18n/jsp.rules =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/i18n/jsp.rules (rev 0) +++ trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/i18n/jsp.rules 2010-11-21 10:04:23 UTC (rev 1822) @@ -0,0 +1,3 @@ +# Règles i18n pour les jsp + +//s:text/@name \ No newline at end of file Added: trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/webapp/jsp/MyJsp.jsp =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/webapp/jsp/MyJsp.jsp (rev 0) +++ trunk/maven-i18n-plugin/src/it/parsers/newProject/src/main/webapp/jsp/MyJsp.jsp 2010-11-21 10:04:23 UTC (rev 1822) @@ -0,0 +1,12 @@ +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title><s:text name="jspGetter.key1"/></title> +</head> +<s:text name="jspGetter.key2"/> +<body> +</body> +</html> \ No newline at end of file Modified: trunk/maven-i18n-plugin/src/it/parsers/newProject/verify.groovy =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/newProject/verify.groovy 2010-11-20 14:25:42 UTC (rev 1821) +++ trunk/maven-i18n-plugin/src/it/parsers/newProject/verify.groovy 2010-11-21 10:04:23 UTC (rev 1822) @@ -37,4 +37,11 @@ assert content.contains( 'validationGetter.key1=' ); assert content.contains( 'validationGetter.key2=' ); +file = new File(basedir, 'target/generated-sources/i18n/jsp.getter'); +assert file.exists(); + +content = file.text; +assert content.contains( 'jspGetter.key1=' ); +assert content.contains( 'jspGetter.key2=' ); + return true; Modified: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/pom.xml =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/pom.xml 2010-11-20 14:25:42 UTC (rev 1821) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/pom.xml 2010-11-21 10:04:23 UTC (rev 1822) @@ -83,6 +83,26 @@ <goals> <goal>parserJava</goal> <goal>parserValidation</goal> + </goals> + </execution> + <execution> + <id>jsp</id> + <goals> + <goal>parserJsp</goal> + </goals> + <configuration> + <userRulesFiles> + <file>${basedir}/src/main/i18n/jsp.rules</file> + </userRulesFiles> + <namespaces> + <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s> + <jsp>http://java.sun.com/JSP/Page</jsp> + </namespaces> + </configuration> + </execution> + <execution> + <id>first-gen</id> + <goals> <goal>gen</goal> </goals> </execution> Added: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/MyJsp.jsp =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/MyJsp.jsp (rev 0) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/MyJsp.jsp 2010-11-21 10:04:23 UTC (rev 1822) @@ -0,0 +1,12 @@ +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title><s:text name="jspGetter.key1"/></title> +</head> +<s:text name="jspGetter.key2"/> +<body> +</body> +</html> \ No newline at end of file Added: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/i18n/jsp.rules =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/i18n/jsp.rules (rev 0) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/i18n/jsp.rules 2010-11-21 10:04:23 UTC (rev 1822) @@ -0,0 +1,3 @@ +# Règles i18n pour les jsp + +//s:text/@name \ No newline at end of file Modified: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/i18n/parsers-withNewKeys_fr_FR.properties =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/i18n/parsers-withNewKeys_fr_FR.properties 2010-11-20 14:25:42 UTC (rev 1821) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/resources/i18n/parsers-withNewKeys_fr_FR.properties 2010-11-21 10:04:23 UTC (rev 1822) @@ -1,26 +1,3 @@ -### -# #%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% -### javaGetter.old.key1=hum1 javaGetter.old.key2=hum2 +jspGetter.key1=humJsp1 Added: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/webapp/jsp/MyJsp.jsp =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/webapp/jsp/MyJsp.jsp (rev 0) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/src/main/webapp/jsp/MyJsp.jsp 2010-11-21 10:04:23 UTC (rev 1822) @@ -0,0 +1,12 @@ +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title><s:text name="jspGetter.key1"/></title> +</head> +<s:text name="jspGetter.key2"/> +<body> +</body> +</html> \ No newline at end of file Modified: trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/verify.groovy =================================================================== --- trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/verify.groovy 2010-11-20 14:25:42 UTC (rev 1821) +++ trunk/maven-i18n-plugin/src/it/parsers/withNewKeys/verify.groovy 2010-11-21 10:04:23 UTC (rev 1822) @@ -40,6 +40,13 @@ assert content.contains( 'validationGetter.key2=' ); assert content.contains( 'validationGetter.key3=' ); +file = new File(basedir, 'target/generated-sources/i18n/jsp.getter'); +assert file.exists(); + +content = file.text; +assert content.contains( 'jspGetter.key1=' ); +assert content.contains( 'jspGetter.key2=' ); + file = new File(basedir, 'src/main/resources/i18n/parsers-withNewKeys_fr_FR.properties'); assert file.exists(); @@ -51,5 +58,7 @@ assert content.contains( 'validationGetter.key1=' ); assert content.contains( 'validationGetter.key2=' ); assert content.contains( 'validationGetter.key3=' ); +assert content.contains( 'jspGetter.key1=' ); +assert content.contains( 'jspGetter.key2=' ); return true;
participants (1)
-
tchemit@users.nuiton.org