Project

General

Profile

Actions

Defect #2211

closed

GLoc don't work in init.rb of plugins

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-11-18
Due date:
% Done:

100%

Estimated time:
Resolution:
Affected version:

Description

Hi,

I don't need use gloc at all in init.rb of plugins, but this time i need to translate some links to insert in top_menu, but gloc doesnt work there, i did a quick fix to insert in every plugin to GLoc work, it was in Redmine::Plugin but i dont want to insert anything in core so i moved to plugins i need

Redmine::Plugin.send(:include, GLoc)
require "#{RAILS_ROOT}/config/initializers/30-redmine" 

Have any general and better way to do this?

Thanks!

Actions #1

Updated by Chaoqun Zou over 15 years ago

In my plugin I write code like this and it works.

menu :project_menu, :books, {:controller => 'books', :action => 'index'}, :caption => :label_library, :param => :project_id  
Actions #2

Updated by Diego Sousa over 15 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Sry, my bad!

i was doing this

menu :top_menu, l(:label_report), { :controller => 'report', :action => 'index' }, :after => :administration

Thanks Zou! :)

Actions #3

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from Resolved to Closed
  • Affected version (unused) deleted (devel)
Actions

Also available in: Atom PDF