Project

General

Profile

Actions

Patch #2112

closed

GLoc plugin available from hook

Added by Diego Sousa over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
2008-10-30
Due date:
% Done:

0%

Estimated time:

Description

in file /vendor/plugins/gloc**/lib/gloc-rails.rb

insert in the last line

module Redmine
  module Hook
      include GLoc
  end
end

with this hooks can use GLoc plugin

Actions #1

Updated by Jean-Philippe Lang over 15 years ago

  • Category set to Plugin API
  • Status changed from New to Resolved

Actually, it should be included in Redmine::Hook::Listener instead if you want to use GLoc methods in your listeners. It's done in r2005.
Am I missing something?

Actions #2

Updated by Eric Davis over 15 years ago

Jean-Philippe Lang wrote:

Am I missing something?

That should be fine. I've used the full class method in my hooks before this:

# http://github.com/edavis10/redmine-budget-plugin/tree/master/lib/budget_project_hook.rb

return "<th>#{GLoc.l(:label_member_rate) }</th>" 
Actions #3

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from Resolved to Closed

Thanks Eric. Reopen if needed.

Actions

Also available in: Atom PDF