-

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/sections/_metadata.html.haml b/app/views/ontologies/sections/_metadata.html.haml index f8711102a..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,12 +61,12 @@ -# 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), target: '_top') @@ -75,17 +75,17 @@ - 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/projects/index.html.haml b/app/views/projects/index.html.haml index 8d89ca399..50668c87a 100644 --- a/app/views/projects/index.html.haml +++ b/app/views/projects/index.html.haml @@ -1,32 +1,32 @@ -- @title = "Project Listing" +- @title = t("projects.title") -#DescriptionDialog{:style => "display: none", :title => "project description"} - %p Description text -%h1.tab_header Projects +#DescriptionDialog{:style => "display: none", :title => t("projects.project_description")} + %p= t("projects.description_text") +%h1.tab_header= t("projects.self") %p.tab_description - = t(".intro", site: "#{$SITE}") - = link_to(help_path(anchor: "Projects_Tab"), id: "projects-help", aria: {label: "View projects help"}) do + = t("projects.index.intro", site: "#{$SITE}") + = link_to(help_path(anchor: "Projects_Tab"), id: "projects-help", aria: {label: t("projects.view_projects_help")}) do %i.fas.fa-question-circle.fa-lg{aria: {hidden: "true"}, style: "margin-left: .25em"} %div{:style => "padding:10px;"} %span - if session[:user].nil? - = button_to "Create New Project", "/login", :method => :get + = button_to t("projects.create_new_project"), "/login", :method => :get - else - = button_to "Create New Project", new_project_path, :method => :get + = button_to t("projects.create_new_project"), new_project_path, :method => :get %br/ %br/ %table#projects.zebra{:cellpadding => "0", :cellspacing => "0"} %thead %tr - %th Project - %th Description - %th Contacts - %th Institutions - %th Ontologies + %th= t("projects.self") + %th= t("projects.description") + %th= t("projects.contacts") + %th= t("projects.institutions") + %th= t("projects.ontologies") - if current_user_admin? - %th User - %th Created + %th= t("projects.creator") + %th= t("projects.created") %tbody - for project in @projects %tr @@ -35,15 +35,15 @@ %strong= link_to(project.name, project_path(project.acronym)) %br/ %span{:style => "font-size:75%; vertical-align:bottom;"} - = link_to("Home Page", project.homePage, target: "_blank", rel: "nofollow") + = link_to(t('projects.home_page'), project.homePage, target: "_blank", rel: "nofollow") %span.ui-icon.ui-icon-extlink{:style => "display: inline-block; vertical-align: text-bottom;"} \   - if session[:user] && (project.creator == session[:user].id || session[:user].admin?) - = link_to("Edit", edit_project_path(project.acronym)) + = link_to(t("projects.edit"), edit_project_path(project.acronym)) / TODO_REV: Enable delete project for admins - if current_user_admin?    - = link_to("Delete (admin only)", project_path(project.acronym), :method => :delete, :confirm => "Are you sure?") + = link_to(t("projects.delete_admin_only"), project_path(project.acronym), :method => :delete, :confirm => t("projects.delete_confirm")) / Project description (may be truncated with a dialog) %td{:style => "vertical-align:top;", :width => "50%"} - if ! project.description.nil? diff --git a/app/views/recommender/index.html.haml b/app/views/recommender/index.html.haml index 7abac68a6..8dddc3846 100644 --- a/app/views/recommender/index.html.haml +++ b/app/views/recommender/index.html.haml @@ -1,6 +1,6 @@ -- @title = "Recommender" +- @title= t('recommender.title') -%h2.mt-5 Ontology Recommender +%h2.mt-5= t('recommender.ontology_recommender') %p = t('recommender.intro').html_safe = link_to(Rails.configuration.settings.links[:help_recommender], id: "recommender-help", @@ -9,54 +9,55 @@ %form = hidden_field_tag :recommender_sample_text, t('recommender.sample_text') - = hidden_field_tag :recommender_sample_keywords, t('recommender.sample_keywords') + = hidden_field_tag :recommender_sample_keywords,t('recommender.sample_keywords') + -# Specify input format - %h5 Input + %h5= t('input') %div.form-check.form-check-inline %input#radioItText.form-check-input{name: "input_type", type: "radio", value: "1", checked: "checked"} - %label.form-check-label{for: "radioItText"} Text + %label.form-check-label{for: "radioItText"}= t('text') %div.form-check.form-check-inline %input#radioItKeywords.form-check-input{name: "input_type", type: "radio", value: "2"} - %label.form-check-label{for: "radioItKeywords"} Keywords (separated by commas) + %label.form-check-label{for: "radioItKeywords"}= t('keywords') + " ( " + t('keywords_separated_by_commas') + " ) " -# Specify output format - %h5.pt-3 Output + %h5.pt-3= t('output') %div.form-check.form-check-inline %input#radioOtSingle.form-check-input{name: "output_type", type: "radio", value: "1", checked: "checked"} - %label.form-check-label{for: "radioOtSingle"} Ontologies + %label.form-check-label{for: "radioOtSingle"}= t('ontologies.self') %div.form-check.form-check-inline %input#radioOtSets.form-check-input{name: "output_type", type: "radio", value: "2"} - %label.form-check-label{for: "radioOtSets"} Ontology sets + %label.form-check-label{for: "radioOtSets"}= t('ontology_sets') -# Input text or keywords %div.form-group.mt-4 - = text_area_tag("inputText", nil, rows: 10, class: "form-control default", placeholder: "Paste a paragraph of text or some keywords to use in calculating ontology recommendations", aria: {describedby: "inputTextHelpBlock"}) + = text_area_tag("inputText", nil, rows: 10, class: "form-control default", placeholder: t('paste_input_text'), aria: {describedby: "inputTextHelpBlock"}) %div.card#inputTextHighlighted %div.card-body %small#inputTextHelpBlock.form-text - %a#insertInputLink{href: "javascript:void(0);"} insert sample input + %a#insertInputLink{href: "javascript:void(0);"}= t('insert_sample_text') - %a#advancedOptionsLink{:href => "javascript:void(0);"} Show advanced options >> + %a#advancedOptionsLink{:href => "javascript:void(0);"}= t('show_advanced_options') + " >>" -# Advanced options %div#advancedOptions.optionsBox -# Specify weights - %h6 Weights configuration + %h6= t('weights_configuration') %div.form-row %div.form-group.col-md-2 - %label{for: "input_wc"} Coverage + %label{for: "input_wc"}= t('coverage') = number_field_tag("input_wc", "0.55", min: "0", step: "1", class: "form-control") %div.form-group.col-md-2 - %label{for: "input_wa"} Acceptance + %label{for: "input_wa"}= t('acceptance') = number_field_tag("input_wa", "0.15", min: "0", step: "1", class: "form-control") %div.form-group.col-md-2 - %label{for: "input_wd"} Knowledge detail + %label{for: "input_wd"}= t('knowledge_detail') = number_field_tag("input_wd", "0.15", min: "0", step: "1", class: "form-control") %div.form-group.col-md-2 - %label{for: "input_ws"} Specialization + %label{for: "input_ws"}= t('specialization') = number_field_tag("input_ws", "0.15", min: "0", step: "1", class: "form-control") -# Specify ontology set size - %h6 Maximum ontologies per set + %h6= t('max_ontologies_per_set') %div.form-row %div.form-group.col-md-2 = number_field_tag("input_max_ontologies", "3", in: 2...5, class: "form-control") @@ -65,7 +66,7 @@ = render(partial: "shared/ontology_picker") %div.my-4 - = submit_tag("Get Recommendations", id: "recommenderButton", type: "button", class: "btn btn-primary") + = submit_tag(t('get_recommendations'), id: "recommenderButton", type: "button", class: "btn btn-primary") = submit_tag("Edit Input", id: "editButton", type: "button", style: "display: none;", class: "btn btn-primary") = content_tag(:span, class: "recommenderSpinner") do = image_tag("spinners/spinner_000000_16px.gif", style: "vertical-align: middle;") @@ -73,34 +74,34 @@ %div.row#recommenderErrorsDisplay.mb-4 %div.col %span.notTextError - Please paste a paragraph of text or some keywords to use in calculating ontology recommendations. + = t('recommender.ontology_recommendation_input') %br/ %span.sumWeightsError - The sum of the weights must be greater than zero. + = t('recommender.weight_sum_greater_than_zero') %br/ %span.rangeWeightsError - All the weights must be greater or equal to zero. + = t('recommender.weights_greater_than_zero') %br/ %span.invalidWeightsError - All the weights must be valid numeric values. + = t('recommender.valid_numeric_weights') %br/ %span.invalidMaxOntError - The maximum ontologies per set must be a valid integer value. + = t('recommender.valid_integer_max_ontologies_per_set') %br/ %span.maxOntologiesError - The maximum ontologies per set must be a number between 2 and 4. + = t('recommender.valid_max_ontologies_per_set_range') %br/ %span.generalError - Problem getting recommendations, please try again. + = t('recommender.recommendation_error') %br/ %span#noResults - No recommendations found. + = t('recommender.no_recommendations') %br/ %span#noResultsSets - There are no ontology sets recommended for the input provided. Please try the "Ontologies" output. + = t('recommender.no_sets_recommended') %br/ %span.inputSizeError - Please use less than 500 words. If you need to annotate larger pieces of text you can use the Recommender Web Service + = t('recommender.text_length_limit') %div.row#resultsDisplay %div.col diff --git a/app/views/search/index.html.haml b/app/views/search/index.html.haml index 5235f869e..653cc05dc 100644 --- a/app/views/search/index.html.haml +++ b/app/views/search/index.html.haml @@ -1,49 +1,49 @@ -- @title = "Search" +- @title = t("search.title") %div.container.mt-5 %h1.display-4 - Class Search + = t("search.class_search") = form_tag("/search", method: "post") do %div.form-group = text_field_tag("search_keywords", nil, class: "form-control", aria: {describedby: "classSearchHelpBlock"}) %small#classSearchHelpBlock.form-text.text-muted - = t(".search_keywords_placeholder") - = link_to("help", Rails.configuration.settings.links[:help_search], id: "search-help", - aria: {label: "View search documentation"}, class: "float-right") + = t("search.index.search_keywords_placeholder") + = link_to(t('help'), Rails.configuration.settings.links[:help_search], id: "search-help", + aria: {label: t('search.view_search_documentation')}, class: "float-right") %div.form-group - = link_to("Show advanced options", "javascript:void(0)", id: "advanced_options", data: {text_swap: "Hide advanced options"}, class: "form-text") + = link_to(t('search.show_advanced_options'), "javascript:void(0)", id: "advanced_options", data: {text_swap: t('search.hide_advanced_options')}, class: "form-text") -# Advanced search options %div#search_options{style: "display: none;"} %div.form-group.row - %div.col-sm-2 Include in search: + %div.col-sm-2= t("search.include_in_search") + ":" %div.col-sm-10 %div.form-check = check_box(:search, :include_properties, class: "form-check-input") - = label(:search, :include_properties, "Property values", class: "form-check-label definition", title: t(".property_definition")) + = label(:search, :include_properties, t('search.property_values'), class: "form-check-label definition", title: t(".property_definition")) %div.form-check = check_box(:search, :include_obsolete, class: "form-check-input") - = label(:search, :include_obsolete, "Obsolete classes", class: "form-check-label definition", title: t(".obsolete_definition")) + = label(:search, :include_obsolete,t('search.obsolete_classes'), class: "form-check-label definition", title: t(".obsolete_definition")) %div.form-check = check_box(:search, :include_views, class: "form-check-input") - = label(:search, :include_views, "Ontology views", class: "form-check-label") + = label(:search, :include_views, t('search.ontology_views'), class: "form-check-label") %div.form-group.row - %div.col-sm-2 Narrow search to: + %div.col-sm-2= t("search.narrow_search_to") + ":" %div.col-sm-10 %div.form-check = check_box(:search, :exact_match, class: "form-check-input") - = label(:search, :exact_match, "Exact matches", class: "form-check-label") + = label(:search, :exact_match, t("exact_matches"), class: "form-check-label") %div.form-check = check_box(:search, :require_definition, class: "form-check-input") - = label(:search, :require_definition, "Classes with definitions", class: "form-check-label") + = label(:search, :require_definition, t("search.classes_with_definitions"), class: "form-check-label") %div.form-group - %h6{style: "font-size: 10pt !important"} Categories - = select(:search, :categories, options_for_select(categories_for_select), {}, style: "width: 432px", multiple: "true", data: {placeholder: t(".categories_placeholder")}) + %h6{style: "font-size: 10pt !important"}= t("search.categories") + = select(:search, :categories, options_for_select(categories_for_select), {}, style: "width: 432px", multiple: "true", data: {placeholder: t("search.index.categories_placeholder")}) %div.form-group.mb-5{style: "width:432px"} - = render :partial => "shared/ontology_picker", locals: {sel_text: "Ontologies"} + = render :partial => "shared/ontology_picker", locals: {sel_text: t("search.ontologies")} - = button_tag("Search", id: "search_button", class: "btn btn-primary") + = button_tag(t('search.title'), id: "search_button", class: "btn btn-primary") = content_tag(:span, id: "search_spinner") do %img{src: asset_path('spinners/spinner_000000_16px.gif'), style: "vertical-align: middle;"} diff --git a/app/views/shared/_concept_picker.html.haml b/app/views/shared/_concept_picker.html.haml index d1b32729a..56e3fe3af 100644 --- a/app/views/shared/_concept_picker.html.haml +++ b/app/views/shared/_concept_picker.html.haml @@ -1,5 +1,5 @@ = text_field_tag(name, concept_label, class: "search_autocomplete form-control", - placeholder: "Start typing to select a class", + placeholder: t('mapping.select_class'), data: {controller: "form-auto-complete", "form-auto-complete-ontology_id-value": ontology_acronym , "form-auto-complete-target_property-value": 'name', diff --git a/app/views/shared/_ontology_picker.html.erb b/app/views/shared/_ontology_picker.html.erb index 9ddd31268..ea646e798 100644 --- a/app/views/shared/_ontology_picker.html.erb +++ b/app/views/shared/_ontology_picker.html.erb @@ -31,17 +31,21 @@ var hideChosenResults = function(){

