portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morci...@apache.org
Subject cvs commit: jakarta-jetspeed/xdocs changes.xml
Date Fri, 11 Apr 2003 18:08:48 GMT
morciuch    2003/04/11 11:08:48

  Modified:    docs/site changes.html
               src/java/org/apache/jetspeed/services/customlocalization
                        JetspeedLocalizationService.java
               src/java/org/apache/jetspeed/services/jsp/tags
                        JetspeedL10NTag.java
               xdocs    changes.xml
  Log:
  Bug # 18510 - Applied patch for localized key string from JetspeedL10NTag class, by Fabio
Latrofa
  Bug # 17715 - Applied patch for JetspeedLocalizationService only looking at first resource
bundle, by Jon Evans
  
  Revision  Changes    Path
  1.127     +10 -0     jakarta-jetspeed/docs/site/changes.html
  
  Index: changes.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/docs/site/changes.html,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- changes.html	8 Apr 2003 21:35:30 -0000	1.126
  +++ changes.html	11 Apr 2003 18:08:48 -0000	1.127
  @@ -132,6 +132,16 @@
     action (add/remove/update/fix) - [Bug # xxx -] date - description (committer's initials)
[Thanks to developer_name]
   </li>
   -->
  +
  +<li>
  +  Add -   Bug # 18510 - 2003/04/10 - Applied patch for localized key string from JetspeedL10NTag
class, by Fabio Latrofa (MO)
  +</li>
  +<li>
  +  Add -   Bug # 17715 - 2003/04/10 - Applied patch for JetspeedLocalizationService only
looking at first resource bundle, by Jon Evans (MO)
  +</li>
  +<li>
  +  Add -   2003/04/09 - Added the ability to set/add portlet parameters at the registry
level through PortletConfigState. (STW)
  +</li>
   <li>
     Add -   Bug # 18829 - 2003/04/08 - Screens may now be optionally included in portlet
template search (MO)
   </li>
  
  
  
  1.5       +1 -97     jakarta-jetspeed/src/java/org/apache/jetspeed/services/customlocalization/JetspeedLocalizationService.java
  
  Index: JetspeedLocalizationService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/customlocalization/JetspeedLocalizationService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JetspeedLocalizationService.java	26 Feb 2003 17:46:34 -0000	1.4
  +++ JetspeedLocalizationService.java	11 Apr 2003 18:08:48 -0000	1.5
  @@ -62,14 +62,10 @@
    */
   
   // Java imports
  -import java.util.Hashtable;
   import java.util.Locale;
  -import java.util.ResourceBundle;
   
   // Turbine imports
   import org.apache.turbine.services.localization.TurbineLocalizationService;
  -import org.apache.turbine.services.InitializationException;
  -import org.apache.turbine.services.resources.TurbineResources;
   import org.apache.turbine.util.RunData;
   
   // Jetspeed imports
  @@ -78,81 +74,6 @@
   
   public class JetspeedLocalizationService extends TurbineLocalizationService implements
CustomLocalizationService
   {
  -    public JetspeedLocalizationService()
  -    {
  -        super();
  -    }
  -
  -    public void init() throws InitializationException
  -    {
  -        super.init();
  -    }
  -
  -    protected void initBundleNames(String ignored[])
  -    {
  -        bundleNames = TurbineResources.getStringArray("locale.default.bundles");
  -        String name = TurbineResources.getString("locale.default.bundle");
  -        if (name != null && name.length() > 0)
  -        {
  -            if (bundleNames == null || bundleNames.length <= 0)
  -            {
  -              bundleNames = (new String[] {name});
  -            }
  -            else
  -            {
  -              String array[] = new String[bundleNames.length + 1];
  -              array[0] = name;
  -              System.arraycopy(bundleNames, 0, array, 1, bundleNames.length);
  -              bundleNames = array;
  -            }
  -        }
  -        if (bundleNames == null)
  -        {
  -            bundleNames = new String[0];
  -        }
  -    }
  -
  -    public String getDefaultBundleName()
  -    {
  -        return bundleNames.length > 0 ? bundleNames[0] : "";
  -    }
  -
  -    public ResourceBundle getBundle()
  -    {
  -        return super.getBundle();
  -    }
  -
  -    public ResourceBundle getBundle(String bundleName)
  -    {
  -        return super.getBundle(bundleName);
  -    }
  -
  -    public ResourceBundle getBundle(String bundleName, String languageHeader)
  -    {
  -      return super.getBundle(bundleName, languageHeader);
  -    }
  -
  -    public ResourceBundle getBundle(RunData data)
  -    {
  -      return super.getBundle(data);
  -    }
  -
  -    public ResourceBundle getBundle(String bundleName, RunData data)
  -    {
  -      return super.getBundle(bundleName, data);
  -    }
  -
  -    public ResourceBundle getBundle(String bundleName, Locale locale)
  -    {
  -     return super.getBundle(bundleName, locale);
  -    }
  -
  -    public void setBundle(String defaultBundle)
  -    {
  -      super.setBundle(defaultBundle);
  -    }
  -
  -
       public final Locale getLocale(RunData data)
       {
           JetspeedUser user = (JetspeedUser) data.getUser();
  @@ -183,21 +104,4 @@
               }
           }
       }
  -
  -    public Locale getLocale(String header)
  -    {
  -        return super.getLocale(header);
  -    }
  -
  -    public String getString(String bundleName, Locale locale, String key)
  -    {
  -        return super.getString(bundleName, locale, key);
  -    }
  -
  -    private Hashtable bundles;
  -    private String bundleNames[];
  -    private Locale defaultLocale;
  -    private String defaultLanguage;
  -    private String defaultCountry;
  -
   }
  
  
  
  1.2       +14 -11    jakarta-jetspeed/src/java/org/apache/jetspeed/services/jsp/tags/JetspeedL10NTag.java
  
  Index: JetspeedL10NTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/jsp/tags/JetspeedL10NTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JetspeedL10NTag.java	29 Nov 2002 19:26:09 -0000	1.1
  +++ JetspeedL10NTag.java	11 Apr 2003 18:08:48 -0000	1.2
  @@ -65,7 +65,7 @@
   // Turbine Classes
   import org.apache.turbine.util.Log;
   import org.apache.turbine.services.jsp.JspService;
  -import org.apache.turbine.services.localization.Localization;
  +import org.apache.turbine.services.localization.LocalizationService;
   
   // ECS support
   import org.apache.ecs.ConcreteElement;
  @@ -73,6 +73,8 @@
   
   // Jetspeed support
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
  +import org.apache.jetspeed.services.customlocalization.CustomLocalizationService;
  +import org.apache.jetspeed.util.ServiceUtil;
   
   /**
    * Supporting class for the localization (l10n) tag.
  @@ -120,20 +122,21 @@
           try
           {
               ConcreteElement result = null;
  +            String def = this.alt != null && this.alt.trim().length() > 0 ?
this.alt : this.key;
               try 
               {
  -                result = new StringElement(Localization.getString(this.key));         
  
  +                CustomLocalizationService locService = (CustomLocalizationService) ServiceUtil.getServiceByName(
  +                    LocalizationService.SERVICE_NAME);
  +                result = new StringElement(locService.getString(this.key, locService.getLocale(data),
def));            
               }
               catch (MissingResourceException mre)
               {
  -                if (this.alt != null && this.alt.trim().length() > 0)
  -                {
  -                    result = new StringElement(this.alt);
  -                }
  -                else
  -                {
  -                    result = new StringElement(this.key);
  -                }            
  +                result = new StringElement(def);
  +            }
  +            catch (Exception oe)
  +            {
  +                result = new StringElement(def);
  +                Log.error(oe);
               }
   
               // Output the result
  
  
  
  1.147     +7 -1      jakarta-jetspeed/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
  retrieving revision 1.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- changes.xml	9 Apr 2003 14:17:21 -0000	1.146
  +++ changes.xml	11 Apr 2003 18:08:48 -0000	1.147
  @@ -24,6 +24,12 @@
   -->
   
   <li>
  +  Add -   Bug # 18510 - 2003/04/10 - Applied patch for localized key string from JetspeedL10NTag
class, by Fabio Latrofa (MO)
  +</li>
  +<li>
  +  Add -   Bug # 17715 - 2003/04/10 - Applied patch for JetspeedLocalizationService only
looking at first resource bundle, by Jon Evans (MO)
  +</li>
  +<li>
     Add -   2003/04/09 - Added the ability to set/add portlet parameters at the registry
level through PortletConfigState. (STW)
   </li>
   <li>
  
  
  

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


Mime
View raw message