Skip to content

Commit

Permalink
Revert "use defaultLocale value as default if it exists"
Browse files Browse the repository at this point in the history
This reverts commit abf44df.
  • Loading branch information
qqmyers committed Aug 12, 2020
1 parent abf44df commit 37faf80
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,16 +503,15 @@ public boolean isThumbnailGenerationDisabledForPDF() {
public String getApplicationTermsOfUse() {
String language = BundleUtil.getCurrentLocale().getLanguage();
String saneDefaultForAppTermsOfUse = BundleUtil.getStringFromBundle("system.app.terms");
// Get the value for the defaultLocale. IT will either be used as the return
// value, or as a better default than the saneDefaultForAppTermsOfUse if there
// is no language-specific value
String appTermsOfUse = settingsService.getValueForKey(SettingsServiceBean.Key.ApplicationTermsOfUse,
saneDefaultForAppTermsOfUse);
//Now get the language-specific value if it exists
if (!language.equalsIgnoreCase(BundleUtil.getDefaultLocale().getLanguage())) {
appTermsOfUse = settingsService.getValueForKey(SettingsServiceBean.Key.ApplicationTermsOfUse, language,
appTermsOfUse);
}
String appTermsOfUse = "";
if(language.equalsIgnoreCase(BundleUtil.getDefaultLocale().getLanguage()) )
{
appTermsOfUse = settingsService.getValueForKey(SettingsServiceBean.Key.ApplicationTermsOfUse, saneDefaultForAppTermsOfUse);
}
else
{
appTermsOfUse = settingsService.getValueForKey(SettingsServiceBean.Key.ApplicationTermsOfUse, language, saneDefaultForAppTermsOfUse);
}
return appTermsOfUse;
}

Expand Down

0 comments on commit 37faf80

Please sign in to comment.