- <%=sel_text%> + <%=t('select_ontologies_list')%>

- <%=select form_object, form_attribute, options_for_select(@onts_for_select, selected_ontologies), { }, :multiple => 'true', "data-placeholder".to_sym => "Start typing to select ontologies or leave blank to use all", :style => "width: 432px;" %> + <%=select form_object, form_attribute, options_for_select(@onts_for_select, selected_ontologies), { }, :multiple => 'true', "data-placeholder".to_sym => t("select_ontologies"), :style => "width: 432px;" %>
<%=render_advanced_picker(custom_ontologies, selected_ontologies)%> diff --git a/config/application.rb b/config/application.rb index f13cb361a..b4796ac09 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,6 +11,11 @@ class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 + # permitted locales available for the application + config.i18n.available_locales = [:en, :fr] + config.i18n.default_locale = :en + + # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files diff --git a/config/locales/en.rb.sample b/config/locales/en.rb.sample deleted file mode 100644 index 56e0ccd50..000000000 --- a/config/locales/en.rb.sample +++ /dev/null @@ -1,112 +0,0 @@ -{ - :en => { - :home => { - :intro => 'Use ' + $SITE + ' to access and share ontologies. You can create ontology-based - annotations for your own text , link your own project that uses ontologies to the - description of those ontologies , find and create relations between terms in - different ontologies, review and comment on ontologies and their components as you - browse them. Sign in to ' + $SITE + ' - to submit a new ontology or ontology-based project, provide comments on ontologies or add ontology mappings.', - - :facebook_button => '', - - :twitter_button => '', - - :annotate => { - :intro => 'The ' + $ORG_SITE + ' Annotator processes text submitted by users, recognizes relevant ontology terms in the text and returns - the annotations to the user. Use the interface below to submit sample text to get ontology-based annotations. Hover the mouse pointer on any - button to see what it does. Click on the (?) to see a detailed help panel. -

- Subscribe to the NCBO Annotator Users Google group to learn more about - who and how the Annotator is being used in different projects.' - }, - - :resources => { - :intro => $ORG + ' is building a system for automated ontology-based annotation and indexing of data. We process the textual metadata of diverse elements of resources - to annotate and index them with terms from appropriate ontologies. Use the interface below to search the resulting index of annotations and to identify - data resources annotated with particular ontology terms.' - }, - - :footer => 'Powered by NCBO BioPortal   - Release Notes' - }, - - :projects => { - :intro => 'Browse the ontology-based projects in the community: Each project description is linked to ' + $ORG_SITE + ' ontologies that the project uses. - Use the ‘Add Project’ link to add your ontology-based project to this list and to link it to ' + $ORG_SITE + ' ontologies. - Your project will then appear on the pages that list the details for the ontologies that you selected. We also invite you to review ontologies that you used in your project.' - }, - - :ontologies => { - :intro => 'Access all ontologies that are available in ' + $ORG_SITE + ': - You can filter this list by category to display ontologies relevant for a certain domain. - You can also filter ontologies that belong to a certain group. Subscribe to the ' + $ORG_SITE + ' RSS feed - to receive alerts for submissions of new ontologies, new versions of ontologies, new notes, and new projects. You can subscribe to feeds for a specific ontology at - the individual ontology page. Add a new ontology to ' + $ORG_SITE + ' using the Submit New Ontology link (you need to sign in - to see this link).', - - :metrics => { - :intro => '' + $SITE + ' calculates the metrics on the salient properties of the ontology, including statistics and quality-control - and quality-assurance metrics. Each ontology may have all, some, or no values filled in for its metrics and only metrics - for the most recent version are reflected. The metrics currently do not distinguish between the terms defined directly in - this ontology and imported terms (for OWL) or referenced terms (for OBO). - See metrics descriptions.' - } - }, - - :mappings => { - :intro => 'Use this page to explore mappings between ontologies that you are interested in. You will also see the mappings when you browse individual ontologies.' - }, - - :about => { - :welcome => 'Welcome to the National Center for Biomedical Ontology’s BioPortal. BioPortal is a Web-based application for accessing and sharing biomedical ontologies.', - :getting_started => $SITE + ' allows users to browse, upload, download, search, comment on, and create mappings for ontologies.', - :browse => ' -

- Users can browse and explore individual ontologies by navigating either a tree structure or an animated graphical view. Users can also view mappings and ontology metadata, and download ontologies. -

-

- Additionally, users who are signed in may also submit a new ontology to the library. All submissions to the library are reviewed. -

', - :announce_list => 'To receive notices of new ' + $SITE + ' releases or site outages, please email ' + $SUPPORT_EMAIL, - :release_notes => '' - }, - - :most_viewed_date => 'March, 2012', - - :most_viewed => - ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OntologyViews
', - - :stats => - '' - } -} diff --git a/config/locales/en.yml b/config/locales/en.yml index b37ebbb55..7c24d4b33 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -57,92 +57,396 @@ en: no_appliance_id_for_comparison: couldn't be validated. Unable to retrieve virtual appliance ID. appliance_id_mismatch: is an appliance ID mismatch - admin: - licenses: - create: - success: License successfully renewed! + recognizer: "Entity recognition" - date: - formats: - year_month_day_concise: '%Y-%m-%d' # 2017-03-01 - month_day_year: '%b %-d, %Y' # Mar 1, 2017 - monthfull_day_year: '%B %-d, %Y' # March 1, 2017 + enter_paste_text_to_annotate: "Enter or paste the text to annotate:" - layouts: - footer: - copyright_html: Copyright © 2005‑2022, The Board of Trustees of Leland Stanford Junior University. All rights reserved. - grant_html: > - %{site} is currently being developed within French ANR D2KAB project (ANR-18-CE23-0017). It also receives or received support from ANR SIFR project (ANR-12-JS02-0010), European Union H2020-MSCA SIFRm project (No 701771), the NUMEV Labex (ANR-10-LABX-20), the IBC of Montpellier project (ANR-11-BINF0002), the Agro Labex (ANR-10-LABX-0001) as well as from University of Montpellier and the CNRS. - notices: - license_contact: > - For more information, email support@ontoportal.org or - visit https://ontoportal.org/licensing. - license_obtain: > - If you are the owner of this OntoPortal installation, you can visit - https://license.ontoportal.org to obtain a license. - license_expired: > - We're sorry, but the license for this OntoPortal installation has expired. If you are the owner of this OntoPortal installation, - please visit https://license.ontoportal.org to renew your license. - license_trial: - one: - This installation of the OntoPortal Appliance is a trial license, which will expire in 1 day. - other: - This installation of the OntoPortal Appliance is a trial license, which will expire in %{count} days. + show_advanced_options: "Show advanced options" + insert_sample_text: "Insert sample text" + match_longest_only: "Match longest only" + match_partial_words: "Match partial words" + include_mappings: "Include mappings" + exclude_numbers: "Exclude numbers" + exclude_synonyms: "Exclude synonyms" + select_ontologies: "Start typing to select ontologies or leave blank to use all ontologies" + select_ontologies_list: "Select ontologies" + + umls: + semantic: "UMLS Semantic" + semantic_types: "UMLS Semantic Types" + semantic_groups: "UMLS Semantic Groups" + + nbco_annotatosplus: + index: + title: "NCBO Annotator +" + intro: > + The NCBO Annotator+ is a proxy calling the NCBO Annotator web service on the NCBO BioPortal. +

+ Tchechmedjiev, A., Abdaoui, A., Emonet, V., Melzi, S., Jonnagaddala, J., & Jonquet, C. (2018). Enhanced features for annotating and indexing clinical text with NCBO Annotator+. Bioinformatics, 34(11), 1962-1965. +

+ If you are using the API, please provide a valid NCBO BioPortal API key and access the service at http://services.bioportal.lirmm. en/ncbo_annotatorplus
+ Text submitted to NCBO Annotator+ must be in English. + sample_text: Melanoma is a malignant tumor of melanocytes found mainly in the skin but also in the intestine and the eye. + + search: + title: "Search" + class_search: "Class Search" + show_advanced_options: "Show Advanced Options" + hide_advanced_options: "Hide Advanced Options" + view_search_documentation: "View Search Documentation" + include_in_search: "Include in Search" + narrow_search_to: "Narrow Search to" + categories: "Categories" + property_values: "Property Values" + obsolete_classes: "Obsolete Classes" + ontology_views: "Ontology Views" + exact_matches: "Exact Matches" + classes_with_definitions: "Classes with Definitions" + ontologies: "Ontologies" + index: + intro: "Search for a class across multiple ontologies" + search_keywords_placeholder: "Enter a class, e.g. Melanoma" + categories_placeholder: "Start typing to select categories or leave blank to use all" + property_definition: "A named association between two entities. Examples are 'definition' (a relationship between a class and text) and 'part of' (a relationship between two classes)." + obsolete_definition: > + A class that the ontology authors have flagged as obsolete and recommend not to use. These classes are often left in ontologies (rather than being deleted entirely) so that existing systems that depend on them continue to function." + + projects: + projects: + title: "Projects List" + project_description: "Project Description" + description_text: "Description Text" + view_projects_help: "View Projects Help" + create_new_project: "Create New Project" + + self: "Projects" + description: "Description" + contacts: "Contacts" + institutions: "Institutions" + ontologies: "Ontologies" + creator: "User" + created: "Created" + home_page: "Home Page" + edit: "Edit" + delete_admin_only: "Delete (admin only)" + delete_confirm: "Are you sure?" + + index: + intro: "Browse a selection of projects that use %{site} resources" + + landscape: + title: "%{site} Landscape" + intro: Visualize data retrieved from ontologies stored in the portal + groups_and_categories: Groups and Categories + ontologies_by: "Ontologies by %{type}" + ontologies_count_by_catalog: Number of ontologies in each data catalog + properties_use: Property Usage + properties_usage_proportion: The proportion of properties usage among stored ontologies + ontologies_languages: Natural languages of ontologies + ontologies_licenses: Licenses used by ontologies + ontology_tools: Most used tools to build ontologies + more_properties_charts: More properties charts + ontology_properties_pie_charts: Pie charts for the properties used in ontologies + owl_ontology_preflabel_uris: URIs for prefLabel properties used for OWL ontologies + owl_ontology_synonym_uris: URIs for synonym properties used for OWL ontologies + owl_ontology_definition_uris: URIs for definition properties used for OWL ontologies + owl_ontology_author_uris: URIs for author properties used for OWL ontologies + ontology_types: Ontology types + ontology_formality_levels: Formality levels of ontologies + ontologies_formats: Format used + ontologies_contributors: Contributors to ontology development + most_active_people: Most active people + most_mentioned_people: Most mentioned people as contact, creator, contributor or curator + most_active_organizations: Most active organizations + funding_endorsing_organizations: Organizations funding and endorsing the most ontologies + ontologies_activity_on: "Ontology Activity on %{site}" + most_active_people_as_reviewer: "Most active people as reviewers" + most_mentioned_people_as_reviewer: People who published notes, reviews, and projects + most_active_ontologies: "Most active ontologies" + ontologies_with_notes_reviews_projects: "Ontologies with notes, reviews, and projects" + ontology_relations_network: "Ontology Relations Network" + relations_between_stored_ontologies: "Relations between stored ontologies in the portal" + filter_network: "Filter network" + ontology_fairness_evaluator: "Ontology FAIRness Evaluator (O’FAIRe)" + average_metrics: "Average metrics" + group: Group + category: Category + size: Size home: + find_ontology: "Find an ontology" + search_class: "Search Class" + browse_by_group: "Browse by Group" + browse_ontologies: "Browse ontologies" + comprehensive_repository: "the most comprehensive repository of biomedical ontologies in the world" + advanced_search: "Advanced Search" + ontology_visits: "Ontology visits" + fair_scores: "FAIR Scores" + clear_selection: "Clear Selection" + latest_notes: "Latest Notes" + ontologies: "Ontologies" + classes: "Classes" + individuals: "People" + projects: "Projects" + users: "Users" + no_recent_notes: "No recent notes were submitted" + supported_by: "Supported by" + with_collaboration: "With the collaboration of" index: - find_ontology_placeholder: Start typing ontology name, then choose from list - query_placeholder: Enter a class, e.g. Melanoma + find_ontology_placeholder: Start typing the ontology name, then choose from + query_placeholder: Enter a class, eg Melanoma tagline: the world's most comprehensive repository of biomedical ontologies - title: Welcome to the %{organization} - welcome: Welcome to %{site}, + title: Welcome to the %{organization} + welcome: Welcome to the %{site}, help: - welcome: Welcome to the National Center for Biomedical Ontology’s %{site}. %{site} is a web-based application for accessing and sharing biomedical ontologies. + welcome: Welcome to the %{site} of the National Center for Biomedical Ontology. %{site} is a web application for accessing and sharing biomedical ontologies. getting_started: > - %{site} allows users to browse, upload, download, search, comment on, and create mappings for ontologies. + %{site} allows users to browse, upload, download, search, comment, and create mappings for ontologies. browse: > - Users can browse and explore individual ontologies by navigating either a tree structure or an animated graphical view. Users can also view mappings and - ontology metadata, and download ontologies. Additionally, users who are signed in may submit a new ontology to the library. - rest_examples_html: View documentation and examples of the %{site} REST API. + Users can browse and explore individual ontologies by navigating either in a tree structure or in an animated graphical view. Users can also view mappings and + ontology metadata and ontology download. Additionally, logged in users can submit a new ontology to the library. + rest_examples_html: View documentation and examples for the %{site} REST API. announce_list_html: > - To receive notices of new releases or site outages, please subscribe to the - bioontology-support list. + To receive notices of new releases or site outages, please subscribe to + bioontology support list. + + recommend: + intro: Get recommendations for the most relevant ontologies from an excerpt of a biomedical text or a list of keywords + title: "recommender" + ontology_recommender: "Ontology Recommender" + ontology_recommendation_input: "Please paste a paragraph of text or some keywords to compute ontology recommendations." + weight_sum_greater_than_zero: "The sum of weights must be greater than zero" + weights_greater_than_zero: "All weights must be greater than or equal to zero" + valid_numeric_weights: "All weights must be valid numeric values" + valid_integer_max_ontologies_per_set: "Max ontologies per set must be a valid integer value" + valid_max_ontologies_per_set_range: "Max ontologies per set must be a number between 2 and 4" + recommendation_error: "Problem retrieving recommendations, please try again" + no_recommendations: "No recommendations found" + no_sets_recommended: "There are no recommended ontology sets for the provided input. Please try the 'Ontologies' output." + text_length_limit: "Please use less than 500 words. If you need to annotate longer pieces of text, you can use the recommendation web service." + + mappings: + title: "Correspondences" + upload_mappings: "Upload mappings" + mappings_bulk_load: "Mapping Bulk Load" + intro: "Browse mappings between classes of different ontologies" + no_mappings_available: "No mappings available" + loading_mappings: "Loading mappings..." + find_mappings: "Find mappings of a class/concept" + view_mappings_help: "View mappings help" + select_class: "Start typing to select a class" + select_ontologies: "Start typing to select ontologies or leave blank to use all ontologies" + select_semantic_types: "Select UMLS semantic types" + select_semantic_types_help: "Start typing to select UMLS semantic types or leave blank to use all types" + select_semantic_groups: "Select UMLS semantic groups" + select_semantic_groups_help: "Start typing to select UMLS semantic groups or leave blank to use all groups" + include_ancestors_up_to_level: "Include ancestors up to level" + include_score: "Include score" annotator: + title: "Annotator" + get_annotator: "Get annotations" + filters: + match_longest_only: "Match longest only" + match_partial_words: "Recognize partial words" + include_mappings: "Include Mappings" + exclude_numbers: "Exclude Numbers" + exclude_synonyms: "Exclude synonyms" + max_hierarchy_level: "Include ancestors up to level" + score: "Include score" + score_help: "Score annotations following previous NCBO 2009 measure (old) or Score annotations following C-Value measure (cvalue) or Score annotations following C-Value measure with hierarchy expansion (cvalueh)" + score_threshold: "Filter by score threshold" + score_threshold_help: "Specify minimum score value for annotations" + confidence_threshold: "Filter Confidence Threshold" + confidence_threshold_help: "Specify the minimum position in the score distribution (between 1 and 100)" + recognizer recognizer: "entity recognition tool" + start_typing_to_select: "Start typing to select %{type} or leave blank to use all" + select: "Select %{name}" + enter_or_paste_text: "Enter or paste text to annotate" + fast_context: "FastContext" + lemmatize: "Lemmatize" + annotations_result: "Annotations" + results_filtered_by: "Results are filtered by" + + umls: + semantic_types: "UMLS Semantic Types" + semantic_groups: "UMLS Semantic Groups" index: - intro: Get annotations for biomedical text with classes from the ontologies - annotatorplus_html: Check out AnnotatorPlus beta; a new version of the Annotator with added support for negation, and more! + intro: Get annotations for biomedical text with ontology classes + annotatorplus_html: Check out the beta version of AnnotatorPlus; a new version of the Annotator with added support for negation, and more! fast_context: - tooltip: "Enable FastContext to detect : if a concept has been negated (affirmed, negated), who experienced the found concept (patient, other), when the annotated concept occurred (recent, historical, hypothetical), and/or if the annotated concept is uncertain (certain, uncertain)." - sample_text: Melanoma is a malignant tumor of melanocytes which are found predominantly in skin but also in the bowel and the eye. + tooltip: "Enable FastContext to detect: if a concept was denied (affirmed, denied), who experienced the found concept (patient, other), when the annotated concept occurred (recent, historical, hypothetical), and/ or if the annotated concept is uncertain (certain, uncertain)." + lemmatize: + tooltip: "Enable Lemmatize to lemmatize submitted text and use a lemmatized dictionary for annotations" + sample_text: Melanoma is a malignant tumor of melanocytes found mainly in the skin but also in the intestine and the eye. - nbco_annotatosplus: - index: - intro: > - The NCBO Annotator+ is a proxy calling the NCBO Annotator Web service on the NCBO BioPortal. -

