From f8dd829ee23f22e57c56323650bf34eda0442a82 Mon Sep 17 00:00:00 2001 From: Peter Major Date: Mon, 20 Oct 2014 00:51:39 +0100 Subject: [PATCH] First set of localization work --- src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java | 6 +++--- .../resources/jenkins/plugins/hipchat/Messages.properties | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/jenkins/plugins/hipchat/Messages.properties diff --git a/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java b/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java index a442a16..6cdbb68 100644 --- a/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java +++ b/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java @@ -223,13 +223,13 @@ public FormValidation doSendTestNotification(@QueryParameter("hipchat.server") S @QueryParameter("hipchat.token") String token, @QueryParameter("hipchat.room") String room, @QueryParameter("hipchat.sendAs") String sendAs) { HipChatService service = new StandardHipChatService(server, token, room, sendAs); - service.publish("Test notification " + ++testNotificationCount); - return FormValidation.ok("Test notification sent"); + service.publish(Messages.TestNotification(++testNotificationCount)); + return FormValidation.ok(Messages.TestNotificationSent()); } @Override public String getDisplayName() { - return "HipChat Notifications"; + return Messages.DisplayName(); } } diff --git a/src/main/resources/jenkins/plugins/hipchat/Messages.properties b/src/main/resources/jenkins/plugins/hipchat/Messages.properties new file mode 100644 index 0000000..6e4b518 --- /dev/null +++ b/src/main/resources/jenkins/plugins/hipchat/Messages.properties @@ -0,0 +1,3 @@ +DisplayName=HipChat Notifications +TestNotification=Test Notification {0} +TestNotificationSent=Test Notification Sent