Author: mageshbk(a)jboss.com
Date: 2008-08-04 05:28:29 -0400 (Mon, 04 Aug 2008)
New Revision: 11666
Modified:
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
Log:
[JBPORTAL-2099] Patch for [JBPORTAL-2095] Localize CMS Portlet Error Message
Modified:
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
===================================================================
---
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2008-08-01
07:58:59 UTC (rev 11665)
+++
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2008-08-04
09:28:29 UTC (rev 11666)
@@ -55,6 +55,7 @@
import java.io.PrintWriter;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.Locale;
+import java.util.ResourceBundle;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -289,7 +290,8 @@
}
else
{
- sHTML = "<h2>404 - Page Not Found</h2>Oops! We can't
really find the resource you're looking for.";
+ ResourceBundle rb = getPortletConfig().getResourceBundle(req.getLocale());
+ sHTML = "<h2>" +
rb.getString("CMS_MISSING_DOCUMENT") + "</h2>" +
rb.getString("CMS_MISSING_DOCUMENT_DESCRIPTION");
}
PrintWriter writer = resp.getWriter();
@@ -303,13 +305,14 @@
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
String sHTML = "";
+ ResourceBundle rb = getPortletConfig().getResourceBundle(req.getLocale());
if (path == null || path.trim().length() == 0)
{
- sHTML = "<h2>Access Denied</h2>You are not allowed to
access the following resource";
+ sHTML = "<h2>" +
rb.getString("CMS_ACCESS_DENIED")+ "</h2>" +
rb.getString("CMS_ACCESS_DENIED_DESCRIPTION");
}
else
{
- sHTML = "<h2>Access Denied</h2>You are not allowed to
access the following resource - " + path;
+ sHTML = "<h2>" +
rb.getString("CMS_ACCESS_DENIED")+ "</h2>" +
rb.getString("CMS_ACCESS_DENIED_DESCRIPTION_PATH") + " - " + path;
}
writer.write(sHTML);
writer.close();
Modified:
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-08-01
07:58:59 UTC (rev 11665)
+++
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-08-04
09:28:29 UTC (rev 11666)
@@ -131,3 +131,12 @@
CMS_ADMIN_SELECT_ROLES=Select Roles that have access to this node.
CMS_ADMIN_SELECT_USERS=Select Users that have access to this node.
CMS_ADMIN_YOU_CAN_SELECT_CTRL_ROLES=You may select multiple roles by using CTRL+click on
the role names.
+
+CMS_ACCESS_DENIED=Access Denied
+CMS_ACCESS_DENIED_DESCRIPTION=You are not allowed to access this resource
+CMS_ACCESS_DENIED_DESCRIPTION_PATH=You are not allowed to access the resource
+
+CMS_MISSING_DOCUMENT=404 - Page Not Found
+CMS_MISSING_DOCUMENT_DESCRIPTION=The document you tried to access is not available
+
+
Modified:
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties
===================================================================
---
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties 2008-08-01
07:58:59 UTC (rev 11665)
+++
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties 2008-08-04
09:28:29 UTC (rev 11666)
@@ -122,3 +122,11 @@
CMS_TO_MODIFY=Um das Verhalten dieses Portlets zu modifizieren,
CMS_CLICK_HERE=bitte hier klicken
+
+CMS_ACCESS_DENIED=Zugriff verweigert
+CMS_ACCESS_DENIED_DESCRIPTION=Sie sind nicht berechtigt, auf dieses Element zuzugreifen
+CMS_ACCESS_DENIED_DESCRIPTION_PATH=Sie sind nicht berechtigt, auf folgendes Element
zuzugreifen
+
+CMS_MISSING_DOCUMENT=404 - Seite nicht gefunden
+CMS_MISSING_DOCUMENT_DESCRIPTION=Das von ihnen angeforderte Dokument ist nicht verf�gbar
+
Modified:
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
===================================================================
---
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2008-08-01
07:58:59 UTC (rev 11665)
+++
branches/JBoss_Portal_2_6_6_JBPORTAL-2099/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2008-08-04
09:28:29 UTC (rev 11666)
@@ -152,3 +152,10 @@
TITLE_UPLOAD = T\u00E9l\u00E9d\u00E9verser un fichier
TITLE_VIEWFILE = Propri\u00E9t\u00E9s du fichier
+
+CMS_ACCESS_DENIED=Acc\u00E9s interdit
+CMS_ACCESS_DENIED_DESCRIPTION=Vous n'\u00eates pas autoris\u00E9 \u00e0 acc\u00e9der
a ce document
+CMS_ACCESS_DENIED_DESCRIPTION_PATH=Vous n'\u00eates pas autoris\u00E9 \u00e0
acc\u00e9der au document
+
+CMS_MISSING_DOCUMENT=404 - Page non trouv\u00E9e
+CMS_MISSING_DOCUMENT_DESCRIPTION=Le document auquel vous avez tent\u00E9
d'acc\u00E9der est introuvable
Show replies by date