diff --git a/dspace/CHANGES b/dspace/CHANGES
index f16710b877..79a78ee545 100644
--- a/dspace/CHANGES
+++ b/dspace/CHANGES
@@ -1,5 +1,6 @@
(Claudia Juergen)
-- SF Patch 1450491 i18n configurable multilingualism support
+- SF Patch #1722557 for SF Bug #1549290 Suggest Features uses hard coded strings
+- SF Patch #1450491 i18n configurable multilingualism support
1.4.2 beta
===========
diff --git a/dspace/config/dspace.cfg b/dspace/config/dspace.cfg
index 0b611aeb0f..c0a21d76e3 100644
--- a/dspace/config/dspace.cfg
+++ b/dspace/config/dspace.cfg
@@ -609,11 +609,7 @@ webui.suggest.enable = false
# Enable only, if the user is logged in.
# If not set the default value is false
# webui.suggest.loggedinusers.only = true
-#
-# default name of recommender - replaced by user input if present
-webui.suggest.sender = A DSpace user
-# default name of recipient - replaced by user input if present
-webui.suggest.recipient = colleague
+
#### Author and subject links ####
# link author names back to browse-by-author (if not set, defaults to true)
diff --git a/dspace/config/language-packs/Messages.properties b/dspace/config/language-packs/Messages.properties
index 58fee88934..92367652be 100644
--- a/dspace/config/language-packs/Messages.properties
+++ b/dspace/config/language-packs/Messages.properties
@@ -1203,6 +1203,8 @@ org.dspace.app.webui.servlet.FeedServlet.search.name
# The following takes in the feed type (collection or community)
org.dspace.app.webui.servlet.FeedServlet.search.title = The {0}''s search engine
org.dspace.app.webui.servlet.FeedServlet.search.title.default = The DSpace search engine
+org.dspace.app.webui.servlet.SuggestServlet.recipient = colleague
+#org.dspace.app.webui.servlet.SuggestServlet.sender = A DSpace user
org.dspace.app.webui.servlet.admin.MetadataFieldRegistryServlet.badelemchar = The element cannot contain periods, underscores or spaces.
org.dspace.app.webui.servlet.admin.MetadataFieldRegistryServlet.badqualchar = The qualifier cannot contain periods, underscores or spaces.
org.dspace.app.webui.servlet.admin.MetadataFieldRegistryServlet.createfailed = The requested field could not be created due to an already existing field with an identical name.
diff --git a/dspace/docs/configure.html b/dspace/docs/configure.html
index 1ee1cc1e5e..f676fc1dc5 100644
--- a/dspace/docs/configure.html
+++ b/dspace/docs/configure.html
@@ -1013,11 +1013,14 @@ stat-report-monthly
in dspace.cfg:
webui.suggest.enable = true
Set the value of this property to true to expose the link to the recommendation form. If false, the link will not display.
webui.suggest.sender = A DSpace user
webui.suggest.loggedinusers.only = true
Messages.properties:
+org.dspace.app.webui.servlet.SuggestServlet.sender = A DSpace user
The form includes an optional field for the name of the person making the recommendation. The value of this property will be used if the sender is not specified. Note that if the user has been authenticated to DSpace, the e-person record will be used to set the default value of this field, and will also be used to set the 'reply-to' email header to the e-person's address.
-webui.suggest.recipient = colleague
org.dspace.app.webui.servlet.SuggestServlet.recipient = colleague
In addition to the required destination email address, the form includes an optional field for the name of person to whom the recommendation is to be sent. The value of this property will be used if the recipient name is not specified.
The wording and layout of the email message is governed by the template file [dspace]/config/emails/suggest. You may edit this file
to alter the language, layout, type, or amount of information contained in the email, but note that the values passed to the template are limited to those enumerated at the
diff --git a/dspace/src/org/dspace/app/webui/servlet/SuggestServlet.java b/dspace/src/org/dspace/app/webui/servlet/SuggestServlet.java
index 6d6b304504..942cc08852 100644
--- a/dspace/src/org/dspace/app/webui/servlet/SuggestServlet.java
+++ b/dspace/src/org/dspace/app/webui/servlet/SuggestServlet.java
@@ -43,6 +43,7 @@ package org.dspace.app.webui.servlet;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Date;
+import java.util.MissingResourceException;
import javax.mail.MessagingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -143,7 +144,15 @@ public class SuggestServlet extends DSpaceServlet
String recipName = request.getParameter("recip_name");
if (recipName == null || "".equals(recipName))
{
- recipName = ConfigurationManager.getProperty("webui.suggest.recipient");
+ try
+ {
+ recipName = I18nUtil.getMessage("org.dspace.app.webui.servlet.SuggestServlet.recipient", context);
+ }
+ catch (MissingResourceException e)
+ {
+ log.warn(LogManager.getHeader(context, "show_suggest_form", "Missing Resource: org.dspace.app.webui.servlet.SuggestServlet.sender"));
+ recipName = "colleague";
+ }
}
String senderName = request.getParameter("sender_name");
if (senderName == null || "".equals(senderName) )
@@ -155,8 +164,15 @@ public class SuggestServlet extends DSpaceServlet
}
else
{
- // use configured default
- senderName = ConfigurationManager.getProperty("webui.suggest.sender");
+ try
+ {
+ senderName = I18nUtil.getMessage("org.dspace.app.webui.servlet.SuggestServlet.sender", context);
+ }
+ catch (MissingResourceException e)
+ {
+ log.warn(LogManager.getHeader(context, "show_suggest_form", "Missing Resource: org.dspace.app.webui.servlet.SuggestServlet.sender"));
+ senderName = "A DSpace User";
+ }
}
}
String senderAddr = request.getParameter("sender_email");