From 03c242bbc6d1213baa4d3ebb1225147999ff376f Mon Sep 17 00:00:00 2001 From: chenganj Date: Mon, 8 Aug 2022 14:28:23 -0400 Subject: [PATCH 1/7] license internationalization - first commit --- .../iq/dataverse/dataset/DatasetUtil.java | 31 +++++++++++++++---- .../java/propertyFiles/License.properties | 2 ++ .../migration/V4.13.0.1__3575-usernames.sql | 2 +- ...16.0.1__5303-addColumn-to-settingTable.sql | 6 +--- src/main/webapp/dataset-license-terms.xhtml | 4 +-- .../webapp/datasetLicenseInfoFragment.xhtml | 4 +-- 6 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 src/main/java/propertyFiles/License.properties diff --git a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java index ccf947b8868..c6fc207163c 100644 --- a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java @@ -24,12 +24,8 @@ import java.nio.channels.FileChannel; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import java.util.logging.Logger; -import java.util.Base64; -import java.util.HashMap; -import java.util.Map; import javax.imageio.ImageIO; import org.apache.commons.io.IOUtils; import static edu.harvard.iq.dataverse.dataaccess.DataAccess.getStorageIO; @@ -566,7 +562,30 @@ public static String getLicenseIcon(DatasetVersion dsv) { public static String getLicenseDescription(DatasetVersion dsv) { License license = dsv.getTermsOfUseAndAccess().getLicense(); - return license != null ? license.getShortDescription() : BundleUtil.getStringFromBundle("license.custom.description"); + + if (license != null) { + return getLocalizedLicenseDescription(license.getName()) ; + } else { + return BundleUtil.getStringFromBundle("license.custom.description"); + } + } + + public static String getLocalizedLicenseDescription(String licenseName) { + String key = "license." + licenseName.toLowerCase().replace(" ","_") + ".description"; + if (key != null) { + try { + String _description = BundleUtil.getStringFromPropertyFile(key, "License"); + if (_description == null) { + return BundleUtil.getStringFromBundle("license.custom.description"); + } else { + return _description; + } + } catch (MissingResourceException mre) { + return BundleUtil.getStringFromBundle("license.custom.description"); + } + } else { + return BundleUtil.getStringFromBundle("license.custom.description"); + } } public static String getLocaleExternalStatus(String status) { diff --git a/src/main/java/propertyFiles/License.properties b/src/main/java/propertyFiles/License.properties new file mode 100644 index 00000000000..f6def616a04 --- /dev/null +++ b/src/main/java/propertyFiles/License.properties @@ -0,0 +1,2 @@ +license.cc0_1.0.description=Creative Commons CC0 1.0 Universal Public Domain Dedication. +license.cc_by_4.0.description=Creative Commons Attribution 4.0 International License. \ No newline at end of file diff --git a/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql b/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql index 0b1804bdfc4..9e35623c455 100644 --- a/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql +++ b/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql @@ -1 +1 @@ -CREATE UNIQUE INDEX index_authenticateduser_lower_useridentifier ON authenticateduser (lower(useridentifier)); +CREATE UNIQUE INDEX IF NOT EXISTS index_authenticateduser_lower_useridentifier ON authenticateduser (lower(useridentifier)); diff --git a/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql b/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql index 8309dacf486..db08efdab7e 100644 --- a/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql +++ b/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql @@ -4,10 +4,6 @@ ALTER TABLE setting ADD COLUMN IF NOT EXISTS ID SERIAL PRIMARY KEY; ALTER TABLE setting ADD COLUMN IF NOT EXISTS lang text; -ALTER TABLE setting - ADD CONSTRAINT non_empty_lang - CHECK (lang <> ''); - -CREATE UNIQUE INDEX unique_settings +CREATE UNIQUE INDEX IF NOT EXISTS unique_settings ON setting (name, coalesce(lang, '')); diff --git a/src/main/webapp/dataset-license-terms.xhtml b/src/main/webapp/dataset-license-terms.xhtml index 38f1f38e7d6..b81fed8a6d7 100644 --- a/src/main/webapp/dataset-license-terms.xhtml +++ b/src/main/webapp/dataset-license-terms.xhtml @@ -55,8 +55,8 @@

- - #{termsOfUseAndAccess.license.name} + + #{termsOfUseAndAccess.license.name}

diff --git a/src/main/webapp/datasetLicenseInfoFragment.xhtml b/src/main/webapp/datasetLicenseInfoFragment.xhtml index 554a3d95abf..e5d10c745dd 100644 --- a/src/main/webapp/datasetLicenseInfoFragment.xhtml +++ b/src/main/webapp/datasetLicenseInfoFragment.xhtml @@ -30,12 +30,12 @@ xmlns:jsf="http://xmlns.jcp.org/jsf">
+ jsf:rendered="#{!empty DatasetUtil:getLocalizedLicenseDescription(DatasetPage.workingVersion.termsOfUseAndAccess.license.name)} }">
- +
From b7ea43047fce4491284b12b1ae7403fc248b6f05 Mon Sep 17 00:00:00 2001 From: chenganj Date: Mon, 26 Sep 2022 16:02:16 -0400 Subject: [PATCH 2/7] license internationalization --- .../edu/harvard/iq/dataverse/dataset/DatasetUtil.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java index 16ea09919af..2db20377169 100644 --- a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java @@ -25,12 +25,8 @@ import java.nio.channels.FileChannel; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import java.util.logging.Logger; -import java.util.Base64; -import java.util.HashMap; -import java.util.Map; import javax.imageio.ImageIO; import org.apache.commons.io.IOUtils; import static edu.harvard.iq.dataverse.dataaccess.DataAccess.getStorageIO; @@ -577,8 +573,6 @@ public static String getLicenseIcon(DatasetVersion dsv) { public static String getLicenseDescription(DatasetVersion dsv) { License license = DatasetUtil.getLicense(dsv); - return license != null ? license.getShortDescription() : BundleUtil.getStringFromBundle("license.custom.description"); - License license = dsv.getTermsOfUseAndAccess().getLicense(); if (license != null) { return getLocalizedLicenseDescription(license.getName()) ; From c2f9c58e9fdd623a711d652d434de76466600f7e Mon Sep 17 00:00:00 2001 From: chenganj Date: Fri, 14 Oct 2022 10:48:41 -0400 Subject: [PATCH 3/7] license name translation --- .../iq/dataverse/dataset/DatasetUtil.java | 31 +++++++++++++------ .../java/propertyFiles/License.properties | 4 ++- src/main/webapp/dataset-license-terms.xhtml | 6 ++-- .../webapp/datasetLicenseInfoFragment.xhtml | 6 ++-- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java index 2db20377169..31e45aebf18 100644 --- a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java @@ -575,27 +575,38 @@ public static String getLicenseDescription(DatasetVersion dsv) { License license = DatasetUtil.getLicense(dsv); if (license != null) { - return getLocalizedLicenseDescription(license.getName()) ; + return getLocalizedLicense(license.getName(),"description") ; } else { return BundleUtil.getStringFromBundle("license.custom.description"); } } - public static String getLocalizedLicenseDescription(String licenseName) { - String key = "license." + licenseName.toLowerCase().replace(" ","_") + ".description"; - if (key != null) { + public static String getLocalizedLicense(String licenseName,String keyPart) { + String key = "license." + licenseName.toLowerCase().replace(" ", "_") + "." + keyPart; + + String second_key = ""; + if (keyPart == "description") + { + second_key = "license.custom.description"; + } + else + { + second_key = "license.custom"; + } + + if (key != null) { try { - String _description = BundleUtil.getStringFromPropertyFile(key, "License"); - if (_description == null) { - return BundleUtil.getStringFromBundle("license.custom.description"); + String propertyValue = BundleUtil.getStringFromPropertyFile(key, "License"); + if (propertyValue == null) { + return BundleUtil.getStringFromBundle(second_key); } else { - return _description; + return propertyValue; } } catch (MissingResourceException mre) { - return BundleUtil.getStringFromBundle("license.custom.description"); + return BundleUtil.getStringFromBundle(second_key); } } else { - return BundleUtil.getStringFromBundle("license.custom.description"); + return BundleUtil.getStringFromBundle(second_key); } } diff --git a/src/main/java/propertyFiles/License.properties b/src/main/java/propertyFiles/License.properties index f6def616a04..2347fed9db6 100644 --- a/src/main/java/propertyFiles/License.properties +++ b/src/main/java/propertyFiles/License.properties @@ -1,2 +1,4 @@ license.cc0_1.0.description=Creative Commons CC0 1.0 Universal Public Domain Dedication. -license.cc_by_4.0.description=Creative Commons Attribution 4.0 International License. \ No newline at end of file +license.cc_by_4.0.description=Creative Commons Attribution 4.0 International License. +license.cc0_1.0.name=CC0 1.0 +license.cc_by_4.0.name=CC-BY 4.0 diff --git a/src/main/webapp/dataset-license-terms.xhtml b/src/main/webapp/dataset-license-terms.xhtml index 3669d199283..429dee9b14a 100644 --- a/src/main/webapp/dataset-license-terms.xhtml +++ b/src/main/webapp/dataset-license-terms.xhtml @@ -46,7 +46,7 @@

+ var="license" itemLabel="#{DatasetUtil:getLocalizedLicense(license.name, 'name')}" itemValue="#{license}"/> @@ -55,8 +55,8 @@

- - #{termsOfUseAndAccess.license.name} + + #{termsOfUseAndAccess.license.name}

diff --git a/src/main/webapp/datasetLicenseInfoFragment.xhtml b/src/main/webapp/datasetLicenseInfoFragment.xhtml index e5d10c745dd..797d20b8a25 100644 --- a/src/main/webapp/datasetLicenseInfoFragment.xhtml +++ b/src/main/webapp/datasetLicenseInfoFragment.xhtml @@ -30,12 +30,12 @@ xmlns:jsf="http://xmlns.jcp.org/jsf">
+ jsf:rendered="#{!empty DatasetUtil:getLocalizedLicense(DatasetPage.workingVersion.termsOfUseAndAccess.license.name,'description')} }">
- +
@@ -121,4 +121,4 @@ xmlns:jsf="http://xmlns.jcp.org/jsf"> - \ No newline at end of file + From aa321f3769e53c7b1c65e2f82c7f2bd26bb78b61 Mon Sep 17 00:00:00 2001 From: chenganj Date: Wed, 2 Nov 2022 12:38:23 -0400 Subject: [PATCH 4/7] handled class cast exception --- .../iq/dataverse/dataset/DatasetUtil.java | 42 ++++++------------- .../migration/V4.13.0.1__3575-usernames.sql | 2 +- ...16.0.1__5303-addColumn-to-settingTable.sql | 6 ++- src/main/webapp/dataset-license-terms.xhtml | 6 +-- .../webapp/datasetLicenseInfoFragment.xhtml | 4 +- 5 files changed, 24 insertions(+), 36 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java index 31e45aebf18..75cde7b4bd9 100644 --- a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java @@ -547,7 +547,7 @@ public static License getLicense(DatasetVersion dsv) { public static String getLicenseName(DatasetVersion dsv) { License license = DatasetUtil.getLicense(dsv); - return license != null ? license.getName() + return license != null ? getLocalizedLicenseDetails(license.getName(),".name") : BundleUtil.getStringFromBundle("license.custom"); } @@ -573,41 +573,25 @@ public static String getLicenseIcon(DatasetVersion dsv) { public static String getLicenseDescription(DatasetVersion dsv) { License license = DatasetUtil.getLicense(dsv); - - if (license != null) { - return getLocalizedLicense(license.getName(),"description") ; - } else { - return BundleUtil.getStringFromBundle("license.custom.description"); - } + return license != null ? getLocalizedLicenseDetails(license.getName(),".description") : BundleUtil.getStringFromBundle("license.custom.description"); } - public static String getLocalizedLicense(String licenseName,String keyPart) { - String key = "license." + licenseName.toLowerCase().replace(" ", "_") + "." + keyPart; + public static String getLocalizedLicenseDetails(String licenseName,String keyPart) { + String key = "license." + licenseName.toLowerCase().replace(" ", "_") + keyPart; - String second_key = ""; - if (keyPart == "description") - { - second_key = "license.custom.description"; + String localizedLicenseValue = "" ; + try { + localizedLicenseValue = BundleUtil.getStringFromPropertyFile(key, "License"); } - else - { - second_key = "license.custom"; + catch (Exception e) { + localizedLicenseValue = licenseName.toLowerCase(); } - if (key != null) { - try { - String propertyValue = BundleUtil.getStringFromPropertyFile(key, "License"); - if (propertyValue == null) { - return BundleUtil.getStringFromBundle(second_key); - } else { - return propertyValue; - } - } catch (MissingResourceException mre) { - return BundleUtil.getStringFromBundle(second_key); - } - } else { - return BundleUtil.getStringFromBundle(second_key); + if (localizedLicenseValue == null) { + localizedLicenseValue = licenseName.toLowerCase() ; } + return localizedLicenseValue; + } public static String getLocaleExternalStatus(String status) { diff --git a/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql b/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql index 9e35623c455..0b1804bdfc4 100644 --- a/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql +++ b/src/main/resources/db/migration/V4.13.0.1__3575-usernames.sql @@ -1 +1 @@ -CREATE UNIQUE INDEX IF NOT EXISTS index_authenticateduser_lower_useridentifier ON authenticateduser (lower(useridentifier)); +CREATE UNIQUE INDEX index_authenticateduser_lower_useridentifier ON authenticateduser (lower(useridentifier)); diff --git a/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql b/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql index db08efdab7e..8309dacf486 100644 --- a/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql +++ b/src/main/resources/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql @@ -4,6 +4,10 @@ ALTER TABLE setting ADD COLUMN IF NOT EXISTS ID SERIAL PRIMARY KEY; ALTER TABLE setting ADD COLUMN IF NOT EXISTS lang text; -CREATE UNIQUE INDEX IF NOT EXISTS unique_settings +ALTER TABLE setting + ADD CONSTRAINT non_empty_lang + CHECK (lang <> ''); + +CREATE UNIQUE INDEX unique_settings ON setting (name, coalesce(lang, '')); diff --git a/src/main/webapp/dataset-license-terms.xhtml b/src/main/webapp/dataset-license-terms.xhtml index 429dee9b14a..760f39d7170 100644 --- a/src/main/webapp/dataset-license-terms.xhtml +++ b/src/main/webapp/dataset-license-terms.xhtml @@ -46,7 +46,7 @@

+ var="license" itemLabel="#{DatasetUtil:getLocalizedLicenseDetails(license.name, '.name')}" itemValue="#{license}"/> @@ -55,8 +55,8 @@

- - #{termsOfUseAndAccess.license.name} + + #{DatasetUtil:getLocalizedLicenseDetails(termsOfUseAndAccess.license.name,'.name')}

diff --git a/src/main/webapp/datasetLicenseInfoFragment.xhtml b/src/main/webapp/datasetLicenseInfoFragment.xhtml index 797d20b8a25..e7a393a8ae7 100644 --- a/src/main/webapp/datasetLicenseInfoFragment.xhtml +++ b/src/main/webapp/datasetLicenseInfoFragment.xhtml @@ -30,12 +30,12 @@ xmlns:jsf="http://xmlns.jcp.org/jsf">
+ jsf:rendered="#{!empty DatasetUtil:getLocalizedLicenseDetails(DatasetPage.workingVersion.termsOfUseAndAccess.license.name,'.description')} }">
- +
From e068cabe90effe55e3078101dc85e91de2310eff Mon Sep 17 00:00:00 2001 From: chenganj Date: Thu, 3 Nov 2022 11:38:08 -0400 Subject: [PATCH 5/7] correction --- .../java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java index 75cde7b4bd9..fecfdc2bcfb 100644 --- a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java @@ -584,11 +584,11 @@ public static String getLocalizedLicenseDetails(String licenseName,String keyPar localizedLicenseValue = BundleUtil.getStringFromPropertyFile(key, "License"); } catch (Exception e) { - localizedLicenseValue = licenseName.toLowerCase(); + localizedLicenseValue = licenseName; } if (localizedLicenseValue == null) { - localizedLicenseValue = licenseName.toLowerCase() ; + localizedLicenseValue = licenseName ; } return localizedLicenseValue; From 57dd54ae807d0d30d83b5d5a6064ab79c820f46c Mon Sep 17 00:00:00 2001 From: chenganj Date: Thu, 3 Nov 2022 12:00:55 -0400 Subject: [PATCH 6/7] added additional doc --- doc/sphinx-guides/source/installation/config.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/sphinx-guides/source/installation/config.rst b/doc/sphinx-guides/source/installation/config.rst index 3cdac253cb3..d2ef3a165cf 100644 --- a/doc/sphinx-guides/source/installation/config.rst +++ b/doc/sphinx-guides/source/installation/config.rst @@ -1044,6 +1044,14 @@ On a new Dataverse installation, users may select from the following licenses or (Note that existing Dataverse installations which are upgraded from 5.9 or previous will only offer CC0 1.0, added automatically during the upgrade to version 5.10.) +If the Dataverse Installation supports multiple languages, the license name/description translations should be added to the ``License`` properties files. (See :ref:`i18n` for more on properties files and internationalization in general.) +To create the key, the license name has to be converted to lowercase, replace space with underscore. + +Example:: + + license.cc0_1.0.description=Creative Commons CC0 1.0 Universal Public Domain Dedication. + license.cc0_1.0.name=CC0 1.0 + You have a lot of control over which licenses and terms are available. You can remove licenses and add new ones. You can decide which license is the default. You can remove "Custom Dataset Terms" as a option. You can remove all licenses and make "Custom Dataset Terms" the only option. Before making changes, you are encouraged to read the :ref:`license-terms` section of the User Guide about why CC0 is the default and what the "Custom Dataset Terms" option allows. From 7dce7d72a8a70eea7279f540c32fbb84bb3a0319 Mon Sep 17 00:00:00 2001 From: chenganj Date: Tue, 8 Nov 2022 12:39:46 -0500 Subject: [PATCH 7/7] refactored --- .../iq/dataverse/dataset/DatasetUtil.java | 18 ++++++++++++------ src/main/webapp/dataset-license-terms.xhtml | 6 +++--- .../webapp/datasetLicenseInfoFragment.xhtml | 4 ++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java index fecfdc2bcfb..f1785a42098 100644 --- a/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/dataset/DatasetUtil.java @@ -39,6 +39,7 @@ import static edu.harvard.iq.dataverse.util.json.NullSafeJsonBuilder.jsonObjectBuilder; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.EnumUtils; public class DatasetUtil { @@ -547,7 +548,7 @@ public static License getLicense(DatasetVersion dsv) { public static String getLicenseName(DatasetVersion dsv) { License license = DatasetUtil.getLicense(dsv); - return license != null ? getLocalizedLicenseDetails(license.getName(),".name") + return license != null ? getLocalizedLicenseDetails(license,"NAME") : BundleUtil.getStringFromBundle("license.custom"); } @@ -573,15 +574,21 @@ public static String getLicenseIcon(DatasetVersion dsv) { public static String getLicenseDescription(DatasetVersion dsv) { License license = DatasetUtil.getLicense(dsv); - return license != null ? getLocalizedLicenseDetails(license.getName(),".description") : BundleUtil.getStringFromBundle("license.custom.description"); + return license != null ? getLocalizedLicenseDetails(license,"DESCRIPTION") : BundleUtil.getStringFromBundle("license.custom.description"); } - public static String getLocalizedLicenseDetails(String licenseName,String keyPart) { - String key = "license." + licenseName.toLowerCase().replace(" ", "_") + keyPart; + public enum LicenseOption { + NAME, DESCRIPTION + }; + public static String getLocalizedLicenseDetails(License license,String keyPart) { + String licenseName = license.getName(); String localizedLicenseValue = "" ; try { - localizedLicenseValue = BundleUtil.getStringFromPropertyFile(key, "License"); + if (EnumUtils.isValidEnum(LicenseOption.class, keyPart ) ){ + String key = "license." + licenseName.toLowerCase().replace(" ", "_") + "." + keyPart.toLowerCase(); + localizedLicenseValue = BundleUtil.getStringFromPropertyFile(key, "License"); + } } catch (Exception e) { localizedLicenseValue = licenseName; @@ -591,7 +598,6 @@ public static String getLocalizedLicenseDetails(String licenseName,String keyPar localizedLicenseValue = licenseName ; } return localizedLicenseValue; - } public static String getLocaleExternalStatus(String status) { diff --git a/src/main/webapp/dataset-license-terms.xhtml b/src/main/webapp/dataset-license-terms.xhtml index 760f39d7170..8b5c86b9c1c 100644 --- a/src/main/webapp/dataset-license-terms.xhtml +++ b/src/main/webapp/dataset-license-terms.xhtml @@ -46,7 +46,7 @@

+ var="license" itemLabel="#{DatasetUtil:getLocalizedLicenseDetails(license, 'NAME')}" itemValue="#{license}"/> @@ -55,8 +55,8 @@

- - #{DatasetUtil:getLocalizedLicenseDetails(termsOfUseAndAccess.license.name,'.name')} + + #{DatasetUtil:getLocalizedLicenseDetails(termsOfUseAndAccess.license,'NAME')}

diff --git a/src/main/webapp/datasetLicenseInfoFragment.xhtml b/src/main/webapp/datasetLicenseInfoFragment.xhtml index e7a393a8ae7..257f6b3b12f 100644 --- a/src/main/webapp/datasetLicenseInfoFragment.xhtml +++ b/src/main/webapp/datasetLicenseInfoFragment.xhtml @@ -30,12 +30,12 @@ xmlns:jsf="http://xmlns.jcp.org/jsf">
+ jsf:rendered="#{!empty DatasetUtil:getLocalizedLicenseDetails(DatasetPage.workingVersion.termsOfUseAndAccess.license,'DESCRIPTION')} }">
- +