aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@yahooinc.com>2023-01-03 12:52:29 +0100
committerØyvind Grønnesby <oyving@yahooinc.com>2023-01-03 12:52:29 +0100
commit7a9985826830a75255239f88039334b22f759016 (patch)
treedd70cc0e9f61a0e27e0b769b79f270e1acbc6db8
parent238d0194a761ba256ac75b9cad8d549bef555457 (diff)
Capitalise notification messages
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/notification/Notifier.java5
-rw-r--r--controller-server/src/test/resources/mail/notification.txt2
2 files changed, 6 insertions, 1 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/notification/Notifier.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/notification/Notifier.java
index fbf4c30df12..1c76f58a6b2 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/notification/Notifier.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/notification/Notifier.java
@@ -118,6 +118,7 @@ public class Notifier {
.replace("[[NOTIFICATION_HEADER]]", content.messagePrefix())
.replace("[[NOTIFICATION_ITEMS]]", notification.messages().stream()
.map(Notifier::linkify)
+ .map(Notifier::capitalise)
.map(m -> "<p>" + m + "</p>")
.collect(Collectors.joining()))
.replace("[[LINK_TO_NOTIFICATION]]", notificationLink(notification.source()))
@@ -172,4 +173,8 @@ public class Notifier {
}
return uri.toString();
}
+
+ private static String capitalise(String m) {
+ return m.substring(0, 1).toUpperCase() + m.substring(1);
+ }
}
diff --git a/controller-server/src/test/resources/mail/notification.txt b/controller-server/src/test/resources/mail/notification.txt
index 946d9c5fd68..35db37fbc12 100644
--- a/controller-server/src/test/resources/mail/notification.txt
+++ b/controller-server/src/test/resources/mail/notification.txt
@@ -445,7 +445,7 @@
<p>
There are problems with tests for default.default:
</p>
- <p>test package has production tests, but no production tests are declared in deployment.xml</p><p>see <a href="https://docs.vespa.ai/en/testing.html">https://docs.vespa.ai/en/testing.html</a> for details on how to write system tests for Vespa</p>
+ <p>Test package has production tests, but no production tests are declared in deployment.xml</p><p>See <a href="https://docs.vespa.ai/en/testing.html">https://docs.vespa.ai/en/testing.html</a> for details on how to write system tests for Vespa</p>
</div>
</td>
</tr>