Remove quotes and trailing period from "topic edited" messages

When the topic is edited, a change message is added that shows
the old and new topics.  If the topic is set to a URL, the URL
is linkified, but the linkification includes the trailing closing
quote and period after the topic name, and the link does not work.

Remove the quotes and trailing period to prevent this.

Bug: Issue 2397
Change-Id: Ic70882f7355cf84e12a2853f0ac6a77c4ca1543d
This commit is contained in:
David Pursehouse
2014-01-15 19:04:34 +09:00
parent c3cdea0a02
commit f97dbd8e7b

View File

@@ -80,12 +80,12 @@ class PutTopic implements RestModifyView<ChangeResource, Input>,
if (!oldTopicName.equals(newTopicName)) {
String summary;
if (oldTopicName.isEmpty()) {
summary = "Topic set to \"" + newTopicName + "\".";
summary = "Topic set to " + newTopicName;
} else if (newTopicName.isEmpty()) {
summary = "Topic \"" + oldTopicName + "\" removed.";
summary = "Topic " + oldTopicName + " removed";
} else {
summary = String.format(
"Topic updated from \"%s\" to \"%s\".",
"Topic changed from %s to %s",
oldTopicName, newTopicName);
}