You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ah...@apache.org on 2005/09/04 00:47:06 UTC

svn commit: r267511 - in /maven/maven-1/plugins/trunk/xdoc: plugin.jelly plugin.properties src/plugin-resources/site.jsl src/plugin-test/test03/xdocs/navigation.xml xdocs/changes.xml xdocs/properties.xml

Author: aheritier
Date: Sat Sep  3 15:46:57 2005
New Revision: 267511

URL: http://svn.apache.org/viewcvs?rev=267511&view=rev
Log:
MPXDOC-150 : maven.xdoc.date.format does not seem to have any effect.
Patch submitted by : Ignacio G. Mac Dowell
Patch reviewed by : Arnaud Heritier

Modified:
    maven/maven-1/plugins/trunk/xdoc/plugin.jelly
    maven/maven-1/plugins/trunk/xdoc/plugin.properties
    maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
    maven/maven-1/plugins/trunk/xdoc/src/plugin-test/test03/xdocs/navigation.xml
    maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
    maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/xdoc/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/plugin.jelly?rev=267511&r1=267510&r2=267511&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/xdoc/plugin.jelly Sat Sep  3 15:46:57 2005
@@ -973,14 +973,8 @@
     <tstamp>
       <format property="mavenCurrentYear" pattern="yyyy"/>
     </tstamp>
-    
-    <!-- Set the current time in a locale-sensitive manner (pattern/locale) -->
-    <tstamp>
-      <format property="build.date" pattern="${maven.xdoc.date.format}"
-        locale="${maven.xdoc.date.locale}"/>
-    </tstamp>
 
-    <!-- Set the current time to display the date in the current locale -->
+    <!-- Instantiate one date object for all locales and pages -->
     <j:useBean var="now" class="java.util.Date"/>
   </goal>
 

Modified: maven/maven-1/plugins/trunk/xdoc/plugin.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/plugin.properties?rev=267511&r1=267510&r2=267511&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/xdoc/plugin.properties Sat Sep  3 15:46:57 2005
@@ -86,7 +86,7 @@
 maven.xdoc.date= 
 maven.xdoc.date.format=dd MMMM yyyy
 # The date locale
-maven.xdoc.date.locale=en
+maven.xdoc.date.locale=${maven.xdoc.locale.default}
 
 # The default locale (if null, it is the default locale for this instance of the Java Virtual Machine)
 # By default it is en to ensure backward compatible

Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl?rev=267511&r1=267510&r2=267511&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl Sat Sep  3 15:46:57 2005
@@ -43,14 +43,24 @@
     <j:setProperties object="${navbean}" document="${doc}" location="${location}"/>
     <x:set var="templateContext" select="." />
 
-    <!-- Format the build date depending the current locale if no pattern is defined -->
-    <j:if test="${currentLocale.equals(defaultLocale)}">
-      <j:if test="${now == null}">
-        <j:useBean var="now" class="java.util.Date"/>
-      </j:if>
-      <fmt:formatDate value="${now}" type="both" dateStyle="long" timeStyle="long" var="build.date"/>
+    <!-- Sets the current locale -->
+    <fmt:setLocale trim="true" value="${currentLocale}"/>
+
+    <j:if test="${now == null}">
+      <j:useBean var="now" class="java.util.Date"/>
     </j:if>
-      
+
+    <!-- Format the build date depending the current locale and pattern depending if there is a pattern -->
+    <j:set var="myDateFormat" value="${maven.xdoc.date.format}"/>
+    <j:choose>
+      <j:when test="${!empty(myDateFormat)}">
+        <fmt:formatDate value="${now}" type="both" var="build.date" pattern="${maven.xdoc.date.format}"/>
+      </j:when>
+      <j:otherwise>
+        <fmt:formatDate value="${now}" type="both" dateStyle="long" timeStyle="long" var="build.date"/>
+      </j:otherwise>
+    </j:choose>
+
     <html>
       <head>
         <j:set var="docTitle"><x:expr select="./properties/title"/></j:set>

Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-test/test03/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-test/test03/xdocs/navigation.xml?rev=267511&r1=267510&r2=267511&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-test/test03/xdocs/navigation.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-test/test03/xdocs/navigation.xml Sat Sep  3 15:46:57 2005
@@ -16,33 +16,24 @@
  * limitations under the License.
  */
  -->
