-

Browse

+

<%= t('browse') %>

<%= t('ontologies.intro').html_safe %> <%= link_to(Rails.configuration.settings.links[:help_ontology_browse], id: 'ontology-browse-help', @@ -19,27 +19,27 @@

- Welcome admin
This coloring indicates admin-only features + <%= t('ontologies.welcome_admin') %>
<%= t('ontologies.admin_help') %>
-

Debug Info

- types: {{facets.types.active}}
- artifacts: {{facets.artifacts.active}}
- formats: {{facets.formats.active}}
- groups: {{facets.groups.active}}
- categories: {{facets.categories.active}}
- Selected ontologies: {{visible_ont_count}} +

<%= t('ontologies.debug_info') %>

+ <%= t('types') %>: {{facets.types.active}}
+ <%= t('artifacts') %>: {{facets.artifacts.active}}
+ <%= t('formats') %>: {{facets.formats.active}}
+ <%= t('groups') %>: {{facets.groups.active}}
+ <%= t('categories') %>: {{facets.categories.active}}
+ <%= t('selected_ontologies') %>: {{visible_ont_count}}
<%if session[:user].nil?%> - Submit New Ontology + <%= t('ontologies.submit_new_ontology') %> <%else%> - Submit New Ontology + <%= t('ontologies.submit_new_ontology') %> <%end%> @@ -47,7 +47,7 @@ Retrieve the attr value in browse_attributes and set it in the @ontologies in app/controllers/ontologies_controller.rb Define possibles values for the attr in config/enforced_attribute_values.rb-->
-

Entry Type

+

<%= t('ontologies.entry_type') %>

@@ -61,7 +61,7 @@
-

Uploaded in the Last

+

<%= t('ontologies.uploaded_in_the_last') %>

@@ -84,7 +84,7 @@
-

Group

+

<%= t('group') %>

@@ -96,7 +96,7 @@
-

Format

+

<%= t('format') %>

@@ -108,7 +108,7 @@
-

Ontology Content

+

<%= t('ontology_content') %>

@@ -120,7 +120,7 @@
-

Natural Language

+

<%= t('natural_language') %>

-

Formality Levels

+

<%= t('formality_levels') %>

-

Is of Type

+

<%= t('is_of_type') %>

-

Missing Status

+

<%= t('missing_status') %>

- - - - - - + + + + + + - - - - + + + +
-

No matches!

+

<%= t('no_matches') %>

-
VIEW
+
<%= t('view') %>

{{$index}} @@ -215,37 +215,37 @@

{{ontology.description | descriptionToText}}

- Uploaded: {{ontology.creationDate | date:'shortDate'}} + <%= t('uploaded') %>: {{ontology.creationDate | date:'shortDate'}} - Format: {{ontology.format}} + <%= t('format') %>: {{ontology.format}} - View of:
{{ontology.viewOfOnt.acronym}} + <%= t('view_of') %>: {{ontology.viewOfOnt.acronym}} - Summary Only + <%= t('summary_only') %> - Groups: {{groupAcronyms(ontology.groups).join(', ')}} + <%= t('groups') %>: {{groupAcronyms(ontology.groups).join(', ')}} - Categories: {{categoryNames(ontology.categories).join(', ')}} + <%= t('categories') %>: {{categoryNames(ontology.categories).join(', ')}} - Admins: {{adminUsernames(ontology.administeredBy).join(', ')}} + <%= t('admins') %>: {{adminUsernames(ontology.administeredBy).join(', ')}} Pull URL - Status: {{ontology.submissionStatusFormatted}} + <%= t('status') %>: {{ontology.submissionStatusFormatted}}
- No submissions available + <%= t('no_submissions_available') %>

@@ -255,7 +255,7 @@
-
FAIR score
+
<%= t('fair_score') %>
{{ontology.fairScore}}
@@ -264,7 +264,7 @@
-
classes
+
<%= t('classes') %>
{{ontology.class_count_formatted}}
@@ -282,7 +282,7 @@
-
projects
+
<%= t('projects') %>
{{ontology.projects.length}}
@@ -291,7 +291,7 @@
-
notes
+
<%= t('notes') %>
{{ontology.notes.length}}
diff --git a/app/views/ontologies/concepts_browsers/_collections_picker.html.haml b/app/views/ontologies/concepts_browsers/_collections_picker.html.haml index 098d547b7..bd2f1b935 100644 --- a/app/views/ontologies/concepts_browsers/_collections_picker.html.haml +++ b/app/views/ontologies/concepts_browsers/_collections_picker.html.haml @@ -7,6 +7,6 @@ .form-group %label{:for => id} Collections %div - = select_tag(:collections,options_for_select(collections_labels.map{|s| [s["prefLabel"], s["@id"], {'data-color': s['color']}]}, selected_collection.map{|x| x["@id"]}), + = select_tag(:collections,options_for_select(collections_labels.map{|s| [s["prefLabel"].last, s["@id"], {'data-color': s['color']}]}, selected_collection.map{|x| x["@id"]}), { multiple: multiple, id: id, class:"form-control", include_blank: true, data:{controller:'chosen', 'chosen-name-value': :collection_id}.merge(data)}) \ No newline at end of file diff --git a/app/views/ontologies/concepts_browsers/_concepts_list.html.haml b/app/views/ontologies/concepts_browsers/_concepts_list.html.haml index 07d48f680..f6d49f174 100644 --- a/app/views/ontologies/concepts_browsers/_concepts_list.html.haml +++ b/app/views/ontologies/concepts_browsers/_concepts_list.html.haml @@ -1,6 +1,6 @@ %div{data:{controller: 'turbo-frame', 'turbo-frame': { - 'url-value': "/ajax/classes/list?ontology_id=#{@ontology.acronym}", + 'url-value': "/ajax/classes/list?ontology_id=#{@ontology.acronym}&language=#{request_lang}", 'place-holder-value': "Please select a collection to display" }}} %div.pb-2 diff --git a/app/views/ontologies/concepts_browsers/_concepts_tree.html.haml b/app/views/ontologies/concepts_browsers/_concepts_tree.html.haml index ba96119b0..efdc33b34 100644 --- a/app/views/ontologies/concepts_browsers/_concepts_tree.html.haml +++ b/app/views/ontologies/concepts_browsers/_concepts_tree.html.haml @@ -1,4 +1,4 @@ -%div{data:{controller: 'skos-collection-colors turbo-frame history', +%div{data:{controller: 'skos-collection-colors turbo-frame', 'skos-collection-colors': {'collections-color-select-target-value': 'collection-color-filter'}, 'turbo-frame': { 'url-value': "/ajax/classes/treeview?ontology=#{@ontology.acronym}&conceptid=root", @@ -22,5 +22,5 @@ Missing roots for #{@ontology.acronym} - else = render TurboFrameComponent.new(id: 'concepts_tree_view', - src: "/ajax/classes/treeview?ontology=#{@ontology.acronym}&conceptid=#{escape(@concept.id)}&concept_schemes=#{params[:concept_schemes]}&auto_click=false", - data: {'turbo-frame-target': 'frame'}) \ No newline at end of file + src: "/ajax/classes/treeview?ontology=#{@ontology.acronym}&conceptid=#{escape(@concept.id)}&concept_schemes=#{params[:concept_schemes]}&auto_click=false&language=#{request_lang}", + data: {'turbo-frame-target': 'frame'}) diff --git a/app/views/ontologies/concepts_browsers/_scheme_picker.html.haml b/app/views/ontologies/concepts_browsers/_scheme_picker.html.haml index ca3131e1b..958807977 100644 --- a/app/views/ontologies/concepts_browsers/_scheme_picker.html.haml +++ b/app/views/ontologies/concepts_browsers/_scheme_picker.html.haml @@ -10,7 +10,7 @@ %label{:for => "schemes_select"} Schemes %div = select_tag(:concept_schemes, - options_for_select(schemes_labels.map{|s| [s["prefLabel"], s["@id"]]}, selected_scheme.compact.map{|x| x["@id"]} ), + options_for_select(schemes_labels.map{|s| [s["prefLabel"].last, s["@id"]]}, selected_scheme.compact.map{|x| x["@id"]} ), {multiple: true, id: "schemes_select", data:{controller:'chosen', 'chosen-name-value': :concept_schemes, action: 'changed->history#updateURL changed->turbo-frame#updateFrame'}}) diff --git a/app/views/ontologies/sections/_collections.html.haml b/app/views/ontologies/sections/_collections.html.haml index 3ddd1d27d..aaa22ddcc 100644 --- a/app/views/ontologies/sections/_collections.html.haml +++ b/app/views/ontologies/sections/_collections.html.haml @@ -1,4 +1,4 @@ -= turbo_frame_tag 'collections' do += render TurboFrameComponent.new(id: "collections", data: {"turbo-frame-target": "frame"} ) do - if no_collections? = no_collections_alert - else diff --git a/app/views/ontologies/sections/_metadata.html.haml b/app/views/ontologies/sections/_metadata.html.haml index 46c942e61..655e20bf1 100644 --- a/app/views/ontologies/sections/_metadata.html.haml +++ b/app/views/ontologies/sections/_metadata.html.haml @@ -2,21 +2,21 @@ %div.ont-metadata -# Details pane %section.ont-metadata-card.ont-details-card - %header.pb-2.font-weight-bold Details + %header.pb-2.font-weight-bold= t('ontology_details.metadata.details') %table.table.table-sm %tr - %td Acronym + %td= t('ontology_details.metadata.acronym') %td= @ontology.acronym %tr - %td Visibility + %td= t('ontology_details.metadata.visibility') %td= strip_links(visibility_link(@ontology)) - if @ontology.viewing_restricted? %tr - %td Viewing restriction + %td= t('ontology_details.metadata.viewing_restriction') %td= @ontology.viewingRestriction.capitalize - unless @ontology.viewOf.nil? %tr - %td View of ontology + %td= t('ontology_details.metadata.view_of_ontology') %td - ont_parent_acronym = @ontology.viewOf.split('/').last - if $PURL_ENABLED @@ -26,32 +26,32 @@ = link_to(ont_parent_acronym, ont_url) - unless @submission_latest.nil? %tr - %td Description + %td= t('ontology_details.metadata.description') %td= sanitize(@submission_latest.description) %tr - %td Status + %td= t('ontology_details.metadata.status') %td= @submission_latest.status.capitalize unless @submission_latest.status.nil? %tr - %td Format + %td= t('ontology_details.metadata.format') %td= @submission_latest.hasOntologyLanguage %tr - %td Contact + %td= t('ontology_details.metadata.contact') %td= raw @submission_latest.contact.map {|c| [c.name, c.email].join(", ") if c.member?(:name) && c.member?(:email)}.join("
") - categories_hash = LinkedData::Client::Models::Category.all_to_hash - categories = @ontology.hasDomain - unless categories.empty? %tr - %td Categories + %td= t('ontology_details.metadata.categories') %td= categories.map {|c| categories_hash[c].name}.sort.join(", ") - groups_hash = LinkedData::Client::Models::Group.all_to_hash - groups = @ontology.group - unless groups.empty? %tr - %td Groups + %td= t('ontology_details.metadata.groups') %td= groups.map {|g| groups_hash[g].name}.sort.join(", ") - if @ontology.admin?(session[:user]) %tr - %td Pull URL + %td= t('ontology_details.metadata.pull_url') %td = link_to @submission_latest.pullLocation, @submission_latest.pullLocation = raw additional_details @@ -61,31 +61,31 @@ -# Submissions pane %section.ont-metadata-card.ont-subs-card %div.ont-section-toolbar - %header.pb-2.font-weight-bold Submissions + %header.pb-2.font-weight-bold= t('ontology_details.metadata.submissions') - if @ontology.admin?(session[:user]) - = link_to(new_ontology_submission_path(@ontology.acronym), "aria-label": "Add submission", title: "Add submission") do + = link_to(new_ontology_submission_path(@ontology.acronym), "aria-label": t('ontology_details.metadata.add_submission'), title: t('ontology_details.metadata.add_submission')) do %i.fas.fa-lg.fa-plus-circle{"aria-hidden": "true", style: "margin-left: 0.75rem;"} - unless (@submission_latest.nil? || (@submission_latest.respond_to?(:status) && @submission_latest.status == 404)) - = link_to(edit_ontology_submission_path(@ontology.acronym, @submission_latest.submissionId), "aria-label": "Edit latest submission", title: "Edit latest submission") do + = link_to(edit_ontology_submission_path(@ontology.acronym, @submission_latest.submissionId), "aria-label": t('ontology_details.metadata.edit_latest_submission'), title: t('ontology_details.metadata.edit_latest_submission')) do %i.fas.fa-user-edit{"aria-hidden": "true", style: "margin-left: 0.5rem;"} - = render TurboFrameComponent.new(id: 'ontology_submissions', src: ontology_submissions_path(@ontology.acronym)) + = render TurboFrameComponent.new(id: 'ontology_submissions', src: ontology_submissions_path(@ontology.acronym), target: '_top') -# Views pane (don't show if the ontology is a view - we don't allow views of views). - unless @ontology.view? %section.ont-metadata-card.ont-views-card %div.ont-section-toolbar - %header.pb-2.font-weight-bold= "Views of #{@ontology.acronym}" + %header.pb-2.font-weight-bold= "#{t('ontology_details.metadata.views_of')} #{@ontology.acronym}" - ont_id_esc = CGI.escape(@ontology.id) -# TODO: I don't think we should have brackets in the URL parameters. - if session[:user].nil? - %a{href: "/login?redirect=#{escape("/ontologies/new?ontology[viewOf]=#{ont_id_esc}")}", "aria-label": "Create new view", title: "Create new view"} + %a{href: "/login?redirect=#{escape("/ontologies/new?ontology[viewOf]=#{ont_id_esc}")}", "aria-label": t('ontology_details.metadata.create_new_view'), title: t('ontology_details.metadata.create_new_view')} %i.fas.fa-lg.fa-plus-circle{"aria-hidden": "true", style: "margin-left: 0.5rem;"} - else %a{href: "/ontologies/new?ontology[viewOf]=#{ont_id_esc}"} %i.fas.fa-lg.fa-plus-circle{"aria-hidden": "true", style: "margin-left: 0.5rem;"} - if @views.empty? - %p.font-italic= "No views of #{@ontology.acronym} available" + %p.font-italic= t('ontology_details.metadata.no_views_of', name: @ontology.acronym) - else %div.border-top %dl @@ -98,20 +98,20 @@ -# Misc links pane %section.ont-metadata-card.ont-links-card %div.ont-section-toolbar - %header.pb-2.font-weight-bold Links - %a{:href => "#{(@submission_latest || @ontology).id}?display=all", :target => '_blank', :class => "btn btn-primary"} Go to the REST API JSON entry + %header.pb-2.font-weight-bold= t('ontology_details.metadata.links') + %a{:href => "#{(@submission_latest || @ontology).id}?display=all", :target => '_blank', :class => "btn btn-primary"}= t('ontology_details.metadata.go_to_rest_api_json_entry') -# Metadata links pane %section.ont-metadata-card.ont-metadatalinks-card %div.ont-section-toolbar - %header.pb-2.font-weight-bold Get my metadata back + %header.pb-2.font-weight-bold= t('ontology_details.metadata.get_my_metadata_back') %div - unless @submission_latest.nil? %div{data:{controller: 'metadata-downloader'}} =javascript_include_tag "jsonld" - %button{:id => "getMetadataBackNquadsBtn", :class => "btn btn-primary", 'data-action': 'metadata-downloader#downloadNQuads'} N-Triple - %button{:id => "getMetadataBackJsonldBtn", :class => "btn btn-primary", 'data-action': 'metadata-downloader#downloadJsonLd'} Json-LD - %button{:id => "getMetadataBackXmlBtn", :class => "btn btn-primary", 'data-action': 'metadata-downloader#downloadXML'} RDF/XML + %button{:id => "getMetadataBackNquadsBtn", :class => "btn btn-primary", 'data-action': 'metadata-downloader#downloadNQuads'}= t('ontology_details.metadata.n_triple') + %button{:id => "getMetadataBackJsonldBtn", :class => "btn btn-primary", 'data-action': 'metadata-downloader#downloadJsonLd'}= t('ontology_details.metadata.json_ld') + %button{:id => "getMetadataBackXmlBtn", :class => "btn btn-primary", 'data-action': 'metadata-downloader#downloadXML'}= t('ontology_details.metadata.rdf_xml') -# Listener in bp_ontology_viewer.js.erb -# Fair score pane -# TODO temporary hide fairness_service for AGROVOC after there demand @@ -126,46 +126,46 @@ -# Metrics pane %section.ont-metadata-card.ont-metrics-card %div.ont-section-toolbar - %header.pb-2.font-weight-bold Metrics - = link_to(Rails.configuration.settings.links[:metrics], target: "_blank", "aria-label": "View individual metrics definitions", title: "View individual metrics definitions") do + %header.pb-2.font-weight-bold= t('ontology_details.metadata.metrics') + = link_to(Rails.configuration.settings.links[:metrics], target: "_blank", "aria-label": t('ontology_details.metadata.view_individual_metrics_definitions'), title: t('ontology_details.metadata.view_individual_metrics_definitions')) do %i.fas.fa-lg.fa-question-circle{"aria-hidden": "true", style: "margin-left: 0.5rem"} - if @metrics.nil? || (@metrics.is_a?(Array) && @metrics.empty?) || (@metrics.respond_to?(:status) && @metrics.status == 404) - %p.font-italic= "We have not yet calculated metrics for #{@ontology.acronym}" + %p.font-italic= "#{t('ontology_details.metadata.metrics_not_calculated_yet')} #{@ontology.acronym}" - else %table.table.table-sm %tr - %td Classes + %td= t('ontology_details.metadata.classes') %td{style: "text-align: right"}= number_with_delimiter(@metrics.classes) %tr - %td Individuals + %td= t('ontology_details.metadata.individuals') %td= number_with_delimiter(@metrics.individuals) %tr - %td Properties + %td= t('ontology_details.metadata.properties') %td= number_with_delimiter(@metrics.properties) %tr - %td Maximum depth + %td= t('ontology_details.metadata.max_depth') %td= number_with_delimiter(@metrics.maxDepth) %tr - %td Maximum number of children + %td= t('ontology_details.metadata.max_children') %td= number_with_delimiter(@metrics.maxChildCount) %tr - %td Average number of children + %td= t('ontology_details.metadata.avg_children') %td= number_with_delimiter(@metrics.averageChildCount) %tr - %td Classes with a single child + %td= t('ontology_details.metadata.single_child_classes') %td= number_with_delimiter(@metrics.classesWithOneChild) %tr - %td Classes with more than 25 children + %td= t('ontology_details.metadata.many_children_classes') %td= number_with_delimiter(@metrics.classesWithMoreThan25Children) %tr - %td Classes with no definition + %td= t('ontology_details.metadata.no_definition_classes') %td= number_with_delimiter(@metrics.classesWithNoDefinition) -# Visits pane %section.ont-metadata-card.ont-analytics-card %div.ont-section-toolbar - %header.pb-2.font-weight-bold Visits + %header.pb-2.font-weight-bold= t('ontology_details.metadata.visits') - if visits_data(@ontology) - = link_to(@ontology.links["analytics"] + "?apikey=#{get_apikey}&format=csv", "aria-label": "Download as CSV", title: "Download as CSV") do + = link_to(@ontology.links["analytics"] + "?apikey=#{get_apikey}&format=csv", "aria-label": t('ontology_details.metadata.download_as_csv'), title: t('ontology_details.metadata.download_as_csv')) do %i.fas.fa-lg.fa-download{"aria-hidden": "true", style: "margin-left: 0.5rem"} = render partial: "visits" @@ -177,11 +177,11 @@ -# Projects pane %section.ont-metadata-card.ont-projects-card %div.ont-section-toolbar - %header.pb-2.font-weight-bold= "Projects using #{@ontology.acronym}" - = link_to(new_project_path(), "aria-label": "Create new project", title: "Create new project") do + %header.pb-2.font-weight-bold= "#{t('ontology_details.metadata.projects_using')} #{@ontology.acronym}" + = link_to(new_project_path(), "aria-label": t('ontology_details.metadata.create_new_project'), title: t('ontology_details.metadata.create_new_project')) do %i.fas.fa-lg.fa-plus-circle{"aria-hidden": "true", style: "margin-left: 0.5rem"} - if @projects.empty? - %p.font-italic= "No projects using #{@ontology.acronym}" + %p.font-italic= "#{t('ontology_details.metadata.no_projects_using')} #{@ontology.acronym}" - else %div.border-top - for project in @projects diff --git a/app/views/ontologies/sections/_schemes.html.haml b/app/views/ontologies/sections/_schemes.html.haml index 5387f37a1..ca791df44 100644 --- a/app/views/ontologies/sections/_schemes.html.haml +++ b/app/views/ontologies/sections/_schemes.html.haml @@ -1,4 +1,4 @@ -= turbo_frame_tag 'schemes' do += render TurboFrameComponent.new(id: "schemes", data: {"turbo-frame-target": "frame"} ) do %div.ont-schemes{data:{controller: 'container-splitter'}} %div#schemesTree{data:{'container-splitter-target': 'container'}} - if no_schemes? diff --git a/app/views/ontologies/sections/properties.html.haml b/app/views/ontologies/sections/properties.html.haml index dc3f796fa..8aae0a9e3 100644 --- a/app/views/ontologies/sections/properties.html.haml +++ b/app/views/ontologies/sections/properties.html.haml @@ -5,7 +5,7 @@ :plain