maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r940322 - /maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
Date Sun, 02 May 2010 22:06:06 GMT
Author: hboutemy
Date: Sun May  2 22:06:06 2010
New Revision: 940322

URL: http://svn.apache.org/viewvc?rev=940322&view=rev
Log:
factored out I18N for reports name and description

Modified:
    maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java

Modified: maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java?rev=940322&r1=940321&r2=940322&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
(original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
Sun May  2 22:06:06 2010
@@ -243,4 +243,23 @@ public abstract class AbstractProjectInf
     {
         return siteRenderer;
     }
+
+    protected String getI18nString( Locale locale, String key )
+    {
+        return i18n.getString( "project-info-report", locale, "report." + getI18Nsection()
+ '.' + key );
+    }
+
+    protected abstract String getI18Nsection();
+
+    /** {@inheritDoc} */
+    public String getName( Locale locale )
+    {
+        return getI18nString( locale, "name" );
+    }
+
+    /** {@inheritDoc} */
+    public String getDescription( Locale locale )
+    {
+        return getI18nString( locale, "description" );
+    }
 }



Mime
View raw message