[Yanel-commits] rev 32618 - public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n

josias at wyona.com josias at wyona.com
Thu Feb 28 10:10:18 CET 2008


Author: josias
Date: 2008-02-28 10:10:17 +0100 (Thu, 28 Feb 2008)
New Revision: 32618

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/I18nUtils.java
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/MessageManager.java
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/ResourceBundleMessageProvider.java
Log:
fixed some javadoc

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/I18nUtils.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/I18nUtils.java	2008-02-28 09:07:45 UTC (rev 32617)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/I18nUtils.java	2008-02-28 09:10:17 UTC (rev 32618)
@@ -17,11 +17,9 @@
 package org.wyona.yanel.core.i18n;
 
 import java.util.Locale;
-import java.util.ResourceBundle;
 
 /**
  * This class holds utility methods useful when working with i18n.
- * @author Mattias Jiderhamn
  */
 public class I18nUtils {
 

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/MessageManager.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/MessageManager.java	2008-02-28 09:07:45 UTC (rev 32617)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/MessageManager.java	2008-02-28 09:10:17 UTC (rev 32618)
@@ -23,25 +23,6 @@
 /**
  * The <code>MessageManager</code> provides methods for retrieving localized
  * messages and adding custom message providers. 
- * This class should not be called directly for other purposes than registering a custom
- * {@link MessageProvider} or retrieving information about available
- * message entries.
- * <p>
- * To access localized messages a subclass of the {@link LocalizedBundle} class
- * such as <code>LocalizedText </code> should be used:
- * 
- * <pre>
- * LocalizedText welcome = new LocalizedText(&quot;welcome&quot;); 
- * // Get the german translacion of the retrieved welcome text 
- * System.out.println(welcome.getText(Locale.GERMAN));       
- * </pre>
- * 
- * <p>
- * You can call {@link MessageManager#getText(String,String,Object[],Locale) getText} directly,
- * but if you do so, you have to ensure that the given entry key really
- * exists and to deal with the {@link MessageNotFoundException} exception that will
- * be thrown if you try to access a not existing entry.</p>
- * 
  */
 public class MessageManager {
 
@@ -56,11 +37,9 @@
     /**
      * Add a custom <code>{@link MessageProvider}</code> to the
      * <code>MessageManager</code>. It will be incorporated in later calls of
-     * the {@link MessageManager#getText(String,String,Object[],Locale) getText}
-     * or {@link #getEntries(String,Locale) getEntries}methods.
+     * the {@link MessageManager#getText(String,Object[],Locale) getText}.
      *
-     * @param providerId Id of the provider used for uninstallation and
-     *          qualified naming.
+     * @param providerId Id of the provider used for uninstallation.
      * @param messageProvider
      *            The <code>MessageProvider</code> to be added.
      */
@@ -88,11 +67,10 @@
 
     /**
      * Iterates over all registered message providers in order to find the given
-     * entry in the requested message bundle.
+     * message.
      * 
      * @param key
      *            The identifier that will be used to retrieve the message
-     *            bundle
      * @param arguments
      *            The dynamic parts of the message that will be evaluated using
      *            the standard java text formatting abilities.
@@ -113,11 +91,10 @@
 
     /**
      * Iterates over all registered message providers in order to find the given
-     * entry in the requested message bundle.
+     * message.
      * 
      * @param key
      *            The identifier that will be used to retrieve the message
-     *            bundle
      * @param locale
      *            The locale in which the message will be printed
      * @return The localized message or null if no message is found 
@@ -129,21 +106,20 @@
 
     /**
      * Iterates over all registered message providers in order to find the given
-     * entry in the requested message bundle.
+     * message.
      * 
      * @param key
      *            The identifier that will be used to retrieve the message
-     *            bundle
      * @param arguments
      *            The dynamic parts of the message that will be evaluated using
      *            the standard java text formatting abilities.
      * @param locale
      *            The locale in which the message will be printed
-     * @param defaultMessage
-     *            If no message bundle or message entry could be found for the
+     * @param defaultText
+     *            If no message could be found for the
      *            specified parameters, the default text will be returned.
      * @return The localized text or the default text if the message could not
-     *         be found
+     *            be found
      */
     public String getText(String key, Object[] arguments, Locale locale, String defaultText) {
         String text = getText(key, arguments, locale);
@@ -156,18 +132,17 @@
 
     /**
      * Iterates over all registered message providers in order to find the given
-     * entry in the requested message bundle.
+     * message.
      * 
      * @param key
      *            The identifier that will be used to retrieve the message
-     *            bundle
      * @param locale
      *            The locale in which the message will be printed
-     * @param defaultMessage
-     *            If no message bundle or message entry could be found for the
+     * @param defaultText
+     *            If no message could be found for the
      *            specified parameters, the default text will be returned.
      * @return The localized text or the default text if the message could not
-     *         be found
+     *            be found
      */
     public String getText(String key, Locale locale, String defaultText) {
         Object[] arguments = new Object[0];

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/ResourceBundleMessageProvider.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/ResourceBundleMessageProvider.java	2008-02-28 09:07:45 UTC (rev 32617)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/i18n/ResourceBundleMessageProvider.java	2008-02-28 09:10:17 UTC (rev 32618)
@@ -25,8 +25,7 @@
 
 /**
  * The <code>ResourceBundleMessageProvider</code> deals with messages defined in 
- * resource bundles. Messages defined in resource bundles can be grouped together
- * by adding the entry key at the end of the message key separated by a dot.
+ * resource bundles.
  */
 public class ResourceBundleMessageProvider implements MessageProvider {
     private static Logger log = Logger.getLogger(ResourceBundleMessageProvider.class.getName());



More information about the Yanel-commits mailing list