jford 2004/08/29 15:32:15
Modified: src/java/org/apache/jetspeed/modules/actions/controllers
VelocityControllerAction.java
MultiColumnControllerAction.java
src/java/org/apache/jetspeed/modules/parameters
RegistryEntryListBox.java
Log:
Switch from Turbine's Localization service to Jetspeed's CustomLocalization service
PR: JIRA #JS1-396
Revision Changes Path
1.10 +3 -3
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/VelocityControllerAction.java
Index: VelocityControllerAction.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/VelocityControllerAction.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- VelocityControllerAction.java 23 Feb 2004 02:49:58 -0000 1.9
+++ VelocityControllerAction.java 29 Aug 2004 22:32:15 -0000 1.10
@@ -18,6 +18,7 @@
// Jetspeed stuff
import org.apache.jetspeed.portal.PortletController;
+import org.apache.jetspeed.services.customlocalization.CustomLocalization;
import org.apache.jetspeed.services.rundata.JetspeedRunData;
import org.apache.jetspeed.services.statemanager.SessionState;
@@ -25,7 +26,6 @@
import org.apache.turbine.util.RunData;
import org.apache.turbine.services.velocity.TurbineVelocity;
import org.apache.turbine.modules.actions.VelocityAction;
-import org.apache.turbine.services.localization.Localization;
// Velocity Stuff
import org.apache.velocity.context.Context;
@@ -154,11 +154,11 @@
String saveLabel = null;
if (((String)
customizationState.getAttribute("customize-paneName")).equalsIgnoreCase("*"))
{
- saveLabel = Localization.getString(rundata, "CUSTOMIZER_SAVEAPPLY");
+ saveLabel = CustomLocalization.getString("CUSTOMIZER_SAVEAPPLY",
rundata);
}
else
{
- saveLabel = Localization.getString(rundata, "CUSTOMIZER_APPLY");
+ saveLabel = CustomLocalization.getString("CUSTOMIZER_APPLY", rundata);
}
context.put("saveLabel", saveLabel);
1.32 +4 -4
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java
Index: MultiColumnControllerAction.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- MultiColumnControllerAction.java 27 May 2004 06:02:03 -0000 1.31
+++ MultiColumnControllerAction.java 29 Aug 2004 22:32:15 -0000 1.32
@@ -31,6 +31,7 @@
import org.apache.jetspeed.portal.Portlet;
import org.apache.jetspeed.portal.PortletSet;
import org.apache.jetspeed.portal.PortletController;
+import org.apache.jetspeed.services.customlocalization.CustomLocalization;
import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
import org.apache.jetspeed.services.logging.JetspeedLogger;
import org.apache.jetspeed.services.resources.JetspeedResources;
@@ -41,7 +42,6 @@
// Turbine stuff
import org.apache.turbine.modules.ActionLoader;
-import org.apache.turbine.services.localization.Localization;
import org.apache.turbine.util.RunData;
// Velocity Stuff
@@ -331,12 +331,12 @@
if (identityElement instanceof Reference)
{
- titles.put(identityElement.getId(),
Localization.getString(rundata, "CUSTOMIZER_REF_DEFAULTTITLE"));
+ titles.put(identityElement.getId(),
CustomLocalization.getString("CUSTOMIZER_REF_DEFAULTTITLE", rundata));
continue;
}
// Let's make sure their is a title
- titles.put(identityElement.getId(), Localization.getString(rundata,
"CUSTOMIZER_NOTITLESET"));
+ titles.put(identityElement.getId(),
CustomLocalization.getString("CUSTOMIZER_NOTITLESET", rundata));
}
}
1.9 +7 -7
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/parameters/RegistryEntryListBox.java
Index: RegistryEntryListBox.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/parameters/RegistryEntryListBox.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- RegistryEntryListBox.java 23 Feb 2004 03:01:20 -0000 1.8
+++ RegistryEntryListBox.java 29 Aug 2004 22:32:15 -0000 1.9
@@ -29,9 +29,9 @@
import org.apache.jetspeed.om.security.JetspeedUser;
import org.apache.jetspeed.services.JetspeedSecurity;
import org.apache.jetspeed.services.Registry;
+import org.apache.jetspeed.services.customlocalization.CustomLocalization;
import org.apache.jetspeed.services.rundata.JetspeedRunData;
import org.apache.jetspeed.services.security.PortalResource;
-import org.apache.turbine.services.localization.Localization;
import org.apache.turbine.util.RunData;
import org.apache.velocity.context.Context;
@@ -139,11 +139,11 @@
String label = null;
if (regName.equals(Registry.PORTLET))
{
- label = Localization.getString(data, "CUSTOMIZER_PORTLET");
+ label = CustomLocalization.getString("CUSTOMIZER_PORTLET", data);
}
else if (regName.equals(Registry.SECURITY))
{
- label = Localization.getString(data, "CUSTOMIZER_SECURITY_REF");
+ label = CustomLocalization.getString("CUSTOMIZER_SECURITY_REF", data);
// SecurityReference defaultRef = PortalToolkit.getDefaultSecurityRef(
// ((JetspeedRunData) data).getCustomizedProfile());
// if (defaultRef != null)
@@ -153,15 +153,15 @@
}
else if (regName.equals(Registry.MEDIA_TYPE))
{
- label = Localization.getString(data, "CUSTOMIZER_MEDIATYPE");
+ label = CustomLocalization.getString("CUSTOMIZER_MEDIATYPE", data);
}
else if (regName.equals(Registry.PORTLET_CONTROLLER))
{
- label = Localization.getString(data, "CUSTOMIZER_LAYOUT");
+ label = CustomLocalization.getString("CUSTOMIZER_LAYOUT", data);
}
else if (regName.equals(Registry.PORTLET_CONTROL))
{
- label = Localization.getString(data, "CUSTOMIZER_DECORATION");
+ label = CustomLocalization.getString("CUSTOMIZER_DECORATION", data);
}
else if (regName.equals(Registry.CLIENT))
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]