- Tchechmedjiev, A., Abdaoui, A., Emonet, V., Melzi, S., Jonnagaddala, J., & Jonquet, C. (2018). Enhanced functionalities for annotating and indexing clinical text with the NCBO Annotator+. Bioinformatics, 34(11), 1962-1965. -

- If using the API, please provide a valid NCBO BioPortal apikey and hit the service at http://services.bioportal.lirmm.fr/ncbo_annotatorplus
- Text submitted to the NCBO Annotator+ must be in English. - sample_text: Melanoma is a malignant tumor of melanocytes which are found predominantly in skin but also in the bowel and the eye. + ontology_details: + header: + last_uploaded: "Last uploaded:" + sections: + summary: "Summary" + concepts: "Concepts" + classes: "Classes" + properties: "Properties" + notes: "Notes" + mappings: "Mappings" + schemes: "Schemes" + collections: "Collections" + widgets: "Widgets" + metadata: + details: "Details" + acronym: "Acronym" + visibility: "Visibility" + viewing_restriction: "Viewing Restriction" + view_of_ontology: "View of ontology" + description: "Description" + status: "Status" + format: "Format" + contact: "Contact" + categories: "Categories" + groups: "Groups" + pull_url: "Pull URL" + submissions: "Submissions" + links: "Links" + add_submission: "Add Submission" + views_of: "Views of" + create_new_view: "Create a new view" + no_views_of: "No views of %{name} available" + go_to_rest_api_json_entry: "Go to REST API JSON Entry" + get_my_metadata_back: "Get my metadata back" + n_triple: "N-Triple" + json_ld: "JSON-LD" + rdf_xml: "RDF/XML" + view_individual_metrics_definitions: "View individual metrics definitions" + metrics: "Metrics" + metrics_not_calculated_yet: "We have not yet calculated metrics for" + classes: "Classes" + individuals: "Individuals" + properties: "Properties" + max_depth: "Maximum depth" + max_children: "Maximum number of children" + avg_children: "Average number of children" + single_child_classes: "Classes with a single child" + many_children_classes: "Classes with more than 25 children" + no_definition_classes: "Classes without definition" + visits: "Visits" + download_as_csv: "Download as CSV" + projects_using: "Projects Using" + no_projects_using: "No projects are using" + create_new_project: "Create a new project" + additional_metadata: "Additional Metadata" - recommender: - intro: Get recommendations for the most relevant ontologies based on an excerpt from a biomedical text or a list of keywords + layout: + header: + browse: "Browse" + search: "Search" + mappings: "Mappings" + recommend: "Recommend" + annotator: "Annotator" + ncbo_annotator_plus: "NCBO Annotator+" + projects: "Projects" + landscape: "Landscape" + login: "Login" + account_setting: "Account Settings" + submit_feedback: "Send Feedback" + help: "Help" + release_notes: "Release Notes" + publications: "Publications" + footer: + products: Products + ontoportal: OntoPortal + release_notes: Release Notes + api: API + sparql: SPARQL + support: Support + contact_us: Contact Us + wiki: Wiki + documentation: Documentation + agreements: Agreements + terms: Terms + privacy_policy: Privacy Policy + cite_us: Cite Us + acknowledgments: Acknowledgments + about: About + about_us: About Us + projects: Projects + team: Team + copyright_html: Copyright © 2005-2022, Leland Stanford Junior University Board of Trustees. All rights reserved. + grant_html: > + %{site} is currently being developed as part of the ANR D2KAB project (ANR-18-CE23-0017). It receives or has also received support from the ANR SIFR project (ANR-12-JS02-0010), European Union Project H2020-MSCA SIFRm (N° 701771), the Labex NUMEV (ANR-10-LABX-20), the Montpellier IBC project (ANR-11 -BINF0002) , the Agro Labex (ANR-10-LABX-0001) as well than the University of Montpellier and the CNRS. + notes: + license_contact: > + For more information, email support@ontoportal.org or + visit https://ontoportal.org/licensing. + license_obtain: > + If you are the owner of this OntoPortal installation, you can visit + https://license.ontoportal.org to obtain a license. + license_expired: > + We're sorry, but the license for this OntoPortal installation has expired. If you are the owner of this OntoPortal installation, + please visit https://license.ontoportal.org to renew your license. + license_trial: + one: This OntoPortal appliance installation is a trial license, which will expire in 1 day. + other: This OntoPortal appliance installation is a trial license, which will expire in %{count} days. + # Other - search: - index: - intro: Search for a class in multiple ontologies - search_keywords_placeholder: Enter a class, e.g. Melanoma - categories_placeholder: Start typing to select categories or leave blank to use all - property_definition: Named association between two entities. Examples are "definition" (a relation between a class and some text) and "part-of" (a relation between two classes). - obsolete_definition: > - A class that the authors of the ontology have flagged as being obsolete and which they recommend that people not use. These classes - are often left in ontologies (rather than removing them entirely) so that existing systems that depend on them will continue to function. + about: > +
+

Summary

+

+ Many vocabularies and ontologies are produced to represent and annotate agronomic data. It is therefore necessary to have a common platform to identify them, host them and use them in agro-informatics applications. The AgroPortal project aims to provide a repository of reference ontologies for agronomy, by reusing the NCBO BioPortal technology. The scientific results and the experience of the biomedical field are thus exploited and transposed in the field of agronomy, including plants, food, the environment and possibly animal sciences. We propose an ontology portal that offers ontology hosting, search, versioning, visualization, commenting, recommendation, allows semantic annotation, as well as storing and exploiting alignments of ontologies. All this in an infrastructure fully compliant with the Semantic Web. The AgroPortal project pays particular attention to meeting the requirements of the agronomic community in terms of ontology formats (e.g. SKOS, trait dictionaries) or supported functionalities. The AgroPortal project is based on five agronomic use cases that participate in the design and orientation of the platform. AgroPortal already offers a robust and stable reference repository, of great value for the field of agronomy. +

+

Use cases

+ +
+

New Features

+

+ See the release-notes +

+
+

Partners

+

The National Center for Biomedical Ontology (NCBO), the Research Institute for Development (IRD), Research Data Alliance (RDA), + Bioversity International, Food & Agriculture Organization (FAO), Global Open Data for Agriculture & Nutrition (Godan Action), National Institute for Agronomic Research (INRA)

+

thanks

+

The AgroPortail is partly produced as part of the Semantic Indexing of French Biomedical Resources project (SIFR) + who have received funding from the EU H2020 research and innovation program under Marie Sklodowska-Curie (grant 701771) + and the National Research Agency (ANR-12-JS02-01001 grant), Labex NUMEV (ANR-10-LABX-20 grant), + the Institute of Computational Biology of Montpellier (grant ANR-11-BINF-0002) as well as by the University of Montpellier and the CNRS. + We also thank the National Center of Biomedical Ontologies for their help and the time spent with us in the deployment of the AgroPortail.

+

Team

+ To contact us: firstname.lastname@lirmm.fr +
    +
  • Clément Jonquet, researcher at LIRMM (Univ. of Montpellier, France), principal investigator of the AgroPortal project
  • +
  • Anne Toulet, researcher at LIRMM (Univ. of Montpellier, France)
  • +
  • Vincent Emonet, engineer at LIRMM (Univ. of Montpellier, France)
  • +
+
- projects: - index: - intro: Browse a selection of projects that use %{site} resources + activaterecord: + errors: + models: + license: + attributes: + encrypted_key: + invalid_license_key: is an invalid license key + no_appliance_id_for_comparison: Could not be validated. Unable to retrieve virtual appliance ID. + appliance_id_mismatch: is an appliance id mismatch + + admin: + licenses: + create: + success: License renewed successfully! + + date: + formats: + year_month_day_concise: "%Y-%m-%d" # 2017-03-01 + month_day_year: "%b %-d, %Y" # Mar 1, 2017 + monthfull_day_year: "%B %-d, %Y" # March 1, 2017 ontologies: intro: Browse the library of ontologies diff --git a/config/locales/fr.yml b/config/locales/fr.yml new file mode 100644 index 000000000..95940640f --- /dev/null +++ b/config/locales/fr.yml @@ -0,0 +1,573 @@ +fr: + nbco_annotatosplus: + score_help: "Annotations de score suivant la mesure NCBO 2009 précédente (ancienne) ou Annotations de score suivant la mesure C-Value (cvalue) ou Annotations de score suivant la mesure C-Value avec expansion de la hiérarchie (cvalueh)" + start_typing_to_select: "Commencez à taper pour sélectionner %{type} ou laissez vide pour tout utiliser" + include_ancestors_up_to_level: "Inclure les ancêtres jusqu'au niveau" + include_score: "Inclure le score" + + recognizer: "Reconnaissance d'entité" + + enter_paste_text_to_annotate: "Entrez ou collez le texte à annoter :" + + show_advanced_options: "Afficher les options avancées" + insert_sample_text: "Insérer un exemple de texte" + match_longest_only: "Correspondance la plus longue seulement" + match_partial_words: "Correspondance de mots partiels" + include_mappings: "Inclure les correspondances" + exclude_numbers: "Exclure les nombres" + exclude_synonyms: "Exclure les synonymes" + select_ontologies: "Commencez à taper pour sélectionner des ontologies ou laissez vide pour utiliser toutes les ontologies" + select_ontologies_list: "Sélectionnez les ontologies" + + umls: + semantic: "sémantique UMLS" + semantic_types: "Types sémantiques UMLS" + semantic_groups: "Groupes sémantiques UMLS" + + select: "Sélectionnez %{name}" + + fast_context: + title: "FastContext" + help: "Activer FastContext pour détecter : si un concept a été nié (affirmé, nié), qui a vécu le concept trouvé (patient, autre), quand le concept annoté s'est produit (récent, historique, hypothétique), et/ou si le concept annoté est incertain (certain, incertain)." + + annotations: "Annotations" + + filters: + by: + filter: "Filtrer" + title: "Les résultats sont filtrés par" + class: "Classe" + ontology: "Ontologie" + match_type: "Type" + match_context: "Contexte" + matched_class: "Classe associée" + matched_ontology: "Ontologie associée" + umls_sem_type: "Type sémantique UMLS" + + score: "Score" + negation: "Négation" + experiencer: "Expérience" + temporality: "Temporalité" + certainty: "Certitude" + + additional_parameters_explained_at: "Des paramètres supplémentaires sont expliqués à la page :" + format_results_as: "Formater les résultats en tant que :" + reproduce_results_using: "Reproduire ces résultats en utilisant le" + match_longest_only: "Correspond le plus long uniquement" + match_partial_words: "Reconnaître des mots partiels" + include_mappings: "Inclure les mappages" + exclude_numbers: "Exclure des numéros" + exclude_synonyms: "Exclure les synonymes" + max_hierarchy_level: "Inclure les ancêtres jusqu'au niveau" + score: "Inclure le score" + score_help: "Annotations de score suivant la mesure NCBO 2009 précédente (ancienne) ou Annotations de score suivant la mesure C-Value (cvalue) ou Annotations de score suivant la mesure C-Value avec expansion de la hiérarchie (cvalueh)" + score_threshold: "Filtrer par seuil de score" + score_threshold_help: "Spécifier la valeur de score minimum pour les annotations" + confidence_threshold: "Seuil de confiance du filtre" + confidence_threshold_help: "Spécifiez la position minimale dans la distribution des scores (entre 1 et 100)" + recognizer de reconnaissance: "outil de reconnaissance d'entité" + + index: + title: "NCBO Annotator +" + intro: > + Le NCBO Annotator+ est un proxy appelant le service Web NCBO Annotator sur le NCBO BioPortal. +

