lib/redmine_clf2/patches/setting_patch.rb
# Wrap the welcome_text field so it will serve up the French or
# English version based on the current language.  If the main
# one that is requested isn't present, the alternative will be
# returned.
#
# Need to use class_eval because of how the getter/setters
# are defined.
Wrap the welcome_text field so it will serve up the French or
English version based on the current language.  If the main
one that is requested isn't present, the alternative will be
returned.

Need to use class_eval because of how the getter/setters
are defined.
Wrap the welcome_text field so it will serve up the French or English version based on the current language . If the main one that is requested isn ' t present the alternative will be returned . Need to use class_eval because of how the getter / setters are defined .
def welcome_text
              if current_language == :fr
                if self.french_welcome_text?
                  Setting.plugin_redmine_clf2['welcome_text_fr']
                elsif self.english_welcome_text?
                  english_welcome_text
                else
                  ''
                end
              else
                if self.english_welcome_text?
                  english_welcome_text
                elsif self.french_welcome_text?
                  Setting.plugin_redmine_clf2['welcome_text_fr']
                else
                  ''
                end
              end
            end
def welcome_text if current_language == :fr if self . french_welcome_text? Setting . plugin_redmine_clf2 [ 'welcome_text_fr' ] elsif self . english_welcome_text? english_welcome_text else '' end else if self . english_welcome_text? english_welcome_text elsif self . french_welcome_text? Setting . plugin_redmine_clf2 [ 'welcome_text_fr' ] else '' end end end
Wrap the welcome_text field so it will serve up the French or
English version based on the current language.
Wrap the welcome_text field so it will serve up the French or English version based on the current language .