diff --git a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java index cda7c53a9e5..bc24eb949b4 100644 --- a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java @@ -775,6 +775,10 @@ public SolrQueryResponse search( } } else { try { + // This is where facets are capitalized. + // This will be a problem for the API clients because they get back a string like this from the Search API... + // {"datasetType_s":{"friendly":"Dataset Type","labels":[{"Dataset":1},{"Software":1}]} + // ... but they will need to use the lower case version (e.g. "software") to narrow results. localefriendlyName = BundleUtil.getStringFromPropertyFile(facetFieldCount.getName(), "Bundle"); } catch (Exception e) { localefriendlyName = facetFieldCount.getName(); diff --git a/src/main/java/propertyFiles/Bundle.properties b/src/main/java/propertyFiles/Bundle.properties index 4b366522966..76374edb07e 100644 --- a/src/main/java/propertyFiles/Bundle.properties +++ b/src/main/java/propertyFiles/Bundle.properties @@ -3,7 +3,17 @@ newDataverse=New Dataverse hostDataverse=Host Dataverse dataverses=Dataverses passwd=Password +# BEGIN dataset types +# `dataset=Dataset` has been here since 4.0 but now that we have dataset types, +# we need to add the rest of the types here for two reasons. First, we want +# translators to be able to translate these types. Second, in English it looks +# weird to have only "Dataset" capitalized in the facet but not "software" and +# "workflow". This capitalization (looking up here in the bundel) is done by +# SearchServiceBean near the comment "This is where facets are capitalized". dataset=Dataset +software=Software +workflow=Workflow +# END dataset types datasets=Datasets newDataset=New Dataset files=Files