Skip to content

Commit

Permalink
just use the existing "Support" bundle key #3611 #2710
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Jun 7, 2017
1 parent 8d4ebdf commit 52ada78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ contact.dataverse.header=Email Dataverse Contact
contact.dataset.header=Email Dataset Contact
contact.to=To
contact.support=Support
contact.support.dynamic={0} Support
contact.from=From
contact.from.required=User email is required.
contact.from.invalid=Email is invalid.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public static String getSupportTeamName(InternetAddress systemAddress, String ro
}
}
if (rootDataverseName != null && !rootDataverseName.isEmpty()) {
return BundleUtil.getStringFromBundle("contact.support.dynamic", Arrays.asList(rootDataverseName));
return rootDataverseName + " " + BundleUtil.getStringFromBundle("contact.support");
}
String saneDefault = BundleUtil.getStringFromBundle("dataverse");
return BundleUtil.getStringFromBundle("contact.support.dynamic", Arrays.asList(saneDefault));
return BundleUtil.getStringFromBundle("contact.support", Arrays.asList(saneDefault));
}

public static String getSupportTeamEmailAddress(InternetAddress systemAddress) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public void testGetInstallationBrandName() {
@Test
public void testGetSupportTeamName() throws AddressException, UnsupportedEncodingException {
System.out.println("testGetSupportTeamName");
assertEquals("Dataverse Support", BrandingUtil.getSupportTeamName(null, null));
assertEquals("Dataverse Support", BrandingUtil.getSupportTeamName(null, ""));
assertEquals("Support", BrandingUtil.getSupportTeamName(null, null));
assertEquals("Support", BrandingUtil.getSupportTeamName(null, ""));
assertEquals("LibraScholar Support", BrandingUtil.getSupportTeamName(null, "LibraScholar"));
assertEquals("LibraScholar Support", BrandingUtil.getSupportTeamName(new InternetAddress("support@librascholar.edu"), "LibraScholar"));
assertEquals("LibraScholar Support Team", BrandingUtil.getSupportTeamName(new InternetAddress("support@librascholar.edu", "LibraScholar Support Team"), "LibraScholar"));
Expand Down Expand Up @@ -102,7 +102,7 @@ public void testEmailSubject() {
@Test
public void testGetContactHeader() {
System.out.println("testGetContactHeader");
assertEquals("Contact Dataverse Support", BrandingUtil.getContactHeader(null, null));
assertEquals("Contact Support", BrandingUtil.getContactHeader(null, null));
}

}

0 comments on commit 52ada78

Please sign in to comment.