+ Tchechmedjiev, A., Abdaoui, A., Emonet, V., Melzi, S., Jonnagaddala, J., & Jonquet, C. (2018). Fonctionnalités améliorées pour annoter et indexer le texte clinique avec NCBO Annotator+. Bioinformatique, 34(11), 1962-1965. +

+ Si vous utilisez l'API, veuillez fournir une clé API NCBO BioPortal valide et accéder au service sur http://services.bioportal.lirmm.fr/ncbo_annotatorplus
+ Le texte soumis au NCBO Annotator+ doit être en anglais. + sample_text: Le mélanome est une tumeur maligne des mélanocytes qui se trouvent principalement dans la peau mais aussi dans l'intestin et l'œil. + + search: + title: "Rechercher" + class_search: "Recherche de classe" + show_advanced_options: "Afficher les options avancées" + hide_advanced_options: "Masquer les options avancées" + view_search_documentation: "Voir la documentation de recherche" + include_in_search: "Inclure dans la recherche" + narrow_search_to: "Réduire la recherche à" + categories: "Catégories" + property_values: "Valeurs de propriété" + obsolete_classes: "Classes obsolètes" + ontology_views: "Vues d'ontologie" + exact_matches: " Correspondances Exactes" + classes_with_definitions: "Classes avec Définitions" + ontologies: "Ontologies" + index: + intro: Rechercher une classe dans plusieurs ontologies + search_keywords_placeholder: Entrez une classe, par ex. Mélanome + categories_placeholder: Commencez à taper pour sélectionner des catégories ou laissez vide pour tout utiliser + property_definition: Association nommée entre deux entités. Les exemples sont "définition" (une relation entre une classe et du texte) et "partie de" (une relation entre deux classes). + obsolete_definition: > + Une classe que les auteurs de l'ontologie ont signalée comme étant obsolète et qu'ils recommandent de ne pas utiliser. Ces cours + sont souvent laissés dans des ontologies (plutôt que de les supprimer entièrement) afin que les systèmes existants qui en dépendent continuent à fonctionner. + + projects: + title: "Liste de projets" + project_description: "Description du projet" + description_text: "Texte de description" + view_projects_help: "Aide à la visualisation des projets" + create_new_project: Créer un nouveau projet + + self: Projets + description: Description + contacts: Contacts + institutions: Institutions + ontologies: "Ontologies" + creator: "Utilisateur" + created: "Créé" + home_page: Page d'accueil + edit: Modifier + delete_admin_only: Supprimer (administrateur seulement) + delete_confirm: Êtes-vous sûr(e) ? + + index: + intro: Parcourez une sélection de projets qui utilisent les ressources %{site} + + landscape: + title: "%{site} Paysage" + intro: Visualiser les données récupérées à partir des ontologies stockées dans le portail + groups_and_categories: Groupes et catégories + ontologies_by: "Ontologies par %{type}" + ontologies_count_by_catalog: Nombre d'ontologies dans chaque catalogue de données + properties_use: Utilisation des propriétés + properties_usage_proportion: The proportion of properties usage among stored ontologies + ontologies_languages: Langues naturelles des ontologies + ontologies_licenses: Licences utilisées par les ontologies + ontology_tools: Outils les plus utilisés pour construire des ontologies + + more_properties_charts: Plus de graphiques de propriétés + ontology_properties_pie_charts: Graphiques circulaires pour les propriétés utilisées dans les ontologies + owl_ontology_preflabel_uris: URIs de propriétés prefLabel utilisées pour les ontologies OWL + owl_ontology_synonym_uris: URIs de propriétés synonymes utilisées pour les ontologies OWL + owl_ontology_definition_uris: URIs de propriétés de définition utilisées pour les ontologies OWL + owl_ontology_author_uris: URIs de propriétés d'auteur utilisées pour les ontologies OWL + + ontology_types: Types d'ontologie + ontology_formality_levels: Niveaux de formalité des ontologies + ontologies_formats: Format utilisé + + ontologies_contributors: Contributeurs au développement d'ontologies + + most_active_people: Les personnes les plus actives + most_mentioned_people: Les personnes les plus mentionnées en tant que contact, créateur, contributeur ou conservateur + + most_active_organizations: Les organisations les plus actives + funding_endorsing_organizations: Les organisations qui financent et soutiennent le plus grand nombre d'ontologies + + ontologies_activity_on: "Activité des ontologies sur %{site}" + most_active_people_as_reviewer: "Les personnes les plus actives en tant que relecteurs" + most_mentioned_people_as_reviewer: Personnes ayant publié des notes, des avis et des projets + most_active_ontologies: "Ontologies les plus actives" + ontologies_with_notes_reviews_projects: "Ontologies avec des notes, des critiques et des projets" + + ontology_relations_network: "Réseau de relations ontologiques" + relations_between_stored_ontologies: "Relations entre les ontologies stockées sur le portail" + + filter_network: "Filtrer le réseau" + + ontology_fairness_evaluator: "Évaluateur de conformité FAIR des ontologies (O’FAIRe)" + average_metrics: "Métriques moyennes" + + group: Groupe + category: Catégorie + size: Taille + + home: + find_ontology: "Trouver une ontologie" + search_class: "Rechercher une classe" + browse_by_group: "Parcourir par groupe" + browse_ontologies: "Parcourir les ontologies" + comprehensive_repository: "le référentiel d'ontologies biomédicales le plus complet au monde" + advanced_search: "Recherche avancée" + ontology_visits: "Visites d'ontologie" + fair_scores: "Scores FAIR" + clear_selection: "Effacer la sélection" + latest_notes: "Dernières notes" + ontologies: "Ontologies" + classes: "Des classes" + individuals: "Personnes" + projects: "Projets" + users: "Utilisateurs" + no_recent_notes: "Aucune note récente n'a été soumise" + supported_by: "Avec le soutien de" + with_collaboration: "Avec la collaboration de" + index: + find_ontology_placeholder: Commencez à taper le nom de l'ontologie, puis choisissez dans + query_placeholder: Entrez une classe, par exemple Melanoma + tagline: le référentiel d'ontologies biomédicales le plus complet au monde + title: Bienvenue à la %{organization} + welcome: Bienvenue à la %{site}, + help: + welcome: Bienvenue à la le %{site} du Centre national d'ontologie biomédicale. %{site} est une application Web permettant d'accéder et de partager des ontologies biomédicales. + getting_started: > + %{site} permet aux utilisateurs de parcourir, charger, télécharger, rechercher, commenter et créer des mappages pour les ontologies. + browse: > + Les utilisateurs peuvent parcourir et explorer des ontologies individuelles en naviguant soit dans une structure arborescente, soit dans une vue graphique animée. Les utilisateurs peuvent également afficher les mappages et + métadonnées d'ontologie et téléchargement d'ontologies. De plus, les utilisateurs connectés peuvent soumettre une nouvelle ontologie à la bibliothèque. + rest_examples_html: affichez la documentation et des exemples de l'%{site} API REST. + announce_list_html: > + Pour recevoir des avis de nouvelles versions ou de pannes de site, veuillez vous abonner au + liste de support bioontologie. + + recommender: + intro: Obtenez des recommandations pour les ontologies les plus pertinentes à partir d'un extrait d'un texte biomédical ou d'une liste de mots-clés + title: "recommandeur" + ontology_recommender: "Recommandeur d'ontologie" + ontology_recommendation_input: "Veuillez coller un paragraphe de texte ou quelques mots-clés pour calculer les recommandations d'ontologie." + weight_sum_greater_than_zero: "La somme des poids doit être supérieure à zéro" + weights_greater_than_zero: "Tous les poids doivent être supérieurs ou égaux à zéro" + valid_numeric_weights: "Tous les poids doivent être des valeurs numériques valides" + valid_integer_max_ontologies_per_set: "Le nombre maximum d'ontologies par ensemble doit être une valeur entière valide" + valid_max_ontologies_per_set_range: "Le nombre maximum d'ontologies par ensemble doit être un nombre entre 2 et 4" + recommendation_error: "Problème lors de la récupération des recommandations, veuillez réessayer" + no_recommendations: "Aucune recommandation trouvée" + no_sets_recommended: "Il n'y a pas d'ensembles d'ontologies recommandés pour l'entrée fournie. Veuillez essayer la sortie 'Ontologies'." + text_length_limit: "Veuillez utiliser moins de 500 mots. Si vous devez annoter de plus grands morceaux de texte, vous pouvez utiliser le service web de recommandation." + + mappings: + title: "Correspondances" + upload_mappings: "Télécharger les correspondances" + mappings_bulk_load: "Chargement en masse des correspondances" + intro: "Parcourir les correspondances entre les classes de différentes ontologies" + no_mappings_available: "Aucune correspondance disponible" + loading_mappings: "Chargement des correspondances en cours..." + find_mappings: "Trouver les correspondances d'une classe / concept" + view_mappings_help: "View mappings help" + select_class: "Commencez à taper pour sélectionner une classe" + select_ontologies: "Commencez à taper pour sélectionner des ontologies ou laissez vide pour utiliser toutes les ontologies" + select_semantic_types: "Sélectionnez les types sémantiques UMLS" + select_semantic_types_help: "Commencez à taper pour sélectionner les types sémantiques UMLS ou laissez vide pour utiliser tous les types" + select_semantic_groups: "Sélectionnez les groupes sémantiques UMLS" + select_semantic_groups_help: "Commencez à taper pour sélectionner les groupes sémantiques UMLS ou laissez vide pour utiliser tous les groupes" + include_ancestors_up_to_level: "Inclure les ancêtres jusqu'au niveau" + include_score: "Inclure le score" + + annotator: + title: "Annotateur" + get_annotator: "Obtenir les annotations" + filters: + match_longest_only: "Correspond le plus long uniquement" + match_partial_words: "Reconnaître des mots partiels" + include_mappings: "Inclure les mappages" + exclude_numbers: "Exclure des numéros" + exclude_synonyms: "Exclure les synonymes" + max_hierarchy_level: "Inclure les ancêtres jusqu'au niveau" + score: "Inclure le score" + score_help: "Annotations de score suivant la mesure NCBO 2009 précédente (ancienne) ou Annotations de score suivant la mesure C-Value (cvalue) ou Annotations de score suivant la mesure C-Value avec expansion de la hiérarchie (cvalueh)" + score_threshold: "Filtrer par seuil de score" + score_threshold_help: "Spécifier la valeur de score minimum pour les annotations" + confidence_threshold: "Seuil de confiance du filtre" + confidence_threshold_help: "Spécifiez la position minimale dans la distribution des scores (entre 1 et 100)" + recognizer de reconnaissance: "outil de reconnaissance d'entité" + start_typing_to_select: "Commencez à taper pour sélectionner %{type} ou laissez vide pour tout utiliser" + select: "Sélectionnez %{name}" + enter_or_paste_text: "Entrer ou coller le texte à annoter" + fast_context: "FastContext" + lemmatize: "Lemmatiser" + annotations_result: "Annotations" + results_filtered_by: "Les résultats sont filtrés par" + + umls: + semantic_types: "Types sémantiques UMLS" + semantic_groups: "Groupes sémantiques UMLS" + index: + intro: Obtenez des annotations pour le texte biomédical avec des classes des ontologies + annotatorplus_html: Consultez la version bêta d'AnnotatorPlus ; une nouvelle version de l'Annotator avec un support supplémentaire pour la négation, et plus encore ! + fast_context: + tooltip: "Activer FastContext pour détecter : si un concept a été nié (affirmé, nié), qui a vécu le concept trouvé (patient, autre), quand le concept annoté s'est produit (récent, historique, hypothétique), et/ou si le concept annoté est incertain (certain, incertain)." + lemmatize: + tooltip: "Activez Lemmatize pour lemmatiser le texte soumis et utiliser un dictionnaire lemmatisé pour les annotations" + sample_text: Le mélanome est une tumeur maligne des mélanocytes qui se trouvent principalement dans la peau mais aussi dans l'intestin et l'œil. + + ontology_details: + header: + last_uploaded: "Dernière mise à jour:" + sections: + summary: "Résumé" + concepts: "Concepts" + classes: "Classes" + properties: "Propriétés" + notes: "Notes" + mappings: "Mappings" + schemes: "Schemes" + collections: "Collections" + widgets: "Widgets" + + metadata: + details: "Détails" + acronym: "Acronyme" + visibility: "Visibilité" + viewing_restriction: "Restriction de visualisation" + view_of_ontology: "Vue de l'ontologie" + description: "Description" + status: "Statut" + format: "Format" + contact: "Contact" + categories: "Catégories" + groups: "Groupes" + pull_url: "URL de pull" + submissions: "Soumissions" + links: "Liens" + add_submission: "Ajouter une soumission" + views_of: "Vues de" + create_new_view: "Créer une nouvelle vue" + no_views_of: "Aucune vue de %{name} disponible" + go_to_rest_api_json_entry: "Accéder à l'entrée JSON de l'API REST" + get_my_metadata_back: "Récupérer mes métadonnées" + n_triple: "N-Triple" + json_ld: "JSON-LD" + rdf_xml: "RDF/XML" + view_individual_metrics_definitions: "Voir les définitions de métriques individuelles" + metrics: "Métriques" + metrics_not_calculated_yet: "Nous n'avons pas encore calculé de métriques pour" + classes: "Classes" + individuals: "Individus" + properties: "Propriétés" + max_depth: "Profondeur maximale" + max_children: "Nombre maximum d'enfants" + avg_children: "Nombre moyen d'enfants" + single_child_classes: "Classes avec un seul enfant" + many_children_classes: "Classes avec plus de 25 enfants" + no_definition_classes: "Classes sans définition" + visits: "Visites" + download_as_csv: "Télécharger en CSV" + projects_using: "Projets utilisant" + no_projects_using: "Aucun projet n'utilise" + create_new_project: "Créer un nouveau projet" + additional_metadata: "Métadonnées supplémentaires" + + layout: + header: + browse: "Parcourir" + search: "Rechercher" + mappings: "Mappings" + recommender: "Recommender" + annotator: "Annotateur" + ncbo_annotator_plus: "NCBO Annotator+" + projects: "Projets" + landscape: "Paysage" + login: "Se connecter" + account_setting: "Paramètres du compte" + submit_feedback: "Envoyer un commentaire" + help: "Aide" + release_notes: "Notes de version" + publications: "Publications" + footer: + products: Produits + ontoportal: OntoPortal + release_notes: Notes de version + api: API + sparql: SPARQL + support: Support + contact_us: Nous contacter + wiki: Wiki + documentation: Documentation + agreements: Accords + terms: Conditions d'utilisation + privacy_policy: Politique de confidentialité + cite_us: Nous citer + acknowledgments: Remerciements + about: À propos + about_us: À propos de nous + projects: Projets + team: Équipe + copyright_html: Droit d'auteur &copie; 2005‑2022, Conseil d'administration de l'Université Leland Stanford Junior. Tous les droits sont réservés. + grant_html: > + %{site} est actuellement développé dans le cadre du projet ANR D2KAB (ANR-18-CE23-0017). Il reçoit ou a également reçu le soutien du projet ANR SIFR (ANR-12-JS02-0010), Union Européenne Projet H2020-MSCA SIFRm ( N° 701771), le Labex NUMEV (ANR-10-LABX-20), le projet IBC de Montpellier (ANR-11-BINF0002) , l'Agro Labex (ANR-10-LABX-0001) ainsi que de l'Université de Montpellier et du CNRS. + notices: + license_contact: > + Pour plus d'informations, envoyez un e-mail à support@ontoportal.org ou + visitez https://ontoportal.org/licensing. + license_obtain: > + Si vous êtes le propriétaire de cette installation OntoPortal, vous pouvez visiter + https://license.ontoportal.org pour obtenir une licence. + license_expired: > + Nous sommes désolés, mais la licence pour cette installation d'OntoPortal a expiré. Si vous êtes le propriétaire de cette installation OntoPortal, + veuillez visiter https://license.ontoportal.org pour renouveler votre licence. + license_trial: + one: Cette installation de l'appliance OntoPortal est une licence d'essai, qui expirera dans 1 jour. + other: Cette installation de l'appliance OntoPortal est une licence d'essai, qui expirera dans %{count} jours. + + # Other + + about: > +
+

