-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multilingual support #325
Multilingual support #325
Conversation
v3.1.0 causing deployment issues
…ui into multilingual_support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments, of not used code that can be removed.
But you adapted well our code to work with the old Jauery code, maybe you should merge it in the develop
branch ?
gem 'terser' | ||
gem 'thin' | ||
gem 'will_paginate', '~> 3.0' | ||
gem 'net-ftp' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure net-ftp
is required
@@ -0,0 +1,21 @@ | |||
class LanguageController < ApplicationController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is not needed
@@ -0,0 +1,43 @@ | |||
module InternationalisationHelper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is not needed
@@ -0,0 +1,146 @@ | |||
module MultiLanguagesHelper | |||
|
|||
def portal_language_help_text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
portal_language_help_text
, portal_languages
and portal_language_selector
can be removed as not used
lang | ||
end | ||
|
||
def lang_code(code_in) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is not used and can be removed
@@ -25,7 +25,11 @@ | |||
%tr | |||
%td Preferred Name | |||
%td | |||
%p= @concept.prefLabel({:use_html => true}).html_safe | |||
%p | |||
- if @concept.prefLabel({:use_html => false}).to_s.empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be changed to @concept.prefLabel.blank?
, to prevent the nil
exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code @concept.prefLabel({:use_html => false}).to_s.empty?
will not throw a nil
exception.
nil.to_s
is a valid call that will turn a nil into an empty string. xxx.to_s.empty?
is generally used to check for either nil or empty?
condition.
Pull request to merge the multilingual enhancements to master. This request implements a dropdown menu to allow switching between available languages when viewing an ontology terms.