diff --git a/build.gradle b/build.gradle index ef50c376..201c9b61 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { } } -version "3.0.9" +version "3.0.10" group "au.org.ala.plugins.grails" apply plugin:"eclipse" @@ -88,7 +88,7 @@ dependencies { if(!inplace) { compile "au.org.ala.plugins.grails:images-client-plugin:1.2", noCache - compile "au.org.ala.plugins.grails:ala-charts-plugin:2.0.1", noCache + compile "au.org.ala.plugins.grails:ala-charts-plugin:2.1.2", noCache } } diff --git a/grails-app/assets/javascripts/search.js b/grails-app/assets/javascripts/search.js index 76213eed..e877ed78 100644 --- a/grails-app/assets/javascripts/search.js +++ b/grails-app/assets/javascripts/search.js @@ -234,7 +234,9 @@ $(document).ready(function() { $.getJSON(jsonUri, function(data) { // use HTML template, see http://stackoverflow.com/a/1091493/249327 var speciesPageUri = BC_CONF.bieWebappUrl + "/species/" + lsid; - var speciesPageLink = "view species page"; + var speciesPageLinkTitle = jQuery.i18n.prop("search.species.view.title"); + var speciesPageLinkDesc = jQuery.i18n.prop("search.species.view.desc"); + var speciesPageLink = "" + speciesPageLinkDesc + ""; $clone.find('a.btn').text(nameString).attr("href", speciesPageUri); $clone.find('.nameString').text(nameString); $clone.find('.speciesPageLink').html(speciesPageLink); diff --git a/grails-app/controllers/au/org/ala/biocache/hubs/OccurrenceController.groovy b/grails-app/controllers/au/org/ala/biocache/hubs/OccurrenceController.groovy index 36156b53..d55cde4e 100644 --- a/grails-app/controllers/au/org/ala/biocache/hubs/OccurrenceController.groovy +++ b/grails-app/controllers/au/org/ala/biocache/hubs/OccurrenceController.groovy @@ -396,7 +396,7 @@ class OccurrenceController { Boolean userHasRoleAdmin = false // Check (optionally comma-separated) list of authorise.roles - if we get `true` then stop checking - grailsApplication.config.getProperty('authorise.roles', String).tokenize(',').each { + grailsApplication.config.getProperty('authorise.roles', String, "").tokenize(',').each { !userHasRoleAdmin ? userHasRoleAdmin = authService?.userInRole( it ) : null } diff --git a/grails-app/i18n/messages_en.properties b/grails-app/i18n/messages_en.properties index 43a90872..7ae31697 100644 --- a/grails-app/i18n/messages_en.properties +++ b/grails-app/i18n/messages_en.properties @@ -88,6 +88,7 @@ advancedsearch.table10col02.des = (YYYY-MM-DD) leave blank for most recent recor advancedsearch.dataset.col.label = Data Resource advancedsearch.dataset.select.default = -- select a Data Resource -- advancedsearch.button.submit = Search +advancedsearch.button.clear.all=Clear all home.index.taxaupload.des01 = Enter a list of taxon names/scientific names, one name per line (common names not currently supported). home.index.taxaupload.button01 = Search home.index.catalogupload.des01 = Enter a list of catalogue numbers (one number per line). @@ -335,7 +336,10 @@ list.sandbox.reloadData.label=Reload data list.sandbox.reloadData.tooltip=Reload data for temporary data resource eya.title01 = Explore Your Area -eya.title02 = Atlas of Living Australia +# Commented because is not used now and to avoid confusion +# eya.title02 = Atlas of Living Australia +# See: +# https://github.com/search?q=org%3AAtlasOfLivingAustralia+eya.title02&type=Code eya.breadcrumb.navigator01 = Home eya.breadcrumb.navigator02 = Locations eya.breadcrumb.navigator03 = Your Area @@ -363,7 +367,7 @@ eya.maptips.01 = Tips eya.maptips.02 = you can fine-tune the location of the area by dragging the blue marker icon download.download.title = Downloads -download.termsofusedownload.01 = By downloading this content you are agreeing to use it in accordance with the Atlas of Living Australia +download.termsofusedownload.01.param = By downloading this content you are agreeing to use it in accordance with the {0} download.termsofusedownload.02 = Terms of Use download.termsofusedownload.03 = and any Data Provider Terms associated with the data download. download.termsofusedownload.04 = Please provide the following details before downloading (* required) @@ -430,7 +434,7 @@ recordcore.div.addtionalproperties.title = Additional properties recordcore.occurenceevent.title = Event map.spatialportal.btn.label = View in spatial portal -map.spatialportal.btn.title = Continue analysis in ALA Spatial Portal +map.spatialportal.btn.title.param = Continue analysis in {0} Spatial Portal map.spatialportal.redirect.title = Warning map.spatialportal.redirect.content = Please be aware that Data Quality filters will not be applied when records are viewed in Spatial Portal. map.spatialportal.redirect.btn.cancel.label = Cancel @@ -514,7 +518,10 @@ generic.navbar02.li01 = Home generic.navbar02.li02 = About generic.navbar02.li03 = Contact generic.footer.link01 = This site is licensed under a -generic.footer.link02 = Creative Commons Attribution 3.0 Australia License +# Commented because is not used now and to avoid confusion +# generic.footer.link02 = Creative Commons Attribution 3.0 Australia License +# See: +# https://github.com/search?q=org%3AAtlasOfLivingAustralia+generic.footer.link02&type=code generic.footer.link03 = Provider content may be covered by other generic.footer.link04 = Terms of Use @@ -1187,12 +1194,18 @@ dq.selectmultiple.form.submit = Apply dq.view.excluded = View excluded records dq.excluded.count = records are excluded by this category dq.warning.dataprofile.title = Results filtering with data profiles -dq.warning.dataprofile.content.line1 = Search results are now filtered by default to exclude lower quality records according to the ALA General data profile. Data profiles may be disabled or other data profiles are available via the data profile drop down. +dq.warning.dataprofile.content.line1.param = Search results are now filtered by default to exclude lower quality records according to the {0} General data profile. Data profiles may be disabled or other data profiles are available via the data profile drop down. +dq.warning.dataprofile.content.line2 = Information on the data profiles and the filters used in each data profile is available via the icons. dq.warning.dataprofile.buttonleft.text = Learn More dq.warning.dataprofile.buttonright.text = Got it dq.userpref.defaultprofile = -- Select a profile -- dq.data.profiles.disabled = Data profiles have been disabled for this search dq.warning.failedtosave = Failed to save user preferences. Please try again +dq.disabled = Disabled +dq.click.to.switch.profiles=Click to switch profile +dq.click.to.disable.data.profiles = Click to disable all data profiles +dq.click.to.enable.the.profile.quality.filter = Click to enable the {0} quality filters +quality.filters.excludeCount = records excluded record.compare_table.heading = You are indicating that record.compare_table.source_record.heading = This record record.compare_table.target_record.heading = This record ID provided @@ -1214,7 +1227,9 @@ related.record.reason.explanation.sameoccurrence=This record is a duplicate occu related.record.reason.explanation.tissuesample=This record is a tissue sample of this record: related.record.reason.explanation.splitspecimen=This record is a split specimen of this record: home.index.taxaupload.batchRadioPrefix=Search on: -home.index.taxaupload.batchMode.matched=Matched name (via the ALA taxonomy) +home.index.taxaupload.batchMode.matched.param=Matched name (via the {0} taxonomy) home.index.taxaupload.batchMode.provided=Supplied name (note: is case-sensitive so genus should be capitalised) -advanced.taxon.tooltip.matched=Input names will be matched to their accepted scientific name in the ALA taxonomy. Results will include records for known synonyms +advanced.taxon.tooltip.matched.param=Input names will be matched to their accepted scientific name in the {0} taxonomy. Results will include records for known synonyms advanced.taxon.tooltip.supplied=Input names will only match the scientific name supplied in the original occurrence record. Results will NOT include records for known synonyms. Note: searching is case sensitive. +search.species.view.title = Species page +search.species.view.desc = view species page diff --git a/grails-app/taglib/au/org/ala/biocache/hubs/OccurrenceTagLib.groovy b/grails-app/taglib/au/org/ala/biocache/hubs/OccurrenceTagLib.groovy index 66c0df01..85449c42 100644 --- a/grails-app/taglib/au/org/ala/biocache/hubs/OccurrenceTagLib.groovy +++ b/grails-app/taglib/au/org/ala/biocache/hubs/OccurrenceTagLib.groovy @@ -265,7 +265,7 @@ class OccurrenceTagLib { def facetResult = attrs.facetResult def queryParam = attrs.queryParam def mb = new MarkupBuilder(out) - def linkTitle = "${alatag.message(code:"alatag.filter.results.by")} ${attrs.fieldDisplayName ?: facetResult.fieldName}" + def linkTitle = "${alatag.message(code:"alatag.filter.results.by")} ${attrs.fieldDisplayName ? attrs.fieldDisplayName.uncapitalize(): facetResult.fieldName}" def addCounts = { count -> mb.span(class:"facetCount") { @@ -299,7 +299,11 @@ class OccurrenceTagLib { mkp.yieldUnescaped(" ") } span(class: "facet-item") { - if (fieldResult.i18nCode) { + // If we have a translation, we use it, if not we try to use the label translation + // and if not, directly use the label. If the label is missing, use "unknown" + // In search.js this is done a bit differently: + // https://github.com/AtlasOfLivingAustralia/biocache-hubs/blob/00f263640edd802d10a071f5d09d146eaa24af34/grails-app/assets/javascripts/search.js#L1946 + if (fieldResult.i18nCode && alatag.message(code: fieldResult.i18nCode) != fieldResult.i18nCode ) { mkp.yield(alatag.message(code: fieldResult.i18nCode, default: fieldResult.label)) } else { mkp.yield(alatag.message(code: fieldResult.label ?: 'unknown', default: fieldResult.label)) @@ -497,7 +501,7 @@ class OccurrenceTagLib { mb.tr() { if (i == 0) { td(class:"noStripe", rowspan:"${group.value.length()}") { - b(group.key) + b(g.message(code: "facet.group.${group.key}", default: "${group.key}")) } } td(alatag.databaseFieldName(text: field.name)) diff --git a/grails-app/views/home/_advanced.gsp b/grails-app/views/home/_advanced.gsp index 7873ea4c..a208db51 100644 --- a/grails-app/views/home/_advanced.gsp +++ b/grails-app/views/home/_advanced.gsp @@ -218,9 +218,9 @@ - class="btn btn-primary" /> + " class="btn btn-primary" />    - + " id="clearAll" class="btn btn-default" onclick="$('input#solrQuery').val(''); $('input.clear_taxon').click(); return true;"/> $(document).ready(function() { diff --git a/grails-app/views/home/index.gsp b/grails-app/views/home/index.gsp index 187871b4..879b4b71 100644 --- a/grails-app/views/home/index.gsp +++ b/grails-app/views/home/index.gsp @@ -10,6 +10,7 @@ + @@ -368,13 +369,13 @@ - +
diff --git a/grails-app/views/occurrence/_download.gsp b/grails-app/views/occurrence/_download.gsp index 168c8b96..7fb3a203 100644 --- a/grails-app/views/occurrence/_download.gsp +++ b/grails-app/views/occurrence/_download.gsp @@ -5,6 +5,7 @@ --%> + -    +