-
-<project name="MPXDOC-128"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:noNamespaceSchemaLocation="MAVEN_HOME/maven-navigation-1.0.xsd">
-
-    <title key="navigation.title"/>
-
-    <body>
+<project name="MPXDOC-128">
+  <title key="navigation.title"/>
+  <body>
     <breadcrumbs>
       <item name="Maven" href="http://maven.apache.org"/>
       <item name="Maven Plugins" href="http://maven.apache.org/reference/plugins/index.html"/>
     </breadcrumbs>
-        <links>
-<!--
+    <links>
+      <!--
             <item name="PDF Documentation" href="app.pdf"
                 img="images/pdf.gif"/>
 -->
-        </links>
-
-        <!-- project overview -->
-        <menu key="navigation.menu1.title">
-            <item key="navigation.menu1.item1"
-                href="/myfile_i18n.html" />
-            <item key="navigation.menu1.item2" 
-                href="/subdir/testjsltosite.html" />
-            <item key="navigation.menu1.item3" 
-                href="/subdir/subdir2/testjsltosite2.html" />
-        </menu>
-    </body>
+    </links>
+    <!-- project overview -->
+    <menu key="navigation.menu1.title">
+      <item key="navigation.menu1.item1" href="/myfile_i18n.html"/>
+      <item key="navigation.menu1.item2" href="/subdir/testjsltosite.html"/>
+      <item key="navigation.menu1.item3" href="/subdir/subdir2/testjsltosite2.html"/>
+    </menu>
+  </body>
 </project>

Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml?rev=267511&r1=267510&r2=267511&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml Sat Sep  3 15:46:57 2005
@@ -28,13 +28,14 @@
     <release version="1.9.2-SNAPSHOT" date="In SVN">
       <action dev="aheritier" type="fix" issue="MPXDOC-154" due-to="Juan F. Codagnone,Vincent Siveton,Lukas Theussl">System locale setting makes test cases fail.</action>
       <action dev="vsiveton" type="fix" issue="MPXDOC-152" due-to="Arnaud Heritier">cvs-usage link not shown in project-info page</action>
-      <action dev="aheritier" type="fix">i18n : html code removed from bundles.</action>
-      <action dev="aheritier" type="fix">i18n : doc title wasn't printed in breadcrumbs.</action>
       <action dev="aheritier" type="fix" issue="MPXDOC-151">i18n : menu tag in xdoc does not work with "key" translated text id.</action>
+      <action dev="aheritier" type="fix" issue="MPXDOC-150" due-to="Ignacio G. Mac Dowell">maven.xdoc.date.format does not seem to have any effect.</action>
       <action dev="aheritier" type="fix" issue="MPXDOC-149" due-to="Lukas Theussl">&lt;DT&gt; is appearing same way as subsection. Fix layout for the FAQ plugin.</action>
       <action dev="vsiveton" type="fix" issue="MPXDOC-148" due-to="Incze Lajos">Fixed bundles expression.</action>
       <action dev="aheritier" type="fix" issue="MPXDOC-147">Missing "Project Reports" header in the generated menu.</action>
       <action dev="aheritier" type="add" issue="MPXDOC-131" due-to="Ignacio G. Mac Dowell">Allow i18n links.</action>
+      <action dev="aheritier" type="fix">i18n : html code removed from bundles.</action>
+      <action dev="aheritier" type="fix">i18n : doc title wasn't printed in breadcrumbs.</action>
     </release>
     <release version="1.9.1" date="2005-06-16">
       <action dev="brett" type="fix">Don't override the Maven library. This makes the plugin compatible with both Maven 1.0.2 and Maven 1.1</action>

Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml?rev=267511&r1=267510&r2=267511&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml Sat Sep  3 15:46:57 2005
@@ -19,7 +19,7 @@
 
 <document>
   <properties>
-    <title>Xdoc Properties</title>
+    <title>XDoc plugin properties</title>
     <author email="smor@apache.org">Stéphane MOR</author>
     <author email="vmassol@apache.org">Vincent Massol</author>
     <author email="vincent.siveton@gmail.com">Vincent Siveton</author>
@@ -133,7 +133,7 @@
         <tr>
             <td>maven.xdoc.date.locale</td>
             <td>Yes</td>
-            <td>Sets the locale used for the date. Defaults to "en", ie english.
+            <td>DEPRECATED. Use the property maven.xdoc.locale.default instead.<br/>Sets the locale used for the date. Defaults to ${maven.xdoc.locale.default}.
         </td>
         </tr>
         <tr>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org