Résumé

+

+ De nombreux vocabulaires et ontologies sont produits pour représenter et annoter les données agronomiques. Il est donc nécessaire de disposer d'une plateforme commune pour les identifier, les héberger et les utiliser dans les applications d'agro-informatique. Le projet AgroPortal vise à offrir un référentiel d'ontologies de référence pour l'agronomie, en réutilisant la technologie NCBO BioPortal. Les résultats scientifiques et l'expérience du domaine biomédical sont ainsi exploités et transposés dans le domaine de l'agronomie, comprenant les plantes, l'alimentation, l'environnement et éventuellement les sciences animales. Nous proposons un portail d'ontologies qui offre l'hébergement d'ontologies, la recherche, la versioning, la visualisation, le commentaire, la recommandation, permet l'annotation sémantique, ainsi que le stockage et l'exploitation d'alignements d'ontologies. Tout cela dans une infrastructure totalement conforme au web sémantique. Le projet AgroPortal accorde une attention particulière au respect des exigences de la communauté agronomique en termes de formats d'ontologies (par exemple, SKOS, dictionnaires de traits) ou de fonctionnalités prises en charge. Le projet AgroPortal est basé sur cinq cas d'utilisation agronomique qui participent à la conception et à l'orientation de la plateforme. AgroPortal offre déjà un référentiel de référence robuste et stable, d'une grande valeur pour le domaine de l'agronomie. +

+

Use cases

+ +
+

Nouvelles fonctionnalités

+

+ See the notes de version +

+
+

Les partenaires

+

Le Centre National d'Ontologie Biomédicale (NCBO), l'Institut de Recherche pour le Développement (IRD), Research Data Alliance (RDA), + Bioversity International, Food & Agriculture Organization (FAO), Global Open Data for Agriculture & Nutrition (Godan Action), Institut National de la Recherche Agronomique (INRA)

+

remerciements

+

L'AgroPortail est en partie réalisé dans le cadre du projet d'Indexation Sémantique des Ressources Biomédicales Françaises (SIFR) + qui ont reçu un financement du programme de recherche et d'innovation H2020 de l'UE dans le cadre de Marie Sklodowska-Curie (subvention 701771) + et l'Agence Nationale de la Recherche (bourse ANR-12-JS02-01001), le Labex NUMEV (bourse ANR-10-LABX-20), + l'Institut de Biologie Computationnelle de Montpellier (bourse ANR-11-BINF-0002) ainsi que par l'Université de Montpellier et le CNRS. + Nous remercions également le Centre National des Ontologies Biomédicales pour son aide et le temps passé avec nous dans le déploiement de l'AgroPortail.

+

Équipe

+ Pour nous contacter: firstname.lastname@lirmm.fr +
    +
  • Clément Jonquet,chercheur au LIRMM (Univ. de Montpellier, France), investigateur principal du projet AgroPortal
  • +
  • Anne Toulet, chercheuse au LIRMM (Univ. de Montpellier, France)
  • +
  • Vincent Emonet, ingénieur au LIRMM (Univ. de Montpellier, France)
  • +
+
+ + activerecord: + errors: + models: + license: + attributes: + encrypted_key: + invalid_license_key: est une clé de licence invalide + no_appliance_id_for_comparison: n'a pas pu être validé. Impossible de récupérer l'ID de l'appliance virtuelle. + appliance_id_mismatch: est une non-concordance d'ID d'appliance + + admin: + licenses: + create: + success: Licence renouvelée avec succès ! + + date: + formats: + year_month_day_concise: "%Y-%m-%d" # 2017-03-01 + month_day_year: "%b %-d, %Y" # Mar 1, 2017 + monthfull_day_year: "%-d %B %Y" # March 1, 2017 + + ontologies: + self: "Ontologies" + loading: Chargement des ontologies + intro: Parcourir la bibliothèque d'ontologies + please_wait: S'il vous plaît, attendez.. + browse: Explorer + welcome_admin: Bienvenue admin + admin_help: Cette couleur indique les fonctionnalités réservées aux administrateurs + debug_info: Informations de débogage + submit_new_ontology: Soumettre une nouvelle ontologie + entry_type: Type d'entrée + uploaded_in_the_last: Téléchargé dans les derniers + + concepts: + request_term: + new_term_instructions: > +

Cette ontologie s'intègre à OntoloBridge, permettant aux utilisateurs de la communauté de suggérer des ajouts à l'ontologie publique. Remplissez le modèle ci-dessous pour soumettre une demande de terme directement au responsable de l'ontologie.

+
+

Libellé du terme (obligatoire)
Nom du terme suggéré. Si un terme peut être décrit avec plusieurs synonymes, n'indiquez ici que le nom préféré.

+
+
+

Description du terme (obligatoire)
Une brève définition, description ou utilisation du terme suggéré. Des synonymes de termes supplémentaires peuvent être répertoriés dans cette section.

+
+
+

Superclasse (obligatoire)
Le terme parent du terme suggéré. Le terme parent doit être une entrée existante de l'ontologie actuelle. La superclasse peut être sélectionnée directement à partir de l'arborescence des classes de Bioportal.

+
+
+

Références (facultatif)
Fournissez des preuves de l'existence du terme demandé, telles que les identifiants Pubmed des articles ou des liens vers d'autres ressources décrivant le terme.

+
+
+

Justification (facultatif)
Fournissez ici toute information supplémentaire sur le terme demandé.

+
+ + # Generale + showing: Affichage + of: de + sort: Trier + popular: Populaire + name: Nom + classes_count: Nombre de classes + instances_concepts_count: Nombre d'instances/concepts + notes: Notes + upload_date: Date de téléchargement + release_date: Date de publication + fair_score: Score FAIR + search_rank: Classement de recherche + no_matches: Aucune correspondance ! + uploaded: Téléchargé + view_of: Vue de + view: Vue + summary_only: Résumé seulement + groups: Groupes + categories: Catégories + admins: Administrateurs + status: Statut + no_submissions_available: Aucune soumission disponible + classes: classes + + category: Catégorie + group: Groupe + format: Format + ontology_content: Contenu de l'ontologie + natural_language: Langage naturel + formality_levels: Niveaux de formalité + is_of_type: Est du type + missing_status: Statut manquant + types: Types + artifacts: Artéfacts + formats: Formats + selected_ontologies: Ontologies sélectionnées + all: "Tout" + none: "aucune" + keywords: "Mots-clés" + keywords_separated_by_commas: "Mots-clés séparés par des virgules" + see_details: "Voir les détails" + view_fair_scores_definitions: "View fair scores definitions" + get_json_version: "Get the json version" + select_ontologies: "Commencez à taper pour sélectionner des ontologies ou laissez vide pour toutes les utiliser" + clear_selection: "Effacer la sélection" + select_from_list: "Sélectionner dans la liste" + more: "Plus" + statistics: "Statistiques" + average: "Moyenne" + min: "Min" + max: "Max" + median: "Médiane" + slices: "Tranches" + help: "Aide" + or: "Ou" + show_advanced_options: "Afficher les options avancées" + insert_sample_text: "Insérer un exemple de texte" + class: "Classe" + filter: "Filtre" + ontology: "Ontologie" + type: "Type" + context: "Contexte" + umls_sem_type: "Type Sem UMLS" + matched_ontology: "ontologie correspondante" + matched_class: "Classe correspondante" + score: "Score" + negation: "négation" + experiencer: "Experiencer" + temporality: "Temporalité" + certainty: "Certitude" + format_results: "Formater les résultats en " + reproduce_results: "Reproduisez ces résultats en utilisant le " + additional_parameters: "Paramètres supplémentaires expliqués à " + input: "Entrée" + text: "Texte" + output: "Sortie" + ontology_sets: "Ensembles d'ontologies" + insert_sample_input: "Insérer une entrée d'exemple" + weights_configuration: "Configuration des poids" + coverage: "Couverture" + acceptance: "Acceptation" + knowledge_detail: "Détail de la connaissance" + specialization: "Spécialisation" + max_ontologies_per_set: "Nombre maximum d'ontologies par ensemble" + paste_input_text: "Collez un paragraphe de texte ou des mots-clés à utiliser dans le calcul des recommandations d'ontologie" + get_recommendations: "Obtenir des recommandations" + select_ontologies_list: "Sélectionnez les ontologies" diff --git a/config/routes.rb b/config/routes.rb index 057297ac7..98bb049b6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,6 +2,8 @@ root to: 'home#index' + get 'locale/:language', to: 'language#set_locale_language' + get '/notes/new_comment', to: 'notes#new_comment' get '/notes/new_proposal', to: 'notes#new_proposal' get '/notes/new_reply', to: 'notes#new_reply' From 9c2bb25fe45e980b70f91e314b6af1be4fad91c2 Mon Sep 17 00:00:00 2001 From: Syphax bouazzouni Date: Thu, 25 May 2023 14:24:33 +0200 Subject: [PATCH 5/8] Merge pull request #231 from ontoportal-lirmm/feature/add-not-available-value-text-concept Feature: Add feedback for empty attributes in concepts --- app/components/alert_message_component.rb | 4 +- .../alert_message_component.html.haml | 12 +- app/components/concept_details_component.rb | 2 +- app/helpers/application_helper.rb | 2 +- app/views/concepts/_details.html.haml | 27 +++-- config/locales/en.yml | 110 +++++++++--------- config/locales/fr.yml | 61 ++++------ .../alert_message_component_preview.rb | 10 ++ 8 files changed, 123 insertions(+), 105 deletions(-) create mode 100644 test/components/previews/alert_message_component_preview.rb diff --git a/app/components/alert_message_component.rb b/app/components/alert_message_component.rb index f2175b7e0..1ef3b185c 100644 --- a/app/components/alert_message_component.rb +++ b/app/components/alert_message_component.rb @@ -2,8 +2,10 @@ class AlertMessageComponent < ViewComponent::Base include Turbo::FramesHelper - def initialize(id: '', type: 'info') + def initialize(id: '', message: '', type: 'info', closeable: true) @id = id + @message = message @type = "alert-#{type}" + @closeable = closeable end end diff --git a/app/components/alert_message_component/alert_message_component.html.haml b/app/components/alert_message_component/alert_message_component.html.haml index 19c0e89f0..107ab14ac 100644 --- a/app/components/alert_message_component/alert_message_component.html.haml +++ b/app/components/alert_message_component/alert_message_component.html.haml @@ -1,4 +1,8 @@ -.alert.alert-dismissible.fade.show{:role => "alert", class: "#{@type}"} - = content - %button.close{"aria-label": "Close", "data-dismiss": "alert", type: "button", style: "background: transparent"} - %span{"aria-hidden" => "true"} × \ No newline at end of file +.alert.alert-dismissible.fade.show{:role => "alert", class: "#{@type}", style: "text-align: left"} + = @message + + - if @closeable + %button.close{"aria-label": "Close", "data-dismiss": "alert", type: "button", style: "background: transparent"} + %span{"aria-hidden" => "true"} × + + \ No newline at end of file diff --git a/app/components/concept_details_component.rb b/app/components/concept_details_component.rb index 380427a3c..ba27ea9fa 100644 --- a/app/components/concept_details_component.rb +++ b/app/components/concept_details_component.rb @@ -40,7 +40,7 @@ def render_properties(properties_set, ontology_acronym, &block) #{remove_owl_notation(key)} - #{"

#{ajax_links.join('

')}

".html_safe} + #{"

#{ ajax_links.join('

') }

".html_safe} EOS out += line diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 13121661b..2edb283c1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -193,7 +193,7 @@ def tree_link_to_concept(child:, ontology_acronym:, active_style:, node: nil) data-active-collections-value='#{child.isInActiveCollection || []}' data-skos-collection-colors-target='collection' class='#{muted_style} #{active_style}'> - #{child.prefLabel ? child.prefLabel({ use_html: true }) : child.id} + #{child.prefLabel ? child.prefLabel({ use_html: true }) : child.id.split('/').last} EOS diff --git a/app/views/concepts/_details.html.haml b/app/views/concepts/_details.html.haml index 56cea2643..a0ff30684 100644 --- a/app/views/concepts/_details.html.haml +++ b/app/views/concepts/_details.html.haml @@ -1,23 +1,30 @@ = turbo_frame_tag 'concept_details' do - schemes_keys = %w[hasTopConcept topConceptOf] - label_xl_set = %w[skos-xl#prefLabel skos-xl#altLabel skos-xl#hiddenLabel] + + - if @concept.prefLabel.nil? + %div.py-3.px-2 + = render(AlertMessageComponent.new(message: t('ontology_details.concept.no_preferred_name_for_selected_language'), type: "warning", closeable: true)) + = render ConceptDetailsComponent.new(id:'concept-details', acronym: @ontology.acronym, properties: @concept.properties, top_keys: %w[description comment], bottom_keys: %w[disjoint subclass is_a has_part], exclude_keys: schemes_keys + label_xl_set + ['inScheme']) do |c| + - c.header do %tr - %td{nowrap: ""} ID + %td{nowrap: ""}= t('ontology_details.concept.id') %td %p= @concept.id %tr - %td{nowrap: ""} Preferred Name + %td{nowrap: ""}= t('ontology_details.concept.preferred_name') %td %p= @concept.prefLabel({:use_html => true}).html_safe + - unless @concept.synonym.nil? || @concept.synonym.empty? %tr - %td{nowrap: ""} Synonyms + %td{nowrap: ""}= t('ontology_details.concept.synonyms') %td - for synonym in @concept.synonym %p= synonym @@ -25,33 +32,37 @@ %div.synonym-change-request = add_synonym_button = remove_synonym_button + + - unless @concept.definition.nil? || @concept.definition.empty? %tr - %td{nowrap: ""} Definitions + %td{nowrap: ""}= t('ontology_details.concept.definitions') %td %p= @concept.definition.join(" ") + + - if @concept.obsolete? %tr - %td{nowrap: ""} Obsolete + %td{nowrap: ""}= t('ontology_details.concept.obsolete') %td %p true - if skos? - unless @concept.memberOf.nil? || @concept.memberOf.empty? %tr - %td{nowrap: ""} Member of + %td{nowrap: ""}= t('ontology_details.concept.member_of') %td %div.my-1 - @concept.memberOf.each do |v| = raw get_link_for_collection_ajax(v, @ontology.acronym, '_blank') - unless @concept.inScheme.nil? || @concept.inScheme.empty? %tr - %td{nowrap: ""} In Schemes + %td{nowrap: ""}= t('ontology_details.concept.in_schemes') %td %div.my-1 - @concept.inScheme.each do |v| = raw get_link_for_scheme_ajax(v, @ontology.acronym, '_blank') %tr - %td{nowrap: ""} Type + %td{nowrap: ""}= t('ontology_details.concept.type') %td %p= @concept.type diff --git a/config/locales/en.yml b/config/locales/en.yml index 7c24d4b33..8e8fab514 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -281,61 +281,63 @@ en: sample_text: Melanoma is a malignant tumor of melanocytes found mainly in the skin but also in the intestine and the eye. ontology_details: - header: - last_uploaded: "Last uploaded:" - sections: - summary: "Summary" - concepts: "Concepts" - classes: "Classes" - properties: "Properties" - notes: "Notes" - mappings: "Mappings" - schemes: "Schemes" - collections: "Collections" - widgets: "Widgets" - metadata: - details: "Details" - acronym: "Acronym" - visibility: "Visibility" - viewing_restriction: "Viewing Restriction" - view_of_ontology: "View of ontology" - description: "Description" - status: "Status" - format: "Format" - contact: "Contact" - categories: "Categories" - groups: "Groups" - pull_url: "Pull URL" - submissions: "Submissions" - links: "Links" - add_submission: "Add Submission" - views_of: "Views of" - create_new_view: "Create a new view" - no_views_of: "No views of %{name} available" - go_to_rest_api_json_entry: "Go to REST API JSON Entry" - get_my_metadata_back: "Get my metadata back" - n_triple: "N-Triple" - json_ld: "JSON-LD" - rdf_xml: "RDF/XML" - view_individual_metrics_definitions: "View individual metrics definitions" - metrics: "Metrics" - metrics_not_calculated_yet: "We have not yet calculated metrics for" - classes: "Classes" - individuals: "Individuals" - properties: "Properties" - max_depth: "Maximum depth" - max_children: "Maximum number of children" - avg_children: "Average number of children" - single_child_classes: "Classes with a single child" - many_children_classes: "Classes with more than 25 children" - no_definition_classes: "Classes without definition" - visits: "Visits" - download_as_csv: "Download as CSV" - projects_using: "Projects Using" - no_projects_using: "No projects are using" - create_new_project: "Create a new project" - additional_metadata: "Additional Metadata" + metadata: + details: "Details" + acronym: "Acronym" + visibility: "Visibility" + viewing_restriction: "Viewing Restriction" + view_of_ontology: "View of ontology" + description: "Description" + status: "Status" + format: "Format" + contact: "Contact" + categories: "Categories" + groups: "Groups" + pull_url: "Pull URL" + submissions: "Submissions" + links: "Links" + add_submission: "Add Submission" + views_of: "Views of" + create_new_view: "Create a new view" + no_views_of: "No views of %{name} available" + go_to_rest_api_json_entry: "Go to REST API JSON Entry" + get_my_metadata_back: "Get my metadata back" + n_triple: "N-Triple" + json_ld: "JSON-LD" + rdf_xml: "RDF/XML" + view_individual_metrics_definitions: "View individual metrics definitions" + metrics: "Metrics" + metrics_not_calculated_yet: "We have not yet calculated metrics for" + classes: "Classes" + individuals: "Individuals" + properties: "Properties" + max_depth: "Maximum depth" + max_children: "Maximum number of children" + avg_children: "Average number of children" + single_child_classes: "Classes with a single child" + many_children_classes: "Classes with more than 25 children" + no_definition_classes: "Classes without definition" + visits: "Visits" + download_as_csv: "Download as CSV" + projects_using: "Projects Using" + no_projects_using: "No projects are using" + create_new_project: "Create a new project" + additional_metadata: "Additional Metadata" + concept: + no_preferred_name_for_selected_language: "No preferred name for selected language." + no_synonym_name_for_selected_language: "No Synonym for selected language." + no_definitions_for_selected_language: "No Definitions for selected language." + preferred_name: "Preferred name" + id: "ID" + synonyms: "Synonyms" + definitions: "Definitions" + obsolete: "Obsolete" + member_of: "Member of" + in_schemes: "In Schemes" + type: "Type" + no_value_for_selected_language: "No value for selected language." + layout: header: browse: "Browse" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 95940640f..3992efa92 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1,4 +1,5 @@ fr: + nbco_annotatosplus: score_help: "Annotations de score suivant la mesure NCBO 2009 précédente (ancienne) ou Annotations de score suivant la mesure C-Value (cvalue) ou Annotations de score suivant la mesure C-Value avec expansion de la hiérarchie (cvalueh)" start_typing_to_select: "Commencez à taper pour sélectionner %{type} ou laissez vide pour tout utiliser" @@ -190,8 +191,7 @@ fr: projects: "Projets" users: "Utilisateurs" no_recent_notes: "Aucune note récente n'a été soumise" - supported_by: "Avec le soutien de" - with_collaboration: "Avec la collaboration de" + index: find_ontology_placeholder: Commencez à taper le nom de l'ontologie, puis choisissez dans query_placeholder: Entrez une classe, par exemple Melanoma @@ -281,22 +281,9 @@ fr: sample_text: Le mélanome est une tumeur maligne des mélanocytes qui se trouvent principalement dans la peau mais aussi dans l'intestin et l'œil. ontology_details: - header: - last_uploaded: "Dernière mise à jour:" - sections: - summary: "Résumé" - concepts: "Concepts" - classes: "Classes" - properties: "Propriétés" - notes: "Notes" - mappings: "Mappings" - schemes: "Schemes" - collections: "Collections" - widgets: "Widgets" - metadata: details: "Détails" - acronym: "Acronyme" + acronym: "Acronym" visibility: "Visibilité" viewing_restriction: "Restriction de visualisation" view_of_ontology: "Vue de l'ontologie" @@ -337,6 +324,23 @@ fr: create_new_project: "Créer un nouveau projet" additional_metadata: "Métadonnées supplémentaires" + concept: + no_preferred_name_for_selected_language: "Pas de nom préféré pour la langue sélectionnée." + no_synonym_name_for_selected_language : "Aucun synonyme pour la langue sélectionnée." + no_definitions_for_selected_language : "Aucune définition pour la langue sélectionnée." + preferred_name: "Nom préféré" + id: "Identifiant" + synonyms: "Synonymes" + definitions: "Définitions" + obsolete: "Obsolète" + member_of: "Membre de" + in_schemes: "Dans les schémas" + type: "Type" + no_value_for_selected_language: "Pas de valeur pour la langue sélectionnée." + + + + layout: header: browse: "Parcourir" @@ -354,24 +358,7 @@ fr: release_notes: "Notes de version" publications: "Publications" footer: - products: Produits - ontoportal: OntoPortal - release_notes: Notes de version - api: API - sparql: SPARQL - support: Support - contact_us: Nous contacter - wiki: Wiki - documentation: Documentation - agreements: Accords - terms: Conditions d'utilisation - privacy_policy: Politique de confidentialité - cite_us: Nous citer - acknowledgments: Remerciements - about: À propos - about_us: À propos de nous - projects: Projets - team: Équipe + products: "Produits" copyright_html: Droit d'auteur &copie; 2005‑2022, Conseil d'administration de l'Université Leland Stanford Junior. Tous les droits sont réservés. grant_html: > %{site} est actuellement développé dans le cadre du projet ANR D2KAB (ANR-18-CE23-0017). Il reçoit ou a également reçu le soutien du projet ANR SIFR (ANR-12-JS02-0010), Union Européenne Projet H2020-MSCA SIFRm ( N° 701771), le Labex NUMEV (ANR-10-LABX-20), le projet IBC de Montpellier (ANR-11-BINF0002) , l'Agro Labex (ANR-10-LABX-0001) ainsi que de l'Université de Montpellier et du CNRS. @@ -448,8 +435,8 @@ fr: formats: year_month_day_concise: "%Y-%m-%d" # 2017-03-01 month_day_year: "%b %-d, %Y" # Mar 1, 2017 - monthfull_day_year: "%-d %B %Y" # March 1, 2017 - + monthfull_day_year: "%B %-d, %Y" # March 1, 2017 + ontologies: self: "Ontologies" loading: Chargement des ontologies @@ -571,3 +558,5 @@ fr: paste_input_text: "Collez un paragraphe de texte ou des mots-clés à utiliser dans le calcul des recommandations d'ontologie" get_recommendations: "Obtenir des recommandations" select_ontologies_list: "Sélectionnez les ontologies" + + \ No newline at end of file diff --git a/test/components/previews/alert_message_component_preview.rb b/test/components/previews/alert_message_component_preview.rb new file mode 100644 index 000000000..4efb845e9 --- /dev/null +++ b/test/components/previews/alert_message_component_preview.rb @@ -0,0 +1,10 @@ +class AlertMessageComponentPreview < ViewComponent::Preview + + # @param message text + # @param type select [error, info, success, warning] + + def default(message: "Here we can type a success or failure message to the user", type: "info", closeable: true ) + render(AlertMessageComponent.new(message: message, type: type, closeable: closeable)) + end + +end \ No newline at end of file From 421f5a0f6138181767881e4b9c8be5a6da5eb5d2 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Tue, 5 Sep 2023 06:05:12 +0200 Subject: [PATCH 6/8] Feature: Show multiple languages (#252) * refactor ontology_viewer_page_name to support multiple languages * refactor sort_by in collection and schemes to support multiple languges * update ontology_viewer title * add all option in language selection * show prefLabel with the specific language in case of all languages * remove a forgotten debugger in the JS code of language change selector * revert concept details prefLabel multiple language display * show corresponding lang in the tree view * Show data in platform language when lang is equal to 'all' * fix sort_by in collections and schemes * make sub.publication iterable * use tooltip to show language in concept tree links * use display_in_multiple_languges methode to show properties in multiple langs * add tooltips to show language in tree view * change 'process_concept' method name to 'language_hash' * define 'display_in_multiple_languages' method * use 'langauge_hash' methode in collection instead of 'process_concept' * cls_id to string * use 'langauge_hash' methode in schemes instead of 'process_concept' * update tooltip controller to support position * use 'langauge_hash' methode in _list_view instead of 'process_concept' * use 'display_in_multiple_languges' to display properties * fix missing 'end' in application helper * display_in_multiple_languges in schemes * fix language_hash method name typo * check if prefLabel is nil * use tooltip to show preLabel lang in schemes * use tooltip to show preLabel lang in collections * use tooltip in collection * fix a typo display_in_multiple_languages function name * extract link_to_scheme helper for schemes tree view * extract helpers to display the collections list view * refactor language related helpers code in application_helper * add language argument to scheme and collection tree links * refactor scheme and collection helpers to make it work for mutli-langs * fix sort in tree_link_to_concept and add return first in array on language_hash methode * extract multi language helpers into a file * make display_in_multiple_languages directly do the language_hash inside * rename the helper get_concept_label to select_language_label * move the not found prefLabel alert in the prefLabel row * catch concept list error when concept label is nil * add main_language_label helper to show the concept label main language label * fix loader showed in small state by default * fix alert component text overflowing * reset turbo progress bar to blue * add id to tabs container component * extract sorted_labels helpers for schemes and collections * fix mappings new form not finding the ontology by id bu by acronym * use main_language_label helper for build_tree * use main_language_label helper in ontology_viewer_page_name * restore removed properties section content --------- Co-authored-by: Syphax Bouazzouni --- app/assets/stylesheets/bioportal.scss | 5 ++ app/components/concept_details_component.rb | 13 +++- app/components/loader_component.rb | 1 - app/controllers/collections_controller.rb | 2 +- app/controllers/concepts_controller.rb | 2 +- app/controllers/label_xl_controller.rb | 2 +- app/controllers/mappings_controller.rb | 4 +- app/controllers/schemes_controller.rb | 2 +- app/helpers/application_helper.rb | 50 +++++++++++---- app/helpers/collections_helper.rb | 26 ++++++-- app/helpers/multi_languages_helper.rb | 63 +++++++++++++++++++ app/helpers/ontologies_helper.rb | 19 +++++- app/helpers/schemes_helper.rb | 42 +++++++------ .../controllers/language_change_controller.js | 1 - .../ontology_viewer_tabs_controller.js | 16 ++--- .../controllers/tooltip_controller.js | 18 ++++-- app/javascript/mixins/useTooltip.js | 14 ++++- app/views/collections/_collection.html.haml | 28 +++------ app/views/collections/_list_view.html.haml | 7 +-- app/views/concepts/_details.html.haml | 40 ++++++------ app/views/concepts/_list.html.haml | 2 +- app/views/layouts/_ontology_viewer.html.haml | 3 +- .../_collections_picker.html.haml | 2 +- .../_scheme_picker.html.haml | 2 +- .../ontologies/sections/properties.html.haml | 2 +- app/views/schemes/_scheme.html.haml | 20 ++---- app/views/schemes/_tree_view.html.haml | 6 +- 27 files changed, 258 insertions(+), 134 deletions(-) create mode 100644 app/helpers/multi_languages_helper.rb diff --git a/app/assets/stylesheets/bioportal.scss b/app/assets/stylesheets/bioportal.scss index 1003395d0..0e1d07131 100644 --- a/app/assets/stylesheets/bioportal.scss +++ b/app/assets/stylesheets/bioportal.scss @@ -1,3 +1,8 @@ +.turbo-progress-bar { + height: 5px; + background-color: var(--admin-color); +} + a{ text-decoration: none !important; } diff --git a/app/components/concept_details_component.rb b/app/components/concept_details_component.rb index ba27ea9fa..33525c321 100644 --- a/app/components/concept_details_component.rb +++ b/app/components/concept_details_component.rb @@ -2,6 +2,7 @@ class ConceptDetailsComponent < ViewComponent::Base include ApplicationHelper + include MultiLanguagesHelper renders_one :header renders_many :sections @@ -31,7 +32,11 @@ def render_properties(properties_set, ontology_acronym, &block) if block_given? block.call(v) else - get_link_for_cls_ajax(v, ontology_acronym, '_blank') + if v.is_a?(String) + get_link_for_cls_ajax(v, ontology_acronym, '_blank') + else + display_in_multiple_languages([v].to_h) + end end end @@ -112,7 +117,11 @@ def concept_properties2hash(properties) end begin # Try to simplify the property values, when they are a struct. - values = properties[key].map { |v| v.string } + if properties[key].is_a?(OpenStruct) + values = language_hash(properties[key]) + else + values = properties[key].map { |v| v.string } + end rescue # Each value is probably a simple datatype already. values = properties[key] diff --git a/app/components/loader_component.rb b/app/components/loader_component.rb index 493b76dbd..2f3709152 100644 --- a/app/components/loader_component.rb +++ b/app/components/loader_component.rb @@ -15,5 +15,4 @@ def call end end end - end diff --git a/app/controllers/collections_controller.rb b/app/controllers/collections_controller.rb index 4f05afd00..ad125dd17 100644 --- a/app/controllers/collections_controller.rb +++ b/app/controllers/collections_controller.rb @@ -10,7 +10,7 @@ def show_label collection_label = collection['prefLabel'] if collection collection_label = params[:id] if collection_label.nil? || collection_label.empty? - render LabelLinkComponent.inline(params[:id], collection_label) + render LabelLinkComponent.inline(params[:id], helpers.main_language_label(collection_label)) end def show_members diff --git a/app/controllers/concepts_controller.rb b/app/controllers/concepts_controller.rb index d39a19902..20daec15c 100644 --- a/app/controllers/concepts_controller.rb +++ b/app/controllers/concepts_controller.rb @@ -69,7 +69,7 @@ def show_label return end - render LabelLinkComponent.inline(cls_id, concept_label(ont_id, cls_id)) + render LabelLinkComponent.inline(cls_id, helpers.main_language_label(concept_label(ont_id, cls_id))) end def show_definition diff --git a/app/controllers/label_xl_controller.rb b/app/controllers/label_xl_controller.rb index e5543aa6d..d38fd870c 100644 --- a/app/controllers/label_xl_controller.rb +++ b/app/controllers/label_xl_controller.rb @@ -10,7 +10,7 @@ def show_label label_xl_label = label_xl ? label_xl['literalForm'] : nil label_xl_label = params[:id] if label_xl_label.nil? || label_xl_label.empty? - render LabelLinkComponent.inline(params[:id], label_xl_label) + render LabelLinkComponent.inline(params[:id], helpers.main_language_label(label_xl_label)) end private diff --git a/app/controllers/mappings_controller.rb b/app/controllers/mappings_controller.rb index e35ef3a15..b8baeda3a 100644 --- a/app/controllers/mappings_controller.rb +++ b/app/controllers/mappings_controller.rb @@ -279,8 +279,8 @@ def mapping_form(mapping: nil) end else mapping = LinkedData::Client::Models::Mapping.new - @ontology_from = LinkedData::Client::Models::Ontology.find(params[:ontology_from]) - @ontology_to = LinkedData::Client::Models::Ontology.find(params[:ontology_to]) + @ontology_from = LinkedData::Client::Models::Ontology.find_by_acronym(params[:ontology_from].split('/').last).first + @ontology_to = LinkedData::Client::Models::Ontology.find_by_acronym(params[:ontology_to]&.split('/')&.last).first @concept_from = @ontology_from.explore.single_class({ full: true }, params[:conceptid_from]) if @ontology_from if @ontology_to @concept_to = @ontology_to.explore.single_class({ full: true }, params[:conceptid_to]) diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 661bda5ab..34956040e 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -10,7 +10,7 @@ def show_label scheme_label = scheme ? scheme['prefLabel'] : params[:id] scheme_label = scheme_label.nil? || scheme_label.empty? ? params[:id] : scheme_label - render LabelLinkComponent.inline(params[:id], scheme_label) + render LabelLinkComponent.inline(params[:id], helpers.main_language_label(scheme_label)) end private diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2edb283c1..d4ae29d96 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -7,6 +7,21 @@ module ApplicationHelper + include ModalHelper, MultiLanguagesHelper + + RESOLVE_NAMESPACE = {:omv => "http://omv.ontoware.org/2005/05/ontology#", :skos => "http://www.w3.org/2004/02/skos/core#", :owl => "http://www.w3.org/2002/07/owl#", + :rdf => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", :rdfs => "http://www.w3.org/2000/01/rdf-schema#", :metadata => "http://data.bioontology.org/metadata/", + :metadata_def => "http://data.bioontology.org/metadata/def/", :dc => "http://purl.org/dc/elements/1.1/", :xsd => "http://www.w3.org/2001/XMLSchema#", + :oboinowl_gen => "http://www.geneontology.org/formats/oboInOwl#", :obo_purl => "http://purl.obolibrary.org/obo/", + :umls => "http://bioportal.bioontology.org/ontologies/umls/", :door => "http://kannel.open.ac.uk/ontology#", :dct => "http://purl.org/dc/terms/", + :void => "http://rdfs.org/ns/void#", :foaf => "http://xmlns.com/foaf/0.1/", :vann => "http://purl.org/vocab/vann/", :adms => "http://www.w3.org/ns/adms#", + :voaf => "http://purl.org/vocommons/voaf#", :dcat => "http://www.w3.org/ns/dcat#", :mod => "http://www.isibang.ac.in/ns/mod#", :prov => "http://www.w3.org/ns/prov#", + :cc => "http://creativecommons.org/ns#", :schema => "http://schema.org/", :doap => "http://usefulinc.com/ns/doap#", :bibo => "http://purl.org/ontology/bibo/", + :wdrs => "http://www.w3.org/2007/05/powder-s#", :cito => "http://purl.org/spar/cito/", :pav => "http://purl.org/pav/", :nkos => "http://w3id.org/nkos/nkostype#", + :oboInOwl => "http://www.geneontology.org/formats/oboInOwl#", :idot => "http://identifiers.org/idot/", :sd => "http://www.w3.org/ns/sparql-service-description#", + :cclicense => "http://creativecommons.org/licenses/"} + + def get_apikey unless session[:user].nil? return session[:user].apikey @@ -153,8 +168,8 @@ def draw_tree(root, id = nil, concept_schemes = []) def build_tree(node, string, id, concept_schemes: []) return string if node.children.nil? || node.children.empty? - - node.children.sort! { |a, b| (a.prefLabel || a.id).downcase <=> (b.prefLabel || b.id).downcase } + + node.children.sort! { |a, b| (main_language_label(a.prefLabel) || a.id).downcase <=> (main_language_label(a.prefLabel) || b.id).downcase } node.children.each do |child| active_style = child.id.eql?(id) ? "active" : '' @@ -186,14 +201,27 @@ def tree_link_to_concept(child:, ontology_acronym:, active_style:, node: nil) icons = child.relation_icon(node) muted_style = child.isInActiveScheme&.empty? ? 'text-muted' : '' href = ontology_acronym.blank? ? '#' : "/ontologies/#{child.explore.ontology.acronym}/concepts/?id=#{CGI.escape(child.id)}&language=#{language}" + + if child.prefLabel.nil? + prefLabelHTML = child.id.split('/').last + else + prefLabelLang, prefLabelHTML = select_language_label(child.prefLabel) + prefLabelLang = prefLabelLang.to_s.upcase + tooltip = prefLabelLang.eql?("@NONE") ? "" : "data-controller='tooltip' data-tooltip-position-value='right' title='#{prefLabelLang}'"; + end + link = <<-EOS - - #{child.prefLabel ? child.prefLabel({ use_html: true }) : child.id.split('/').last} + + #{ prefLabelHTML } + EOS @@ -554,8 +582,8 @@ def get_link_for_label_xl_ajax(label_xl, ont_acronym, cls_id, modal: true) end ###END ruby equivalent of JS code in bp_ajax_controller. - def ontology_viewer_page_name(ontology_name, concept_name_title , page) - ontology_name + " | " +concept_name_title + " - #{page.capitalize}" + def ontology_viewer_page_name(ontology_name, concept_label, page) + ontology_name + " | " + main_language_label(concept_label) + " - #{page.capitalize}" end def link_to_modal(name, options = nil, html_options = nil, &block) diff --git a/app/helpers/collections_helper.rb b/app/helpers/collections_helper.rb index 9f6de4008..ec32c3fca 100644 --- a/app/helpers/collections_helper.rb +++ b/app/helpers/collections_helper.rb @@ -25,14 +25,15 @@ def get_collections_labels(collections, main_uri = '') collections_labels = [] collections.each do |x| id = x['@id'] - label = get_collection_label(x) + label = select_language_label(get_collection_label(x)) if id.eql? main_uri selected_label = { 'prefLabel' => label, '@id' => id } else collections_labels.append( { 'prefLabel' => label, '@id' => id , 'color' => x['color'] }) end end - collections_labels.sort_by! { |s| s['prefLabel']} + + collections_labels = sorted_labels(collections_labels) collections_labels.unshift selected_label if selected_label [collections_labels, selected_label] end @@ -47,14 +48,31 @@ def no_collections_alert end end - def collection_path(collection_id = '') - "/ontologies/#{@ontology.acronym}/collections/show?id=#{escape(collection_id)}" + def collection_path(collection_id = '', language = '') + "/ontologies/#{@ontology.acronym}/collections/show?id=#{escape(collection_id)}&language=#{language}" end def request_collection_id params[:id] || params[:collection_id] || params[:concept_collection] end + def sort_collections_label(collections_labels) + sorted_labels(collections_labels) + end + + def link_to_collection(collection, selected_collection_id) + pref_label_lang, pref_label_html = get_collection_label(collection) + tooltip = pref_label_lang.to_s.eql?('@none') ? '' : "data-controller='tooltip' data-tooltip-position-value='right' title='#{pref_label_lang.upcase}'" + <<-EOS + + #{pref_label_html} + + EOS + end + private def generate_collections_colors(collections) diff --git a/app/helpers/multi_languages_helper.rb b/app/helpers/multi_languages_helper.rb new file mode 100644 index 000000000..c52f7860d --- /dev/null +++ b/app/helpers/multi_languages_helper.rb @@ -0,0 +1,63 @@ +module MultiLanguagesHelper + + def language_hash(concept_label) + + return concept_label.first if concept_label.is_a?(Array) + return concept_label.to_h.reject { |key, _| %i[links context].include?(key) } if concept_label.is_a?(OpenStruct) + + concept_label + end + + def sorted_labels(labels) + Array(labels).sort_by { |label| label['prefLabel'].is_a?(String) ? label['prefLabel'] : label['prefLabel'].last } + end + + def select_language_label(concept_label, platform_languages = %i[en fr]) + concept_value = nil + + concept = language_hash(concept_label) + + return ['@none', concept] if concept.is_a?(String) + + concept = concept.to_h + + platform_languages.each do |lang| + if concept[lang] + concept_value = [lang, concept[lang]] + break + end + end + + concept_value || concept.to_a.first + end + + def main_language_label(label) + select_language_label(label)&.last + end + + def display_in_multiple_languages(label) + label = language_hash(label) + + if label.nil? + return render Display::AlertComponent.new(message: t('ontology_details.concept.no_preferred_name_for_selected_language'), + type: "warning", + closable: true) + end + + return content_tag(:p, label) if label.is_a?(String) + + raw(label.map do |key, value| + content_tag(:div, class: 'd-flex align-items-center') do + concat content_tag(:p, Array(value).join(', '), class: 'm-0') + + unless key.to_s.upcase.eql?('NONE') || key.to_s.upcase.eql?('@NONE') + concat content_tag(:span, key.upcase, class: 'badge badge-secondary ml-1') + end + end + end.join) + end + + def selected_language_label(label) + language_hash(label).values.first + end +end diff --git a/app/helpers/ontologies_helper.rb b/app/helpers/ontologies_helper.rb index 7a26747b1..5a046bc0b 100644 --- a/app/helpers/ontologies_helper.rb +++ b/app/helpers/ontologies_helper.rb @@ -467,16 +467,33 @@ def language_selector_hidden_tag(section) end def languages_options(submission = @submission || @submission_latest) - current_lang = request_lang + current_lang = request_lang.downcase submission_lang = submission_languages(submission) # Transform each language into a select option submission_lang = submission_lang.map do |lang| lang = lang.split('/').last.upcase [lang, lang, { selected: lang.eql?(current_lang) }] end + + # Add the option to select all language + submission_lang.push(['All', 'all', { selected: current_lang.eql?('all') }]) + options_for_select(submission_lang) end + def display_complex_text(definitions) + html = "" + definitions.each do |definition| + if definition.is_a?(String) + html += '

