Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit e074595

Browse files
author
barnabartha
committed
SORMAS-Foundation#3253 - update caption definitions
1 parent 7644fd3 commit e074595

10 files changed

Lines changed: 40 additions & 42 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,16 +1077,16 @@ public interface Captions {
10771077
String MaternalHistory_swollenLymphsMonth = "MaternalHistory.swollenLymphsMonth";
10781078
String MaternalHistory_swollenLymphsOnset = "MaternalHistory.swollenLymphsOnset";
10791079
String menu = "menu";
1080-
String Messages_characters = "Messages.characters";
1081-
String Messages_email = "Messages.email";
1082-
String Messages_noPhoneNumberForCasePerson = "Messages.noPhoneNumberForCasePerson";
1083-
String Messages_noSmsSentForCase = "Messages.noSmsSentForCase";
1084-
String Messages_numberOfMessages = "Messages.numberOfMessages";
1085-
String Messages_numberOfMissingPhoneNumbers = "Messages.numberOfMissingPhoneNumbers";
1086-
String Messages_sendingSms = "Messages.sendingSms";
1087-
String Messages_sendSMS = "Messages.sendSMS";
1088-
String Messages_sentBy = "Messages.sentBy";
1089-
String Messages_sms = "Messages.sms";
1080+
String messagesCharacters = "messagesCharacters";
1081+
String messagesEmail = "messagesEmail";
1082+
String messagesNoPhoneNumberForCasePerson = "messagesNoPhoneNumberForCasePerson";
1083+
String messagesNoSmsSentForCase = "messagesNoSmsSentForCase";
1084+
String messagesNumberOfMessages = "messagesNumberOfMessages";
1085+
String messagesNumberOfMissingPhoneNumbers = "messagesNumberOfMissingPhoneNumbers";
1086+
String messagesSendingSms = "messagesSendingSms";
1087+
String messagesSendSMS = "messagesSendSMS";
1088+
String messagesSentBy = "messagesSentBy";
1089+
String messagesSms = "messagesSms";
10901090
String moreActions = "moreActions";
10911091
String name = "name";
10921092
String nationalHealthId = "nationalHealthId";

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ public interface Strings {
629629
String messageDistrictsArchivingNotPossible = "messageDistrictsArchivingNotPossible";
630630
String messageDistrictsDearchived = "messageDistrictsDearchived";
631631
String messageDistrictsDearchivingNotPossible = "messageDistrictsDearchivingNotPossible";
632+
String messageEnterSms = "messageEnterSms";
632633
String messageEntryCreated = "messageEntryCreated";
633634
String messageEpiDataHint = "messageEpiDataHint";
634635
String messageEpidNumberWarning = "messageEpidNumberWarning";
@@ -724,8 +725,6 @@ public interface Strings {
724725
String messageRegionsArchived = "messageRegionsArchived";
725726
String messageRegionsArchivingNotPossible = "messageRegionsArchivingNotPossible";
726727
String messageRegionsDearchived = "messageRegionsDearchived";
727-
String Messages_enterSMS = "Messages.enterSMS";
728-
String Messages_smsSent = "Messages.smsSent";
729728
String messageSampleErrors = "messageSampleErrors";
730729
String messageSampleOpened = "messageSampleOpened";
731730
String messageSampleSaved = "messageSampleSaved";
@@ -771,6 +770,7 @@ public interface Strings {
771770
String notificationLabSampleShippedShort = "notificationLabSampleShippedShort";
772771
String notificationLabSampleShippedShortForContact = "notificationLabSampleShippedShortForContact";
773772
String notificationLabSampleShippedShortForEventParticipant = "notificationLabSampleShippedShortForEventParticipant";
773+
String notificationSmsSent = "notificationSmsSent";
774774
String notificationTaskDueGeneral = "notificationTaskDueGeneral";
775775
String notificationTaskDueSpecific = "notificationTaskDueSpecific";
776776
String notificationTaskStartGeneral = "notificationTaskStartGeneral";

sormas-api/src/main/resources/captions.properties

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,16 +1151,16 @@ LoginSidebar.outbreakResponse=Outbreak Response
11511151
LoginSidebar.poweredBy=Powered By
11521152

11531153
# Messaging
1154-
Messages.sendSMS=Send SMS
1155-
Messages.sentBy=Sent by
1156-
Messages.noSmsSentForCase=No SMS sent to case person
1157-
Messages.noPhoneNumberForCasePerson=Case person has no phone number
1158-
Messages.sms = SMS
1159-
Messages.email = Email
1160-
Messages.sendingSms = Send new SMS
1161-
Messages.numberOfMissingPhoneNumbers = Number of selected cases without phone number: %s
1162-
Messages.characters = Characters: %d / 160
1163-
Messages.numberOfMessages = Nr. of messages: %d
1154+
messagesSendSMS=Send SMS
1155+
messagesSentBy=Sent by
1156+
messagesNoSmsSentForCase=No SMS sent to case person
1157+
messagesNoPhoneNumberForCasePerson=Case person has no phone number
1158+
messagesSms = SMS
1159+
messagesEmail = Email
1160+
messagesSendingSms = Send new SMS
1161+
messagesNumberOfMissingPhoneNumbers = Number of selected cases without phone number: %s
1162+
messagesCharacters = Characters: %d / 160
1163+
messagesNumberOfMessages = Nr. of messages: %d
11641164

11651165
# Main Menu
11661166
mainMenuAbout=About

sormas-api/src/main/resources/strings.properties

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ messageSampleOpened = Opened sample found for search string
787787
messageSystemFollowUpCanceled = [System] Follow-up automatically canceled because contact was converted to a case
788788
messageSetContactRegionAndDistrict = Please choose a responsible region and responsible district and save the contact before removing the source case.
789789
messageAllCampaignFormsValid = All campaign forms have been successfully validated
790+
messageEnterSms = Please enter your SMS message here:
790791

791792
# Notifications
792793
notificationCaseClassificationChanged = The classification of case %s has changed to %s.
@@ -811,6 +812,7 @@ notificationTaskDueSpecific = Your %s task for %s is overdue.
811812
notificationTaskStartGeneral = Your %s task should be started today.
812813
notificationTaskStartSpecific = Your %s task for %s should be started today.
813814
notificationVisitCompleted = A follow-up visit for contact %s assigned to user %s has been completed.
815+
notificationSmsSent = Message sent
814816

815817
#Labels
816818
labelNumberOfUsers = No. of users
@@ -921,8 +923,4 @@ SurvnetGateway.notificationEntrySent = Entry has been sent
921923
SurvnetGateway.notificationEntryNotSent = Entry could not be sent
922924
SurvnetGateway.notificationErrorSending = Error when sending entry
923925

924-
warningDashboardMapTooManyMarkers = There are %d places to display and it is possible that your browser will freeze while displaying them.
925-
926-
# Messaging
927-
Messages.enterSMS = Please enter your SMS message here:
928-
Messages.smsSent = Message sent
926+
warningDashboardMapTooManyMarkers = There are %d places to display and it is possible that your browser will freeze while displaying them.

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,15 +1176,15 @@ public void sendSmsToAllSelectedItems(Collection<? extends CaseIndexDto> selecte
11761176
final SmsComponent smsComponent =
11771177
new SmsComponent(FacadeProvider.getCaseFacade().countCasesWithMissingContactInformation(caseUuids, MessageType.SMS));
11781178
VaadinUiUtil.showConfirmationPopup(
1179-
I18nProperties.getCaption(Captions.Messages_sendingSms),
1179+
I18nProperties.getCaption(Captions.messagesSendingSms),
11801180
smsComponent,
11811181
I18nProperties.getCaption(Captions.actionSend),
11821182
I18nProperties.getCaption(Captions.actionCancel),
11831183
640,
11841184
confirmationEvent -> {
11851185
if (confirmationEvent.booleanValue()) {
11861186
FacadeProvider.getCaseFacade().sendMessage(caseUuids, "", smsComponent.getValue(), MessageType.SMS);
1187-
Notification.show(null, I18nProperties.getString(Strings.Messages_smsSent), Type.TRAY_NOTIFICATION);
1187+
Notification.show(null, I18nProperties.getString(Strings.notificationSmsSent), Type.TRAY_NOTIFICATION);
11881188
}
11891189
});
11901190
}

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CasesView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ public HorizontalLayout createStatusFilterBar() {
707707
&& UserProvider.getCurrent().hasUserRight(UserRight.SEND_MANUAL_EXTERNAL_MESSAGES)) {
708708
menuBarItems.add(
709709
new MenuBarHelper.MenuBarItem(
710-
I18nProperties.getCaption(Captions.Messages_sendSMS),
710+
I18nProperties.getCaption(Captions.messagesSendSMS),
711711
VaadinIcons.MOBILE_RETRO,
712712
selectedItem -> ControllerProvider.getCaseController()
713713
.sendSmsToAllSelectedItems(caseGrid.asMultiSelect().getSelectedItems(), () -> navigateTo(criteria)),

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsComponent.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ protected Component initContent() {
3737
mainLayout.addComponent(
3838
new Label(
3939
VaadinIcons.INFO_CIRCLE.getHtml() + " "
40-
+ String.format(I18nProperties.getCaption(Captions.Messages_numberOfMissingPhoneNumbers), missingPhoneNumbers),
40+
+ String.format(I18nProperties.getCaption(Captions.messagesNumberOfMissingPhoneNumbers), missingPhoneNumbers),
4141
ContentMode.HTML));
4242
mainLayout.addComponent(new Label());
4343
}
4444

45-
mainLayout.addComponent(new Label(I18nProperties.getString(Strings.Messages_enterSMS)));
45+
mainLayout.addComponent(new Label(I18nProperties.getString(Strings.messageEnterSms)));
4646

4747
final TextFieldWithMaxLengthWrapper<TextArea> tTextFieldWithMaxLengthWrapper = new TextFieldWithMaxLengthWrapper<>();
4848

4949
smsTextArea = new TextArea();
5050
smsTextArea.setWidth(100, Unit.PERCENTAGE);
5151
smsTextArea.setRows(4);
52-
mainLayout.addComponent(tTextFieldWithMaxLengthWrapper.wrap(smsTextArea, Captions.Messages_characters, false));
52+
mainLayout.addComponent(tTextFieldWithMaxLengthWrapper.wrap(smsTextArea, Captions.messagesCharacters, false));
5353

54-
final Label numberOfMessagesLabel = new Label(String.format(I18nProperties.getCaption(Captions.Messages_numberOfMessages), 0));
54+
final Label numberOfMessagesLabel = new Label(String.format(I18nProperties.getCaption(Captions.messagesNumberOfMessages), 0));
5555
numberOfMessagesLabel.addStyleNames(CssStyles.ALIGN_RIGHT, CssStyles.FIELD_EXTRA_INFO, CssStyles.LABEL_ITALIC);
5656
mainLayout.addComponent(numberOfMessagesLabel);
5757

@@ -64,7 +64,7 @@ protected Component initContent() {
6464
}
6565

6666
private void setNumberOfMessagesLabel(Label numberOfMessagesLabel, int nrOfCharacters) {
67-
numberOfMessagesLabel.setValue(String.format(I18nProperties.getCaption(Captions.Messages_numberOfMessages), (1 + nrOfCharacters / 160)));
67+
numberOfMessagesLabel.setValue(String.format(I18nProperties.getCaption(Captions.messagesNumberOfMessages), (1 + nrOfCharacters / 160)));
6868
}
6969

7070
@Override

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void reload() {
3030
List<ManualMessageLogDto> messageLogs = FacadeProvider.getCaseFacade().getMessageLog(personReferenceDto.getUuid(), MessageType.SMS);
3131

3232
if (!hasPhoneNumber){
33-
Label noPhoneNumberLabel = new Label(I18nProperties.getCaption(Captions.Messages_noPhoneNumberForCasePerson));
33+
Label noPhoneNumberLabel = new Label(I18nProperties.getCaption(Captions.messagesNoPhoneNumberForCasePerson));
3434
listLayout.addComponent(noPhoneNumberLabel);
3535
}
3636

@@ -39,7 +39,7 @@ public void reload() {
3939
showPage(1);
4040
} else {
4141
updatePaginationLayout();
42-
Label noMessageLabel = new Label(I18nProperties.getCaption(Captions.Messages_noSmsSentForCase));
42+
Label noMessageLabel = new Label(I18nProperties.getCaption(Captions.messagesNoSmsSentForCase));
4343
listLayout.addComponent(noMessageLabel);
4444
}
4545
}

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsListComponent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public SmsListComponent(CaseReferenceDto caseRef, PersonReferenceDto personRef)
3232
createSmsListComponent(new SmsList(personRef, hasPhoneNumber), e -> {
3333
final SmsComponent smsComponent = new SmsComponent(missingPhoneNumbers);
3434
VaadinUiUtil.showConfirmationPopup(
35-
I18nProperties.getCaption(Captions.Messages_sendingSms),
35+
I18nProperties.getCaption(Captions.messagesSendingSms),
3636
smsComponent,
3737
I18nProperties.getCaption(Captions.actionSend),
3838
I18nProperties.getCaption(Captions.actionCancel),
3939
640,
4040
confirmationEvent -> {
4141
if (confirmationEvent.booleanValue()) {
4242
FacadeProvider.getCaseFacade().sendMessage(Arrays.asList(caseRef.getUuid()), "", smsComponent.getValue(), MessageType.SMS);
43-
Notification.show(null, I18nProperties.getString(Strings.Messages_smsSent), Notification.Type.TRAY_NOTIFICATION);
43+
Notification.show(null, I18nProperties.getString(Strings.notificationSmsSent), Notification.Type.TRAY_NOTIFICATION);
4444
}
4545
});
4646
});
@@ -62,11 +62,11 @@ private void createSmsListComponent(SmsList smsList, Button.ClickListener clickL
6262
addComponent(list);
6363
list.reload();
6464

65-
Label smsHeader = new Label(I18nProperties.getCaption(Captions.Messages_sms));
65+
Label smsHeader = new Label(I18nProperties.getCaption(Captions.messagesSms));
6666
smsHeader.addStyleName(CssStyles.H3);
6767
componentHeader.addComponent(smsHeader);
6868

69-
sendSmsButton = new Button(I18nProperties.getCaption(Captions.Messages_sendSMS));
69+
sendSmsButton = new Button(I18nProperties.getCaption(Captions.messagesSendSMS));
7070
CssStyles.style(sendSmsButton, ValoTheme.BUTTON_PRIMARY);
7171
sendSmsButton.addClickListener(clickListener);
7272
componentHeader.addComponent(sendSmsButton);

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsListEntry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public SmsListEntry(ManualMessageLogDto manualMessageLogDto) {
3939
topLeftLayout.setSpacing(false);
4040
final UserReferenceDto sendingUser = manualMessageLogDto.getSendingUser();
4141
final Label sendingInfo = new Label(
42-
I18nProperties.getCaption(Captions.Messages_sentBy) + ": " + sendingUser.getFirstName() + " " + sendingUser.getLastName() + " "
42+
I18nProperties.getCaption(Captions.messagesSentBy) + ": " + sendingUser.getFirstName() + " " + sendingUser.getLastName() + " "
4343
+ DateFormatHelper.formatLocalDateTime(manualMessageLogDto.getSentDate()));
4444
topLeftLayout.addComponent(sendingInfo);
4545
}

0 commit comments

Comments
 (0)