-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
27 lines (21 loc) · 984 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'redmine'
unless Object.const_defined?(:EASY_EXTENSIONS_ENABLED)
if Object.const_defined?(:EasyExtensions)
EASY_EXTENSIONS_ENABLED = true
else
EASY_EXTENSIONS_ENABLED = false
end
end
Redmine::Plugin.register :easy_google_translator do
name(EASY_EXTENSIONS_ENABLED ? :easy_google_translator_plugin_name : 'Google translator')
author(EASY_EXTENSIONS_ENABLED ? :easy_google_translator_plugin_author : 'Easy Software')
author_url(EASY_EXTENSIONS_ENABLED ? :easy_google_translator_plugin_author_url : 'http://www.easyredmine.com')
description(EASY_EXTENSIONS_ENABLED ? :easy_google_translator_plugin_description : '- Automatic translation of Redmine')
version '2013'
visible(false) if EASY_EXTENSIONS_ENABLED
migration_order(300) if EASY_EXTENSIONS_ENABLED
plugin_in_relative_subdirectory(File.join('easyproject', 'easy_plugins')) if EASY_EXTENSIONS_ENABLED
end
ActionDispatch::Reloader.to_prepare do
require 'easy_google_translator/hooks'
end