config/initializers/i18n.rb
def translate_with_service_name(*args)
      service_name = ApplicationHelper.fetch_community_service_name_from_thread

      options  = args.last.is_a?(Hash) ? args.pop : {}

      with_service_name = if !options.key?(:service_name)
        options.merge(:service_name => service_name)
      else
        options
      end

      translate_without_service_name(*(args << with_service_name))
    end
# Monkey patch the translate method to include service name options
Monkey patch the translate method to include service name options
Monkey patch the translate method to include service name options
def translate_with_service_name(*args)
      service_name = ApplicationHelper.fetch_community_service_name_from_thread
      options  = args.last.is_a?(Hash) ? args.pop : {}
      with_service_name = if !options.key?(:service_name)
        options.merge(:service_name => service_name)
      else
        options
      end
      translate_without_service_name(*(args << with_service_name))
    end
def translate_with_service_name ( * args ) service_name = ApplicationHelper . fetch_community_service_name_from_thread options = args . last . is_a? ( Hash ) ? args . pop : { } with_service_name = if ! options . key? ( :service_name ) options . merge ( :service_name => service_name ) else options end translate_without_service_name ( * ( args << with_service_name ) ) end
Monkey patch the translate method to include service name options
Monkey patch the translate method to include service name options
args