' + definition + '

' + elsif definition.respond_to?(:uri) && definition.uri + html += render LinkFieldComponent.new(value: definition.uri) + else + html += display_in_multiple_languages(definition) + end + end + return html.html_safe + end private def submission_languages(submission = @submission) diff --git a/app/helpers/schemes_helper.rb b/app/helpers/schemes_helper.rb index 01b3993da..17973c583 100644 --- a/app/helpers/schemes_helper.rb +++ b/app/helpers/schemes_helper.rb @@ -24,19 +24,17 @@ def get_schemes_labels(schemes, main_uri) schemes_labels = [] schemes.each do |x| id = x['@id'] - label = get_scheme_label(x) + label = select_language_label(get_scheme_label(x)) if id.eql? main_uri - label = "#{label} (main)" unless label.empty? + label[1] = "#{label[1]} (main)" unless label[0].empty? selected_label = { 'prefLabel' => label, '@id' => id } else schemes_labels.append( { 'prefLabel' => label, '@id' => id }) end end - schemes_labels.sort_by! { |s| s['prefLabel']} - if selected_label - schemes_labels.unshift selected_label - end + schemes_labels = sorted_labels(schemes_labels) + schemes_labels.unshift selected_label if selected_label [schemes_labels, selected_label] end @@ -50,8 +48,8 @@ def section_name(section) t("ontology_details.sections.#{section}") end - def scheme_path(scheme_id = '') - "/ontologies/#{@ontology.acronym}/schemes/show_scheme?id=#{escape(scheme_id)}" + def scheme_path(scheme_id = '', language = '') + "/ontologies/#{@ontology.acronym}/schemes/show_scheme?id=#{escape(scheme_id)}&lang=#{language}" end def no_main_scheme? @@ -82,21 +80,29 @@ def schemes_data def tree_link_to_schemes(schemes_labels, main_scheme_label, selected_scheme_id) out = '' - schemes_labels.sort_by { |s| [s['prefLabel']] }.each do |s| + + sorted_labels(schemes_labels).each do |s| next unless main_scheme_label.nil? || s['prefLabel'] != main_scheme_label['prefLabel'] - li = <<-EOS -
  • - - #{get_scheme_label(s)} - -
  • + out << <<-EOS +
  • + #{link_to_scheme(s, selected_scheme_id)} +
  • EOS - out << li end out end + def link_to_scheme(scheme, selected_scheme_id) + pref_label_lang, pref_label_html = get_scheme_label(scheme) + tooltip = pref_label_lang.to_s.eql?('@none') ? '' : "data-controller='tooltip' data-tooltip-position-value='right' title='#{pref_label_lang.upcase}'" + <<-EOS + + #{pref_label_html} + + EOS + end end diff --git a/app/javascript/controllers/language_change_controller.js b/app/javascript/controllers/language_change_controller.js index 144b5fa36..ed5961b45 100644 --- a/app/javascript/controllers/language_change_controller.js +++ b/app/javascript/controllers/language_change_controller.js @@ -5,7 +5,6 @@ import { Controller } from "@hotwired/stimulus" export default class extends Controller { dispatchLangChangeEvent() { - debugger this.element.dispatchEvent(new CustomEvent('lang_changed', { bubbles: true, cancelable: true, diff --git a/app/javascript/controllers/ontology_viewer_tabs_controller.js b/app/javascript/controllers/ontology_viewer_tabs_controller.js index f8cb2a310..b5c739824 100644 --- a/app/javascript/controllers/ontology_viewer_tabs_controller.js +++ b/app/javascript/controllers/ontology_viewer_tabs_controller.js @@ -26,17 +26,11 @@ export default class extends Controller { this.changeEvent.removeEventListener() } - selectTab(event) { - this.#updateURL(event) - } - - #updateURL(event){ - const page = event.target.getAttribute("data-bp-ont-page"); - const page_name = event.target.getAttribute("data-bp-ont-page-name"); - - (new HistoryService()).pushState({p: page}, page_name + " | " + jQuery(document).data().bp.ont_viewer.org_site, "?p=" + page); - - this.#disableLanguageSelector(page) + updateLanguageSelector(event) { + if(event.target.id === "ontology_viewer"){ + let page = event.detail.data.selectedTab + this.#disableLanguageSelector(page) + } } #disableLanguageSelector(selectedSection){ diff --git a/app/javascript/controllers/tooltip_controller.js b/app/javascript/controllers/tooltip_controller.js index f9bc3ca02..60fd3d7e9 100644 --- a/app/javascript/controllers/tooltip_controller.js +++ b/app/javascript/controllers/tooltip_controller.js @@ -1,9 +1,19 @@ -import { Controller } from "@hotwired/stimulus" +import {Controller} from "@hotwired/stimulus" import useTooltip from "../mixins/useTooltip"; // Connects to data-controller="tooltip" export default class extends Controller { - connect() { - useTooltip(this.element) - } + + static values = { + position: {type: String, default: 'top'}, + interactive: {type: Boolean, default: false} + } + + connect() { + if (this.element.title && this.element.title !== '') { + useTooltip(this.element, {interactive: this.interactiveValue, placement: this.positionValue}) + } + + } + } diff --git a/app/javascript/mixins/useTooltip.js b/app/javascript/mixins/useTooltip.js index 46b44dc3e..805978000 100644 --- a/app/javascript/mixins/useTooltip.js +++ b/app/javascript/mixins/useTooltip.js @@ -1,3 +1,13 @@ -export default function useTooltip(elem){ - $(elem).tooltipster({theme: 'tooltipster-shadow', contentAsHTML: true}) +import tippy from 'tippy.js'; + +export default function useTooltip(elem, params) { + const content = elem.title + elem.removeAttribute('title') + tippy(elem, { + theme: 'light-border', + animation: 'fade', + content: content, + allowHTML: true, + maxWidth: '400', ...params + }) } \ No newline at end of file diff --git a/app/views/collections/_collection.html.haml b/app/views/collections/_collection.html.haml index a3310e726..914c1a8de 100644 --- a/app/views/collections/_collection.html.haml +++ b/app/views/collections/_collection.html.haml @@ -4,24 +4,10 @@ top_keys: %w[created modified comment note], bottom_keys: [], exclude_keys: %w[member]) do |c| - = c.header do - %tr - %td.label - ID - %td - %p - = collection["@id"] - %tr - %td{nowrap: ""} Preferred Name - %td - %p= get_collection_label(collection) - %tr - %td{nowrap: ""} Members count - %td - %p= collection["memberCount"] - %tr - %td.label - Type - %td - %p - = collection["@type"] \ No newline at end of file + - c.header(stripped: true) do |t| + - t.add_row({th: 'ID'}, {td: collection["@id"]}) + - t.add_row({th: 'Preferred Name'}, {td: display_in_multiple_languages(get_collection_label(collection))}) + - t.add_row({th: 'Members count'}) do |r| + - r.td do + = link_to collection["memberCount"], "/ontologies/" + @ontology.acronym + "/?p=classes&sub_menu=list&concept_collections=" + collection["@id"], 'data-turbo-frame':'_top' + - t.add_row({th: 'Type'}, {td: collection["@type"]}) diff --git a/app/views/collections/_list_view.html.haml b/app/views/collections/_list_view.html.haml index acecf36c9..bfe256748 100644 --- a/app/views/collections/_list_view.html.haml +++ b/app/views/collections/_list_view.html.haml @@ -8,9 +8,6 @@ %ul.simpleTree{data:{controller: 'simple-tree', 'simple-tree': { 'auto-click-value': "true" }, action: 'clicked->history#updateURL'}} %li.root %ul - - collections_labels.sort_by{|s| [s["prefLabel"]]}.each do |s| + - sort_collections_label(collections_labels).each do |c| %li.doc - %a{id: s["@id"], href: collection_path(s["@id"]), - data: { turbo: "true", 'turbo-frame': 'collection', 'collectionid': s["@id"]}, - class: selected_collection_id.eql?(s["@id"]) ? "active" : nil } - = get_collection_label(s) \ No newline at end of file + = raw link_to_collection(c, selected_collection_id) \ No newline at end of file diff --git a/app/views/concepts/_details.html.haml b/app/views/concepts/_details.html.haml index a0ff30684..a317e9b3e 100644 --- a/app/views/concepts/_details.html.haml +++ b/app/views/concepts/_details.html.haml @@ -2,10 +2,7 @@ - schemes_keys = %w[hasTopConcept topConceptOf] - label_xl_set = %w[skos-xl#prefLabel skos-xl#altLabel skos-xl#hiddenLabel] - - if @concept.prefLabel.nil? - %div.py-3.px-2 - = render(AlertMessageComponent.new(message: t('ontology_details.concept.no_preferred_name_for_selected_language'), type: "warning", closeable: true)) - + = render ConceptDetailsComponent.new(id:'concept-details', acronym: @ontology.acronym, properties: @concept.properties, top_keys: %w[description comment], @@ -22,25 +19,26 @@ %td %p= @concept.prefLabel({:use_html => true}).html_safe + - c.header(stripped: true) do |t| + - t.add_row({th: t('ontology_details.concept.id')}, {td:@concept.id}) + - t.add_row({th: t('ontology_details.concept.preferred_name')}) do |h| + - h.td do + = display_in_multiple_languages(@concept.prefLabel) + - unless @concept.synonym.nil? || @concept.synonym.empty? - %tr - %td{nowrap: ""}= t('ontology_details.concept.synonyms') - %td - - for synonym in @concept.synonym - %p= synonym - %td - %div.synonym-change-request - = add_synonym_button - = remove_synonym_button - - + - t.add_row({th: t('ontology_details.concept.synonyms')}) do |h| + - h.td do + %div.d-flex + %div + = display_in_multiple_languages(@concept.synonym) + %div.synonym-change-request + = add_synonym_button + = remove_synonym_button + + - unless @concept.definition.nil? || @concept.definition.empty? - %tr - %td{nowrap: ""}= t('ontology_details.concept.definitions') - %td - %p= @concept.definition.join(" ") - - + - t.add_row({th: t('ontology_details.concept.definitions')}, {td: display_in_multiple_languages(@concept.definition)}) + - if @concept.obsolete? %tr %td{nowrap: ""}= t('ontology_details.concept.obsolete') diff --git a/app/views/concepts/_list.html.haml b/app/views/concepts/_list.html.haml index 83a4a27d3..dcc22d8ed 100644 --- a/app/views/concepts/_list.html.haml +++ b/app/views/concepts/_list.html.haml @@ -3,7 +3,7 @@ next_url: concept_list_url(@page.nextPage, request_collection_id, @ontology.acronym), current_page: @page.page, next_page: @page.nextPage, auto_click: @auto_click) do |c| - - concepts = c.collection.sort_by{|concept| [concept.prefLabel || concept.id]} + - concepts = c.collection.sort_by{|concept| [concept.prefLabel&.capitalize || concept.id]} - if concepts && !concepts.empty? = raw tree_link_to_concept(child: concepts.shift, ontology_acronym: @ontology.acronym, active_style: c.auto_click? ? 'active' : '') - concepts.each do |concept| diff --git a/app/views/layouts/_ontology_viewer.html.haml b/app/views/layouts/_ontology_viewer.html.haml index d2ad4caea..f401a4cd7 100644 --- a/app/views/layouts/_ontology_viewer.html.haml +++ b/app/views/layouts/_ontology_viewer.html.haml @@ -1,6 +1,5 @@ - content_section = current_section -- concept_title = @concept.nil? ? "" : " - #{@concept.prefLabel} - Classes" -- @title = "#{@ontology.name}#{concept_title}" +- @title = ontology_viewer_page_name(@ontology.name, @concept&.prefLabel || '', content_section) = render :partial =>'layouts/header' 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/_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/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