forked from ontoportal/ontologies_api
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge to master: Release 2.3.4 - Multilingual (#42)
* Merge pull request #34 from ontoportal-lirmm/feature/paginate-and-filter-ontologies-endpoint Feature: Implement pagination and filters to submissions endpoint * Merge pull request #36 from ontoportal-lirmm/feature/paginate-and-filter-ontologies-endpoint Feature: Add oder by and filters for ontologies endpoint * Merge pull request #32 from ontoportal-lirmm/feature/support-multilingual-read-one-language-from-request-parameter Feature: Support multilingual - Add request_lang middleware * Feature: Add support of multilingual search (#40) * update get_term_search_query to support multilanguages search * rename var * fix search lang suffix to use underscore not @ * add multilangual search test --------- Co-authored-by: Syphax Bouazzouni <[email protected]> --------- Co-authored-by: HADDAD Zineddine <[email protected]>
- Loading branch information
1 parent
c791b3f
commit 7afc661
Showing
9 changed files
with
129 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Rack | ||
class RequestLang | ||
|
||
def initialize(app = nil, options = {}) | ||
@app = app | ||
end | ||
|
||
def call(env) | ||
r = Rack::Request.new(env) | ||
lang = r.params["lang"] || r.params["language"] | ||
lang = lang.upcase.to_sym if lang | ||
RequestStore.store[:requested_lang] = lang | ||
@app.call(env) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.8' | ||
|
||
services: | ||
op_solr: | ||
image: solr:8.8 | ||
volumes: | ||
- ./solr_configsets:/configsets:ro | ||
ports: | ||
- "8983:8983" | ||
command: > | ||
bash -c "precreate-core term_search_core1 /configsets/term_search | ||
&& precreate-core prop_search_core1 /configsets/property_search | ||
&& solr-foreground" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters