Skip to content

Commit

Permalink
use request_lang in show concept details and concept children
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Mar 26, 2023
1 parent 4ea7592 commit e39f1b6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/controllers/concepts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def show_concept

@submission = get_ontology_submission_ready(@ontology)
@ob_instructions = helpers.ontolobridge_instructions_template(@ontology)
@concept = @ontology.explore.single_class({full: true}, params[:id])
@concept = @ontology.explore.single_class({full: true, language: request_lang}, params[:id])
@instances_concept_id = @concept.id

concept_not_found(params[:id]) if @concept.nil?
Expand Down Expand Up @@ -53,9 +53,8 @@ def show

@concept = @ontology.explore.single_class({full: true}, params[:id])
concept_not_found(params[:id]) if @concept.nil?

show_uri_request # process a full call
render :file => '/ontologies/visualize', :use_full_path => true, :layout => 'ontology'
@schemes = params[:concept_schemes].split(',')
show_ajax_request # process a full call
end
end

Expand Down Expand Up @@ -189,7 +188,7 @@ def show_ajax_request
gather_details
render :partial => 'load'
when 'children' # Children is called only for drawing the tree
@children = @concept.explore.children(pagesize: 750, concept_schemes: @schemes.join(',')).collection || []
@children = @concept.explore.children(pagesize: 750, concept_schemes: @schemes.join(','), language: request_lang, display: 'prefLabel,obsolete,hasChildren').collection || []
@children.sort! { |x, y| (x.prefLabel || "").downcase <=> (y.prefLabel || "").downcase } unless @children.empty?
render :partial => 'child_nodes'
end
Expand Down

0 comments on commit e39f1b6

Please sign in to comment.