summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2006-07-29 09:32:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2006-07-29 09:32:58 +0000
commit310a0f924aa0092228a173cc71864af4ce574f1f (patch)
tree9885aa2d18d4cf99f6d00100e260bbe56cf255f5
parent7e57db1edbad635fcbe1e3ae3294d24e1a43046f (diff)
downloadredmine-310a0f924aa0092228a173cc71864af4ce574f1f.tar.gz
redmine-310a0f924aa0092228a173cc71864af4ce574f1f.zip
0.3 unstable
git-svn-id: http://redmine.rubyforge.org/svn/trunk@12 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--redmine/app/controllers/account_controller.rb141
-rw-r--r--redmine/app/controllers/application.rb63
-rw-r--r--redmine/app/controllers/auth_sources_controller.rb82
-rw-r--r--redmine/app/controllers/custom_fields_controller.rb57
-rw-r--r--redmine/app/controllers/documents_controller.rb2
-rw-r--r--redmine/app/controllers/issues_controller.rb44
-rw-r--r--redmine/app/controllers/projects_controller.rb230
-rw-r--r--redmine/app/controllers/users_controller.rb15
-rw-r--r--redmine/app/controllers/welcome_controller.rb9
-rw-r--r--redmine/app/helpers/application_helper.rb78
-rw-r--r--redmine/app/helpers/auth_sources_helper.rb19
-rw-r--r--redmine/app/helpers/custom_fields_helper.rb62
-rw-r--r--redmine/app/models/attachment.rb2
-rw-r--r--redmine/app/models/auth_source.rb47
-rw-r--r--redmine/app/models/auth_source_ldap.rb79
-rw-r--r--redmine/app/models/custom_field.rb38
-rw-r--r--redmine/app/models/custom_value.rb42
-rw-r--r--redmine/app/models/document.rb2
-rw-r--r--redmine/app/models/issue.rb12
-rw-r--r--redmine/app/models/issue_custom_field.rb27
-rw-r--r--redmine/app/models/mailer.rb46
-rw-r--r--redmine/app/models/news.rb2
-rw-r--r--redmine/app/models/permission.rb2
-rw-r--r--redmine/app/models/project.rb52
-rw-r--r--redmine/app/models/project_custom_field.rb22
-rw-r--r--redmine/app/models/token.rb44
-rw-r--r--redmine/app/models/tracker.rb3
-rw-r--r--redmine/app/models/user.rb49
-rw-r--r--redmine/app/models/user_custom_field.rb23
-rw-r--r--redmine/app/views/account/login.rhtml34
-rw-r--r--redmine/app/views/account/lost_password.rhtml14
-rw-r--r--redmine/app/views/account/my_account.rhtml36
-rw-r--r--redmine/app/views/account/my_page.rhtml17
-rw-r--r--redmine/app/views/account/password_recovery.rhtml21
-rw-r--r--redmine/app/views/account/register.rhtml46
-rw-r--r--redmine/app/views/account/show.rhtml8
-rw-r--r--redmine/app/views/admin/index.rhtml31
-rw-r--r--redmine/app/views/admin/info.rhtml4
-rw-r--r--redmine/app/views/admin/mail_options.rhtml12
-rw-r--r--redmine/app/views/admin/projects.rhtml18
-rw-r--r--redmine/app/views/auth_sources/_form.rhtml49
-rw-r--r--redmine/app/views/auth_sources/edit.rhtml7
-rw-r--r--redmine/app/views/auth_sources/list.rhtml32
-rw-r--r--redmine/app/views/auth_sources/new.rhtml6
-rw-r--r--redmine/app/views/custom_fields/_form.rhtml55
-rw-r--r--redmine/app/views/custom_fields/edit.rhtml6
-rw-r--r--redmine/app/views/custom_fields/list.rhtml29
-rw-r--r--redmine/app/views/custom_fields/new.rhtml7
-rw-r--r--redmine/app/views/documents/_form.rhtml10
-rw-r--r--redmine/app/views/documents/show.rhtml2
-rw-r--r--redmine/app/views/issues/change_status.rhtml5
-rw-r--r--redmine/app/views/issues/edit.rhtml27
-rw-r--r--redmine/app/views/issues/show.rhtml11
-rw-r--r--redmine/app/views/layouts/base.rhtml97
-rw-r--r--redmine/app/views/mailer/_issue.rhtml4
-rw-r--r--redmine/app/views/mailer/issue_add_en.rhtml (renamed from redmine/app/views/mailer/issue_add.rhtml)0
-rw-r--r--redmine/app/views/mailer/issue_add_fr.rhtml3
-rw-r--r--redmine/app/views/mailer/issue_change_status_en.rhtml (renamed from redmine/app/views/mailer/issue_change_status.rhtml)0
-rw-r--r--redmine/app/views/mailer/issue_change_status_fr.rhtml3
-rw-r--r--redmine/app/views/mailer/lost_password_en.rhtml3
-rw-r--r--redmine/app/views/mailer/lost_password_fr.rhtml3
-rw-r--r--redmine/app/views/mailer/register_en.rhtml3
-rw-r--r--redmine/app/views/mailer/register_fr.rhtml3
-rw-r--r--redmine/app/views/news/_form.rhtml8
-rw-r--r--redmine/app/views/news/show.rhtml4
-rw-r--r--redmine/app/views/projects/_form.rhtml17
-rw-r--r--redmine/app/views/projects/add.rhtml1
-rw-r--r--redmine/app/views/projects/add_document.rhtml4
-rw-r--r--redmine/app/views/projects/add_issue.rhtml33
-rw-r--r--redmine/app/views/projects/changelog.rhtml2
-rw-r--r--redmine/app/views/projects/list.rhtml2
-rw-r--r--redmine/app/views/projects/list_documents.rhtml2
-rw-r--r--redmine/app/views/projects/list_issues.rhtml8
-rw-r--r--redmine/app/views/projects/list_news.rhtml2
-rw-r--r--redmine/app/views/projects/settings.rhtml6
-rw-r--r--redmine/app/views/projects/show.rhtml21
-rw-r--r--redmine/app/views/roles/_form.rhtml5
-rw-r--r--redmine/app/views/trackers/_form.rhtml2
-rw-r--r--redmine/app/views/users/_form.rhtml24
-rw-r--r--redmine/app/views/users/list.rhtml6
-rw-r--r--redmine/app/views/versions/_form.rhtml4
-rw-r--r--redmine/app/views/welcome/index.rhtml9
-rw-r--r--redmine/config/config_custom.rb57
-rw-r--r--redmine/config/environment.rb71
-rw-r--r--redmine/config/environments/test.rb1
-rw-r--r--redmine/doc/CHANGELOG28
-rw-r--r--redmine/doc/INSTALL14
-rw-r--r--redmine/lang/en.yml113
-rw-r--r--redmine/lang/en_US.rb2
-rw-r--r--redmine/lang/fr.yml199
-rw-r--r--redmine/lang/fr_FR.rb32
-rw-r--r--redmine/lib/tasks/extract_fixtures.rake24
-rw-r--r--redmine/public/images/Copie de help.pngbin379 -> 0 bytes
-rw-r--r--redmine/public/images/alert.pngbin0 -> 483 bytes
-rw-r--r--redmine/public/images/login.pngbin0 -> 1082 bytes
-rw-r--r--redmine/public/images/logout.pngbin342 -> 0 bytes
-rw-r--r--redmine/public/javascripts/menu.js556
-rw-r--r--redmine/public/stylesheets/application.css27
-rw-r--r--redmine/public/stylesheets/menu.css39
-rw-r--r--redmine/public/stylesheets/rails.css21
-rw-r--r--redmine/test/fixtures/attachments.yml13
-rw-r--r--redmine/test/fixtures/auth_sources.yml2
-rw-r--r--redmine/test/fixtures/custom_fields.yml45
-rw-r--r--redmine/test/fixtures/custom_fields_projects.yml2
-rw-r--r--redmine/test/fixtures/custom_fields_trackers.yml10
-rw-r--r--redmine/test/fixtures/custom_values.yml43
-rw-r--r--redmine/test/fixtures/documents.yml2
-rw-r--r--redmine/test/fixtures/enumerations.yml33
-rw-r--r--redmine/test/fixtures/issue_categories.yml9
-rw-r--r--redmine/test/fixtures/issue_histories.yml29
-rw-r--r--redmine/test/fixtures/issue_statuses.yml37
-rw-r--r--redmine/test/fixtures/issues.yml43
-rw-r--r--redmine/test/fixtures/members.yml13
-rw-r--r--redmine/test/fixtures/news.yml20
-rw-r--r--redmine/test/fixtures/permissions.yml379
-rw-r--r--redmine/test/fixtures/permissions_roles.yml379
-rw-r--r--redmine/test/fixtures/projects.yml67
-rw-r--r--redmine/test/fixtures/roles.yml20
-rw-r--r--redmine/test/fixtures/tokens.yml1
-rw-r--r--redmine/test/fixtures/trackers.yml13
-rw-r--r--redmine/test/fixtures/users.yml80
-rw-r--r--redmine/test/fixtures/versions.yml17
-rw-r--r--redmine/test/fixtures/workflows.yml1621
-rw-r--r--redmine/test/functional/projects_controller_test.rb73
-rw-r--r--redmine/test/integration/account_test.rb45
-rw-r--r--redmine/test/integration/admin_test.rb16
-rw-r--r--redmine/test/test_helper.rb4
-rw-r--r--redmine/test/unit/member_test.rb51
-rw-r--r--redmine/test/unit/project_test.rb44
-rw-r--r--redmine/test/unit/token_test.rb10
-rw-r--r--redmine/test/unit/user_test.rb56
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/CHANGELOG19
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/MIT-LICENSE19
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/README208
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/Rakefile15
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionController/Filters/ClassMethods.html230
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionMailer/Base.html140
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html174
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html348
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html167
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Errors.html215
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Validations/ClassMethods.html217
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc.html774
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/ClassMethods.html160
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html323
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/InstanceMethods.html364
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/created.rid1
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/CHANGELOG.html153
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/README.html480
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-helpers_rb.html107
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-internal_rb.html115
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails-text_rb.html114
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails_rb.html114
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-ruby_rb.html107
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-version_rb.html101
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc_rb.html116
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/fr_class_index.html37
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/fr_file_index.html35
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/fr_method_index.html72
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/index.html24
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/doc/rdoc-style.css208
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/init.rb11
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-config.rb16
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-dev.rb97
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-helpers.rb20
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-internal.rb134
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb137
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb230
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-ruby.rb7
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc-version.rb12
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/lib/gloc.rb294
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/tasks/gloc.rake30
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/gloc_rails_test.rb118
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/gloc_test.rb433
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/lang/en.yaml2
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/lang/en_AU.yaml2
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/lang/ja.yml2
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/lang2/en.yml2
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/lang2/ja.yaml2
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-string_ext.rb23
-rw-r--r--redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-time_ext.rb76
-rw-r--r--redmine/vendor/plugins/localization/lib/localization.rb6
182 files changed, 12487 insertions, 745 deletions
diff --git a/redmine/app/controllers/account_controller.rb b/redmine/app/controllers/account_controller.rb
index 54e0ef704..b156bfd5b 100644
--- a/redmine/app/controllers/account_controller.rb
+++ b/redmine/app/controllers/account_controller.rb
@@ -17,11 +17,14 @@
class AccountController < ApplicationController
layout 'base'
+ helper :custom_fields
+ include CustomFieldsHelper
# prevents login action to be filtered by check_if_login_required application scope filter
- skip_before_filter :check_if_login_required, :only => :login
- before_filter :require_login, :except => [:show, :login]
+ skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register]
+ before_filter :require_login, :except => [:show, :login, :lost_password, :register]
+ # Show user's account
def show
@user = User.find(params[:id])
end
@@ -29,49 +32,123 @@ class AccountController < ApplicationController
# Login request and validation
def login
if request.get?
- session[:user] = nil
+ # Logout user
+ self.logged_in_user = nil
else
- logged_in_user = User.try_to_login(params[:login], params[:password])
- if logged_in_user
- session[:user] = logged_in_user
+ # Authenticate user
+ user = User.try_to_login(params[:login], params[:password])
+ if user
+ self.logged_in_user = user
redirect_back_or_default :controller => 'account', :action => 'my_page'
else
- flash[:notice] = _('Invalid user/password')
+ flash[:notice] = l(:notice_account_invalid_creditentials)
end
end
end
-
- # Log out current user and redirect to welcome page
- def logout
- session[:user] = nil
- redirect_to(:controller => '')
- end
- def my_page
- @user = session[:user]
- @reported_issues = Issue.find(:all, :conditions => ["author_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
- @assigned_issues = Issue.find(:all, :conditions => ["assigned_to_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
- end
-
- # Edit current user's account
- def my_account
- @user = User.find(session[:user].id)
- if request.post? and @user.update_attributes(@params[:user])
- flash[:notice] = 'Account was successfully updated.'
- session[:user] = @user
+ # Log out current user and redirect to welcome page
+ def logout
+ self.logged_in_user = nil
+ redirect_to :controller => ''
+ end
+
+ # Show logged in user's page
+ def my_page
+ @user = self.logged_in_user
+ @reported_issues = Issue.find(:all, :conditions => ["author_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
+ @assigned_issues = Issue.find(:all, :conditions => ["assigned_to_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
+ end
+
+ # Edit logged in user's account
+ def my_account
+ @user = self.logged_in_user
+ if request.post? and @user.update_attributes(@params[:user])
set_localization
- end
- end
+ flash[:notice] = l(:notice_account_updated)
+ self.logged_in_user.reload
+ end
+ end
- # Change current user's password
+ # Change logged in user's password
def change_password
- @user = User.find(session[:user].id)
+ @user = self.logged_in_user
if @user.check_password?(@params[:password])
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
- flash[:notice] = 'Password was successfully updated.' if @user.save
+ flash[:notice] = l(:notice_account_password_updated) if @user.save
else
- flash[:notice] = 'Wrong password'
+ flash[:notice] = l(:notice_account_wrong_password)
end
render :action => 'my_account'
- end
+ end
+
+ # Enable user to choose a new password
+ def lost_password
+ if params[:token]
+ @token = Token.find_by_action_and_value("recovery", params[:token])
+ redirect_to :controller => '' and return unless @token and !@token.expired?
+ @user = @token.user
+ if request.post?
+ @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
+ if @user.save
+ @token.destroy
+ flash[:notice] = l(:notice_account_password_updated)
+ redirect_to :action => 'login'
+ return
+ end
+ end
+ render :template => "account/password_recovery"
+ return
+ else
+ if request.post?
+ user = User.find_by_mail(params[:mail])
+ flash[:notice] = l(:notice_account_unknown_email) and return unless user
+ token = Token.new(:user => user, :action => "recovery")
+ if token.save
+ Mailer.set_language_if_valid(Localization.lang)
+ Mailer.deliver_lost_password(token)
+ flash[:notice] = l(:notice_account_lost_email_sent)
+ redirect_to :action => 'login'
+ return
+ end
+ end
+ end
+ end
+
+ # User self-registration
+ def register
+ redirect_to :controller => '' and return if $RDM_SELF_REGISTRATION == false
+ if params[:token]
+ token = Token.find_by_action_and_value("register", params[:token])
+ redirect_to :controller => '' and return unless token and !token.expired?
+ user = token.user
+ redirect_to :controller => '' and return unless user.status == User::STATUS_REGISTERED
+ user.status = User::STATUS_ACTIVE
+ if user.save
+ token.destroy
+ flash[:notice] = l(:notice_account_activated)
+ redirect_to :action => 'login'
+ return
+ end
+ else
+ if request.get?
+ @user = User.new(:language => $RDM_DEFAULT_LANG)
+ @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
+ else
+ @user = User.new(params[:user])
+ @user.admin = false
+ @user.login = params[:user][:login]
+ @user.status = User::STATUS_REGISTERED
+ @user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
+ @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
+ @user.custom_values = @custom_values
+ token = Token.new(:user => @user, :action => "register")
+ if @user.save and token.save
+ Mailer.set_language_if_valid(Localization.lang)
+ Mailer.deliver_register(token)
+ flash[:notice] = l(:notice_account_register_done)
+ redirect_to :controller => ''
+ end
+ end
+ end
+ end
end
diff --git a/redmine/app/controllers/application.rb b/redmine/app/controllers/application.rb
index 9cc37cfa9..adae23550 100644
--- a/redmine/app/controllers/application.rb
+++ b/redmine/app/controllers/application.rb
@@ -18,43 +18,59 @@
class ApplicationController < ActionController::Base
before_filter :check_if_login_required, :set_localization
+ def logged_in_user=(user)
+ @logged_in_user = user
+ session[:user_id] = (user ? user.id : nil)
+ end
+
+ def logged_in_user
+ if session[:user_id]
+ @logged_in_user ||= User.find(session[:user_id], :include => :memberships)
+ else
+ nil
+ end
+ end
+
# check if login is globally required to access the application
def check_if_login_required
- require_login if RDM_LOGIN_REQUIRED
+ require_login if $RDM_LOGIN_REQUIRED
end
def set_localization
Localization.lang = begin
- if session[:user]
- session[:user].language
+ if self.logged_in_user and Localization.langs.keys.include? self.logged_in_user.language
+ self.logged_in_user.language
elsif request.env['HTTP_ACCEPT_LANGUAGE']
accept_lang = HTTPUtils.parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.split('-').first
- if Localization.langs.collect{ |l| l[1] }.include? accept_lang
+ if Localization.langs.keys.include? accept_lang
accept_lang
end
end
rescue
nil
- end || RDM_DEFAULT_LANG
+ end || $RDM_DEFAULT_LANG
+
+ set_language_if_valid(Localization.lang)
+
end
def require_login
- unless session[:user]
+ unless self.logged_in_user
store_location
redirect_to(:controller => "account", :action => "login")
+ return false
end
+ true
end
def require_admin
- if session[:user].nil?
- store_location
- redirect_to(:controller => "account", :action => "login")
- else
- unless session[:user].admin?
- flash[:notice] = "Acces not allowed"
- redirect_to(:controller => "projects", :action => "list")
- end
+ return unless require_login
+ unless self.logged_in_user.admin?
+ flash[:notice] = "Acces denied"
+ redirect_to:controller => ''
+ return false
end
+ true
end
# authorizes the user for the requested action.
@@ -62,19 +78,18 @@ class ApplicationController < ActionController::Base
# check if action is allowed on public projects
if @project.is_public? and Permission.allowed_to_public "%s/%s" % [ @params[:controller], @params[:action] ]
return true
- end
- # if user not logged in, redirect to login form
- unless session[:user]
- store_location
- redirect_to(:controller => "account", :action => "login")
- return false
- end
- # if logged in, check if authorized
- if session[:user].admin? or Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], session[:user].role_for_project(@project.id) )
+ end
+ # if action is not public, force login
+ return unless require_login
+ # admin is always authorized
+ return true if self.logged_in_user.admin?
+ # if not admin, check membership permission
+ @user_membership ||= Member.find(:first, :conditions => ["user_id=? and project_id=?", self.logged_in_user.id, @project.id])
+ if @user_membership and Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], @user_membership.role_id )
return true
end
flash[:notice] = "Acces denied"
- redirect_to(:controller => "")
+ redirect_to :controller => ''
false
end
diff --git a/redmine/app/controllers/auth_sources_controller.rb b/redmine/app/controllers/auth_sources_controller.rb
new file mode 100644
index 000000000..fe8536f99
--- /dev/null
+++ b/redmine/app/controllers/auth_sources_controller.rb
@@ -0,0 +1,82 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+class AuthSourcesController < ApplicationController
+ layout 'base'
+ before_filter :require_admin
+
+ def index
+ list
+ render :action => 'list'
+ end
+
+ # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+ verify :method => :post, :only => [ :destroy, :create, :update ],
+ :redirect_to => { :action => :list }
+
+ def list
+ @auth_source_pages, @auth_sources = paginate :auth_sources, :per_page => 10
+ end
+
+ def new
+ @auth_source = AuthSourceLdap.new
+ end
+
+ def create
+ @auth_source = AuthSourceLdap.new(params[:auth_source])
+ if @auth_source.save
+ flash[:notice] = l(:notice_successful_create)
+ redirect_to :action => 'list'
+ else
+ render :action => 'new'
+ end
+ end
+
+ def edit
+ @auth_source = AuthSource.find(params[:id])
+ end
+
+ def update
+ @auth_source = AuthSource.find(params[:id])
+ if @auth_source.update_attributes(params[:auth_source])
+ flash[:notice] = l(:notice_successful_update)
+ redirect_to :action => 'list'
+ else
+ render :action => 'edit'
+ end
+ end
+
+ def test_connection
+ @auth_method = AuthSource.find(params[:id])
+ begin
+ @auth_method.test_connection
+ rescue => text
+ flash[:notice] = text
+ end
+ flash[:notice] ||= l(:notice_successful_connection)
+ redirect_to :action => 'list'
+ end
+
+ def destroy
+ @auth_source = AuthSource.find(params[:id])
+ unless @auth_source.users.find(:first)
+ @auth_source.destroy
+ flash[:notice] = l(:notice_successful_delete)
+ end
+ redirect_to :action => 'list'
+ end
+end
diff --git a/redmine/app/controllers/custom_fields_controller.rb b/redmine/app/controllers/custom_fields_controller.rb
index 93f6353fa..57430743d 100644
--- a/redmine/app/controllers/custom_fields_controller.rb
+++ b/redmine/app/controllers/custom_fields_controller.rb
@@ -16,37 +16,48 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CustomFieldsController < ApplicationController
- layout 'base'
- before_filter :require_admin
-
+ layout 'base'
+ before_filter :require_admin
+
def index
list
render :action => 'list'
end
def list
- @custom_field_pages, @custom_fields = paginate :custom_fields, :per_page => 10
+ @custom_field_pages, @custom_fields = paginate :custom_fields, :per_page => 15
end
-
+
def new
- if request.get?
- @custom_field = CustomField.new
- else
- @custom_field = CustomField.new(params[:custom_field])
- if @custom_field.save
- flash[:notice] = 'CustomField was successfully created.'
- redirect_to :action => 'list'
+ case params[:type]
+ when "IssueCustomField"
+ @custom_field = IssueCustomField.new(params[:custom_field])
+ @custom_field.trackers = Tracker.find(params[:tracker_ids]) if params[:tracker_ids]
+ when "UserCustomField"
+ @custom_field = UserCustomField.new(params[:custom_field])
+ when "ProjectCustomField"
+ @custom_field = ProjectCustomField.new(params[:custom_field])
+ else
+ redirect_to :action => 'list'
+ return
+ end
+ if request.post? and @custom_field.save
+ redirect_to :action => 'list'
+ end
+ @trackers = Tracker.find(:all)
+ end
+
+ def edit
+ @custom_field = CustomField.find(params[:id])
+ if request.post? and @custom_field.update_attributes(params[:custom_field])
+ if @custom_field.is_a? IssueCustomField
+ @custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : []
end
- end
- end
-
- def edit
- @custom_field = CustomField.find(params[:id])
- if request.post? and @custom_field.update_attributes(params[:custom_field])
- flash[:notice] = 'CustomField was successfully updated.'
- redirect_to :action => 'list'
- end
- end
+ flash[:notice] = 'Custom field was successfully updated.'
+ redirect_to :action => 'list'
+ end
+ @trackers = Tracker.find(:all)
+ end
def destroy
CustomField.find(params[:id]).destroy
@@ -54,5 +65,5 @@ class CustomFieldsController < ApplicationController
rescue
flash[:notice] = "Unable to delete custom field"
redirect_to :action => 'list'
- end
+ end
end
diff --git a/redmine/app/controllers/documents_controller.rb b/redmine/app/controllers/documents_controller.rb
index 3c76465c9..cc30f8e1e 100644
--- a/redmine/app/controllers/documents_controller.rb
+++ b/redmine/app/controllers/documents_controller.rb
@@ -45,7 +45,7 @@ class DocumentsController < ApplicationController
# Save the attachment
if params[:attachment][:file].size > 0
@attachment = @document.attachments.build(params[:attachment])
- @attachment.author_id = session[:user].id unless session[:user].nil?
+ @attachment.author_id = self.logged_in_user.id if self.logged_in_user
@attachment.save
end
render :action => 'show'
diff --git a/redmine/app/controllers/issues_controller.rb b/redmine/app/controllers/issues_controller.rb
index 5d5872f39..fa97e7c1c 100644
--- a/redmine/app/controllers/issues_controller.rb
+++ b/redmine/app/controllers/issues_controller.rb
@@ -23,21 +23,21 @@ class IssuesController < ApplicationController
include CustomFieldsHelper
def show
- @status_options = @issue.status.workflows.find(:all, :conditions => ["role_id=? and tracker_id=?", session[:user].role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if session[:user]
+ @status_options = @issue.status.workflows.find(:all, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user
+ @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
end
- def edit
- @trackers = Tracker.find(:all)
+ def edit
@priorities = Enumeration::get_values('IPRI')
if request.get?
- @custom_values = @project.custom_fields_for_issues.collect { |x| @issue.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
+ @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| @issue.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x, :customized => @issue) }
else
# Retrieve custom fields and values
- @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x, :value => params["custom_fields"][x.id.to_s]) }
-
+ @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
@issue.custom_values = @custom_values
- if @issue.update_attributes(params[:issue])
+ @issue.attributes = params[:issue]
+ if @issue.save
flash[:notice] = 'Issue was successfully updated.'
redirect_to :action => 'show', :id => @issue
end
@@ -46,12 +46,11 @@ class IssuesController < ApplicationController
def change_status
@history = @issue.histories.build(params[:history])
- @status_options = @issue.status.workflows.find(:all, :conditions => ["role_id=? and tracker_id=?", session[:user].role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if session[:user]
+ @status_options = @issue.status.workflows.find(:all, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user
if params[:confirm]
- unless session[:user].nil?
- @history.author = session[:user]
- end
+ @history.author_id = self.logged_in_user.id if self.logged_in_user
+
if @history.save
@issue.status = @history.status
@issue.fixed_version_id = (params[:issue][:fixed_version_id])
@@ -76,7 +75,7 @@ class IssuesController < ApplicationController
# Save the attachment
if params[:attachment][:file].size > 0
@attachment = @issue.attachments.build(params[:attachment])
- @attachment.author_id = session[:user].id unless session[:user].nil?
+ @attachment.author_id = self.logged_in_user.id if self.logged_in_user
@attachment.save
end
redirect_to :action => 'show', :id => @issue
@@ -86,17 +85,16 @@ class IssuesController < ApplicationController
@issue.attachments.find(params[:attachment_id]).destroy
redirect_to :action => 'show', :id => @issue
end
-
- # Send the file in stream mode
- def download
- @attachment = @issue.attachments.find(params[:attachment_id])
- send_file @attachment.diskfile, :filename => @attachment.filename
- end
-
+
+ # Send the file in stream mode
+ def download
+ @attachment = @issue.attachments.find(params[:attachment_id])
+ send_file @attachment.diskfile, :filename => @attachment.filename
+ end
+
private
- def find_project
+ def find_project
@issue = Issue.find(params[:id])
- @project = @issue.project
- end
-
+ @project = @issue.project
+ end
end
diff --git a/redmine/app/controllers/projects_controller.rb b/redmine/app/controllers/projects_controller.rb
index 2bef221b1..3c4d806b5 100644
--- a/redmine/app/controllers/projects_controller.rb
+++ b/redmine/app/controllers/projects_controller.rb
@@ -48,11 +48,15 @@ class ProjectsController < ApplicationController
# Add a new project
def add
- @custom_fields = CustomField::find_all
- @root_projects = Project::find(:all, :conditions => "parent_id is null")
+ @custom_fields = IssueCustomField.find(:all)
+ @root_projects = Project.find(:all, :conditions => "parent_id is null")
@project = Project.new(params[:project])
- if request.post?
- @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
+ if request.get?
+ @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
+ else
+ @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
+ @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
+ @project.custom_values = @custom_values
if @project.save
flash[:notice] = 'Project was successfully created.'
redirect_to :controller => 'admin', :action => 'projects'
@@ -60,26 +64,33 @@ class ProjectsController < ApplicationController
end
end
- # Show @project
+ # Show @project
def show
+ @custom_values = @project.custom_values.find(:all, :include => :custom_field)
@members = @project.members.find(:all, :include => [:user, :role])
@subprojects = @project.children if @project.children_count > 0
- @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
+ @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
+ @trackers = Tracker.find(:all)
end
def settings
@root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id])
- @custom_fields = CustomField::find_all
+ @custom_fields = IssueCustomField::find_all
@issue_category ||= IssueCategory.new
@member ||= @project.members.new
@roles = Role.find_all
@users = User.find_all - @project.members.find(:all, :include => :user).collect{|m| m.user }
+ @custom_values = ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
end
# Edit @project
def edit
if request.post?
- @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
+ @project.custom_fields = IssueCustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
+ if params[:custom_fields]
+ @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
+ @project.custom_values = @custom_values
+ end
if @project.update_attributes(params[:project])
flash[:notice] = 'Project was successfully updated.'
redirect_to :action => 'settings', :id => @project
@@ -89,102 +100,101 @@ class ProjectsController < ApplicationController
end
end
end
-
- # Delete @project
- def destroy
+
+ # Delete @project
+ def destroy
if request.post? and params[:confirm]
@project.destroy
redirect_to :controller => 'admin', :action => 'projects'
end
- end
+ end
- # Add a new issue category to @project
- def add_issue_category
- if request.post?
- @issue_category = @project.issue_categories.build(params[:issue_category])
- if @issue_category.save
- redirect_to :action => 'settings', :id => @project
- else
+ # Add a new issue category to @project
+ def add_issue_category
+ if request.post?
+ @issue_category = @project.issue_categories.build(params[:issue_category])
+ if @issue_category.save
+ redirect_to :action => 'settings', :id => @project
+ else
settings
render :action => 'settings'
- end
- end
- end
+ end
+ end
+ end
- # Add a new version to @project
- def add_version
- @version = @project.versions.build(params[:version])
- if request.post? and @version.save
+ # Add a new version to @project
+ def add_version
+ @version = @project.versions.build(params[:version])
+ if request.post? and @version.save
redirect_to :action => 'settings', :id => @project
- end
- end
+ end
+ end
- # Add a new member to @project
- def add_member
+ # Add a new member to @project
+ def add_member
@member = @project.members.build(params[:member])
- if request.post?
- if @member.save
+ if request.post?
+ if @member.save
flash[:notice] = 'Member was successfully added.'
- redirect_to :action => 'settings', :id => @project
- else
+ redirect_to :action => 'settings', :id => @project
+ else
settings
render :action => 'settings'
end
- end
- end
+ end
+ end
- # Show members list of @project
- def list_members
- @members = @project.members
- end
+ # Show members list of @project
+ def list_members
+ @members = @project.members
+ end
- # Add a new document to @project
- def add_document
- @categories = Enumeration::get_values('DCAT')
- @document = @project.documents.build(params[:document])
- if request.post?
+ # Add a new document to @project
+ def add_document
+ @categories = Enumeration::get_values('DCAT')
+ @document = @project.documents.build(params[:document])
+ if request.post?
# Save the attachment
- if params[:attachment][:file].size > 0
- @attachment = @document.attachments.build(params[:attachment])
- @attachment.author_id = session[:user].id unless session[:user].nil?
- end
- if @document.save
- redirect_to :action => 'list_documents', :id => @project
- end
- end
- end
-
- # Show documents list of @project
- def list_documents
- @documents = @project.documents
- end
+ if params[:attachment][:file].size > 0
+ @attachment = @document.attachments.build(params[:attachment])
+ @attachment.author_id = self.logged_in_user.id if self.logged_in_user
+ end
+ if @document.save
+ redirect_to :action => 'list_documents', :id => @project
+ end
+ end
+ end
+
+ # Show documents list of @project
+ def list_documents
+ @documents = @project.documents
+ end
- # Add a new issue to @project
- def add_issue
- @trackers = Tracker.find(:all)
- @priorities = Enumeration::get_values('IPRI')
- if request.get?
- @issue = @project.issues.build
- @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x) }
- else
- # Create the issue and set the author
- @issue = @project.issues.build(params[:issue])
- @issue.author = session[:user] unless session[:user].nil?
- # Create the document if a file was sent
- if params[:attachment][:file].size > 0
- @attachment = @issue.attachments.build(params[:attachment])
- @attachment.author_id = session[:user].id unless session[:user].nil?
- end
- @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x, :value => params["custom_fields"][x.id.to_s]) }
- @issue.custom_values = @custom_values
- if @issue.save
+ # Add a new issue to @project
+ def add_issue
+ @tracker = Tracker.find(params[:tracker_id])
+ @priorities = Enumeration::get_values('IPRI')
+ @issue = Issue.new(:project => @project, :tracker => @tracker)
+ if request.get?
+ @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) }
+ else
+ @issue.attributes = params[:issue]
+ @issue.author_id = self.logged_in_user.id if self.logged_in_user
+ # Create the document if a file was sent
+ if params[:attachment][:file].size > 0
+ @attachment = @issue.attachments.build(params[:attachment])
+ @attachment.author_id = self.logged_in_user.id if self.logged_in_user
+ end
+ @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
+ @issue.custom_values = @custom_values
+ if @issue.save
flash[:notice] = "Issue was successfully added."
- Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
- redirect_to :action => 'list_issues', :id => @project
- end
- end
- end
-
+ Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
+ redirect_to :action => 'list_issues', :id => @project
+ end
+ end
+ end
+
# Show filtered/sorted issues list of @project
def list_issues
sort_init 'issues.id', 'desc'
@@ -195,11 +205,11 @@ class ProjectsController < ApplicationController
@issue_count = Issue.count(:include => [:status, :project], :conditions => search_filter_clause)
@issue_pages = Paginator.new self, @issue_count, 15, @params['page']
- @issues = Issue.find :all, :order => sort_clause,
+ @issues = Issue.find :all, :order => sort_clause,
:include => [ :author, :status, :tracker, :project ],
:conditions => search_filter_clause,
:limit => @issue_pages.items_per_page,
- :offset => @issue_pages.current.offset
+ :offset => @issue_pages.current.offset
end
# Export filtered/sorted issues list to CSV
@@ -225,29 +235,30 @@ class ProjectsController < ApplicationController
:type => 'text/csv; charset=utf-8; header=present',
:filename => 'export.csv')
end
-
- # Add a news to @project
- def add_news
- @news = @project.news.build(params[:news])
- if request.post?
- @news.author = session[:user] unless session[:user].nil?
- if @news.save
- redirect_to :action => 'list_news', :id => @project
- end
- end
- end
- # Show news list of @project
+ # Add a news to @project
+ def add_news
+ @news = News.new(:project => @project)
+ if request.post?
+ @news.attributes = params[:news]
+ @news.author_id = self.logged_in_user.id if self.logged_in_user
+ if @news.save
+ redirect_to :action => 'list_news', :id => @project
+ end
+ end
+ end
+
+ # Show news list of @project
def list_news
@news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC"
end
-
+
def add_file
if request.post?
# Save the attachment
if params[:attachment][:file].size > 0
@attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
- @attachment.author_id = session[:user].id unless session[:user].nil?
+ @attachment.author_id = self.logged_in_user.id if self.logged_in_user
if @attachment.save
redirect_to :controller => 'projects', :action => 'list_files', :id => @project
end
@@ -269,14 +280,13 @@ class ProjectsController < ApplicationController
end
private
- # Find project of id params[:id]
- # if not found, redirect to project list
- # used as a before_filter
- def find_project
- @project = Project.find(params[:id])
- rescue
- flash[:notice] = 'Project not found.'
- redirect_to :action => 'list'
- end
-
+ # Find project of id params[:id]
+ # if not found, redirect to project list
+ # used as a before_filter
+ def find_project
+ @project = Project.find(params[:id])
+ rescue
+ flash[:notice] = 'Project not found.'
+ redirect_to :action => 'list'
+ end
end
diff --git a/redmine/app/controllers/users_controller.rb b/redmine/app/controllers/users_controller.rb
index 3a6042718..758afc2d8 100644
--- a/redmine/app/controllers/users_controller.rb
+++ b/redmine/app/controllers/users_controller.rb
@@ -21,6 +21,8 @@ class UsersController < ApplicationController
helper :sort
include SortHelper
+ helper :custom_fields
+ include CustomFieldsHelper
def index
list
@@ -41,12 +43,15 @@ class UsersController < ApplicationController
def add
if request.get?
- @user = User.new
+ @user = User.new(:language => $RDM_DEFAULT_LANG)
+ @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
else
@user = User.new(params[:user])
@user.admin = params[:user][:admin] || false
@user.login = params[:user][:login]
@user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
+ @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
+ @user.custom_values = @custom_values
if @user.save
flash[:notice] = 'User was successfully created.'
redirect_to :action => 'list'
@@ -56,10 +61,16 @@ class UsersController < ApplicationController
def edit
@user = User.find(params[:id])
- if request.post?
+ if request.get?
+ @custom_values = UserCustomField.find(:all).collect { |x| @user.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
+ else
@user.admin = params[:user][:admin] if params[:user][:admin]
@user.login = params[:user][:login] if params[:user][:login]
@user.password, @user.password_confirmation = params[:password], params[:password_confirmation] unless params[:password].nil? or params[:password].empty?
+ if params[:custom_fields]
+ @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
+ @user.custom_values = @custom_values
+ end
if @user.update_attributes(params[:user])
flash[:notice] = 'User was successfully updated.'
redirect_to :action => 'list'
diff --git a/redmine/app/controllers/welcome_controller.rb b/redmine/app/controllers/welcome_controller.rb
index b266975aa..c47198d51 100644
--- a/redmine/app/controllers/welcome_controller.rb
+++ b/redmine/app/controllers/welcome_controller.rb
@@ -16,11 +16,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class WelcomeController < ApplicationController
- layout 'base'
-
- def index
+ layout 'base'
+
+ def index
@news = News.latest
@projects = Project.latest
- end
-
+ end
end
diff --git a/redmine/app/helpers/application_helper.rb b/redmine/app/helpers/application_helper.rb
index de53f2ad6..ddb846073 100644
--- a/redmine/app/helpers/application_helper.rb
+++ b/redmine/app/helpers/application_helper.rb
@@ -17,35 +17,38 @@
module ApplicationHelper
- def loggedin?
- session[:user]
- end
+ # return current logged in user or nil
+ def loggedin?
+ @logged_in_user
+ end
+
+ # return true if user is loggend in and is admin, otherwise false
+ def admin_loggedin?
+ @logged_in_user and @logged_in_user.admin?
+ end
- def admin_loggedin?
- session[:user] && session[:user].admin
- end
-
- def authorize_for(controller, action)
+ def authorize_for(controller, action)
# check if action is allowed on public projects
if @project.is_public? and Permission.allowed_to_public "%s/%s" % [ controller, action ]
return true
- end
+ end
# check if user is authorized
- if session[:user] and (session[:user].admin? or Permission.allowed_to_role( "%s/%s" % [ controller, action ], session[:user].role_for_project(@project.id) ) )
- return true
- end
- return false
- end
-
- def link_to_if_authorized(name, options = {}, html_options = nil, *parameters_for_method_reference)
- link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller], options[:action])
- end
-
- # Display a link to user's account page
- def link_to_user(user)
- link_to user.display_name, :controller => 'account', :action => 'show', :id => user
- end
-
+ if @logged_in_user and (@logged_in_user.admin? or Permission.allowed_to_role( "%s/%s" % [ controller, action ], @logged_in_user.role_for_project(@project.id) ) )
+ return true
+ end
+ return false
+ end
+
+ # Display a link if user is authorized
+ def link_to_if_authorized(name, options = {}, html_options = nil, *parameters_for_method_reference)
+ link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller], options[:action])
+ end
+
+ # Display a link to user's account page
+ def link_to_user(user)
+ link_to user.display_name, :controller => 'account', :action => 'show', :id => user
+ end
+
def format_date(date)
_('(date)', date) if date
end
@@ -61,5 +64,30 @@ module ApplicationHelper
html << ' ' + link_to((_('Next') + ' &#187;'), { :page => paginator.current.next }) if paginator.current.next
html
end
-
+
+ def error_messages_for(object_name, options = {})
+ options = options.symbolize_keys
+ object = instance_variable_get("@#{object_name}")
+ if object && !object.errors.empty?
+ # build full_messages here with controller current language
+ full_messages = []
+ object.errors.each do |attr, msg|
+ next if msg.nil?
+ if attr == "base"
+ full_messages << l(msg)
+ else
+ full_messages << "&#171; " + (l_has_string?("field_" + attr) ? l("field_" + attr) : object.class.human_attribute_name(attr)) + " &#187; " + l(msg)
+ end
+ end
+ content_tag("div",
+ content_tag(
+ options[:header_tag] || "h2", lwr(:gui_validation_error, object.errors.count) + " :"
+ ) +
+ content_tag("ul", full_messages.collect { |msg| content_tag("li", msg) }),
+ "id" => options[:id] || "errorExplanation", "class" => options[:class] || "errorExplanation"
+ )
+ else
+ ""
+ end
+ end
end
diff --git a/redmine/app/helpers/auth_sources_helper.rb b/redmine/app/helpers/auth_sources_helper.rb
new file mode 100644
index 000000000..d47e9856a
--- /dev/null
+++ b/redmine/app/helpers/auth_sources_helper.rb
@@ -0,0 +1,19 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+module AuthSourcesHelper
+end
diff --git a/redmine/app/helpers/custom_fields_helper.rb b/redmine/app/helpers/custom_fields_helper.rb
index 4e3aea50f..10cb1bb94 100644
--- a/redmine/app/helpers/custom_fields_helper.rb
+++ b/redmine/app/helpers/custom_fields_helper.rb
@@ -16,21 +16,49 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module CustomFieldsHelper
- def custom_field_tag(custom_value)
-
- custom_field = custom_value.custom_field
-
- field_name = "custom_fields[#{custom_field.id}]"
-
- case custom_field.typ
- when 0 .. 2
- text_field_tag field_name, custom_value.value
- when 3
- check_box field_name
- when 4
- select_tag field_name,
- options_for_select(custom_field.possible_values.split('|'),
- custom_value.value)
- end
- end
+
+ def custom_field_tag(custom_value)
+ custom_field = custom_value.custom_field
+ field_name = "custom_fields[#{custom_field.id}]"
+ case custom_field.field_format
+ when "string", "int", "date"
+ text_field_tag field_name, custom_value.value
+ when "text"
+ text_area_tag field_name, custom_value.value, :cols => 60, :rows => 3
+ when "bool"
+ check_box_tag(field_name, "1", custom_value.value == "1") +
+ hidden_field_tag(field_name, "0")
+ when "list"
+ select_tag field_name,
+ "<option></option>" + options_for_select(custom_field.possible_values.split('|'),
+ custom_value.value)
+ end
+ end
+
+ def custom_field_label_tag(custom_value)
+ content_tag "label", custom_value.custom_field.name +
+ (custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>" : "")
+ end
+
+ def custom_field_tag_with_label(custom_value)
+ case custom_value.custom_field.field_format
+ when "bool"
+ custom_field_tag(custom_value) + " " + custom_field_label_tag(custom_value)
+ else
+ custom_field_label_tag(custom_value) + "<br />" + custom_field_tag(custom_value)
+ end
+ end
+
+ def show_value(custom_value)
+ case custom_value.custom_field.field_format
+ when "bool"
+ l_YesNo(custom_value.value == "1")
+ else
+ custom_value.value
+ end
+ end
+
+ def custom_field_formats_for_select
+ CustomField::FIELD_FORMATS.keys.collect { |k| [ l(CustomField::FIELD_FORMATS[k]), k ] }
+ end
end
diff --git a/redmine/app/models/attachment.rb b/redmine/app/models/attachment.rb
index 1e5bd22b4..2e1e9b156 100644
--- a/redmine/app/models/attachment.rb
+++ b/redmine/app/models/attachment.rb
@@ -55,7 +55,7 @@ class Attachment < ActiveRecord::Base
# Returns file's location on disk
def diskfile
- "#{RDM_STORAGE_PATH}/#{self.disk_filename}"
+ "#{$RDM_STORAGE_PATH}/#{self.disk_filename}"
end
def increment_download
diff --git a/redmine/app/models/auth_source.rb b/redmine/app/models/auth_source.rb
new file mode 100644
index 000000000..47eec106d
--- /dev/null
+++ b/redmine/app/models/auth_source.rb
@@ -0,0 +1,47 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+class AuthSource < ActiveRecord::Base
+ has_many :users
+
+ validates_presence_of :name
+ validates_uniqueness_of :name
+
+ def authenticate(login, password)
+ end
+
+ def test_connection
+ end
+
+ def auth_method_name
+ "Abstract"
+ end
+
+ # Try to authenticate a user not yet registered against available sources
+ def self.authenticate(login, password)
+ AuthSource.find(:all, :conditions => ["onthefly_register=?", true]).each do |source|
+ begin
+ logger.debug "Authenticating '#{login}' against '#{source.name}'" if logger && logger.debug?
+ attrs = source.authenticate(login, password)
+ rescue
+ attrs = nil
+ end
+ return attrs if attrs
+ end
+ return nil
+ end
+end
diff --git a/redmine/app/models/auth_source_ldap.rb b/redmine/app/models/auth_source_ldap.rb
new file mode 100644
index 000000000..9579a1094
--- /dev/null
+++ b/redmine/app/models/auth_source_ldap.rb
@@ -0,0 +1,79 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+require 'net/ldap'
+require 'iconv'
+
+class AuthSourceLdap < AuthSource
+ validates_presence_of :host, :port, :attr_login
+
+ def after_initialize
+ self.port = 389 if self.port == 0
+ end
+
+ def authenticate(login, password)
+ attrs = []
+ # get user's DN
+ ldap_con = initialize_ldap_con(self.account, self.account_password)
+ login_filter = Net::LDAP::Filter.eq( self.attr_login, login )
+ object_filter = Net::LDAP::Filter.eq( "objectClass", "organizationalPerson" )
+ dn = String.new
+ ldap_con.search( :base => self.base_dn,
+ :filter => object_filter & login_filter,
+ :attributes=> ['dn', self.attr_firstname, self.attr_lastname, self.attr_mail]) do |entry|
+ dn = entry.dn
+ attrs = [:firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname),
+ :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname),
+ :mail => AuthSourceLdap.get_attr(entry, self.attr_mail),
+ :auth_source_id => self.id ]
+ end
+ return nil if dn.empty?
+ logger.debug "DN found for #{login}: #{dn}" if logger && logger.debug?
+ # authenticate user
+ ldap_con = initialize_ldap_con(dn, password)
+ return nil unless ldap_con.bind
+ # return user's attributes
+ logger.debug "Authentication successful for '#{login}'" if logger && logger.debug?
+ attrs
+ rescue Net::LDAP::LdapError => text
+ raise "LdapError: " + text
+ end
+
+ # test the connection to the LDAP
+ def test_connection
+ ldap_con = initialize_ldap_con(self.account, self.account_password)
+ ldap_con.open { }
+ rescue Net::LDAP::LdapError => text
+ raise "LdapError: " + text
+ end
+
+ def auth_method_name
+ "LDAP"
+ end
+
+private
+ def initialize_ldap_con(ldap_user, ldap_password)
+ Net::LDAP.new( {:host => self.host,
+ :port => self.port,
+ :auth => { :method => :simple, :username => Iconv.new('iso-8859-15', 'utf-8').iconv(ldap_user), :password => Iconv.new('iso-8859-15', 'utf-8').iconv(ldap_password) }}
+ )
+ end
+
+ def self.get_attr(entry, attr_name)
+ entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
+ end
+end
diff --git a/redmine/app/models/custom_field.rb b/redmine/app/models/custom_field.rb
index 9e817d1ef..924a874a3 100644
--- a/redmine/app/models/custom_field.rb
+++ b/redmine/app/models/custom_field.rb
@@ -16,23 +16,27 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CustomField < ActiveRecord::Base
+ has_many :custom_values, :dependent => true
- has_and_belongs_to_many :projects
- has_many :custom_values, :dependent => true
- has_many :issues, :through => :issue_custom_values
+ FIELD_FORMATS = { "list" => :label_list,
+ "date" => :label_date,
+ "bool" => :label_boolean,
+ "int" => :label_integer,
+ "string" => :label_string,
+ "text" => :label_text
+ }.freeze
- validates_presence_of :name, :typ
- validates_uniqueness_of :name
+ validates_presence_of :name, :field_format
+ validates_uniqueness_of :name
+ validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
+ validates_presence_of :possible_values, :if => Proc.new { |field| field.field_format == "list" }
- TYPES = [
- [ "Integer", 0 ],
- [ "String", 1 ],
- [ "Date", 2 ],
- [ "Boolean", 3 ],
- [ "List", 4 ]
- ].freeze
-
- def self.for_all
- find(:all, :conditions => ["is_for_all=?", true])
- end
-end
+ # to move in project_custom_field
+ def self.for_all
+ find(:all, :conditions => ["is_for_all=?", true])
+ end
+
+ def type_name
+ nil
+ end
+end
diff --git a/redmine/app/models/custom_value.rb b/redmine/app/models/custom_value.rb
index faaa8ff82..ac72e5aba 100644
--- a/redmine/app/models/custom_value.rb
+++ b/redmine/app/models/custom_value.rb
@@ -16,26 +16,28 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CustomValue < ActiveRecord::Base
- belongs_to :issue
- belongs_to :custom_field
-
+ belongs_to :custom_field
+ belongs_to :customized, :polymorphic => true
+
protected
def validate
- errors.add(custom_field.name, "can't be blank") if custom_field.is_required? and value.empty?
- errors.add(custom_field.name, "is not valid") unless custom_field.regexp.empty? or value =~ Regexp.new(custom_field.regexp)
-
- case custom_field.typ
- when 0
- errors.add(custom_field.name, "must be an integer") unless value =~ /^[0-9]*$/
- when 1
- errors.add(custom_field.name, "is too short") if custom_field.min_length > 0 and value.length < custom_field.min_length and value.length > 0
- errors.add(custom_field.name, "is too long") if custom_field.max_length > 0 and value.length > custom_field.max_length
- when 2
- errors.add(custom_field.name, "must be a valid date") unless value =~ /^(\d+)\/(\d+)\/(\d+)$/ or value.empty?
- when 3
-
- when 4
- errors.add(custom_field.name, "is not a valid value") unless custom_field.possible_values.split('|').include? value or value.empty?
- end
+ # errors are added to customized object unless it's nil
+ object = customized || self
+
+ object.errors.add(custom_field.name, :activerecord_error_blank) if custom_field.is_required? and value.empty?
+ object.errors.add(custom_field.name, :activerecord_error_invalid) unless custom_field.regexp.empty? or value =~ Regexp.new(custom_field.regexp)
+
+ object.errors.add(custom_field.name, :activerecord_error_too_short) if custom_field.min_length > 0 and value.length < custom_field.min_length and value.length > 0
+ object.errors.add(custom_field.name, :activerecord_error_too_long) if custom_field.max_length > 0 and value.length > custom_field.max_length
+
+ case custom_field.field_format
+ when "int"
+ object.errors.add(custom_field.name, :activerecord_error_not_a_number) unless value =~ /^[0-9]*$/
+ when "date"
+ object.errors.add(custom_field.name, :activerecord_error_invalid) unless value =~ /^(\d+)\/(\d+)\/(\d+)$/ or value.empty?
+ when "list"
+ object.errors.add(custom_field.name, :activerecord_error_inclusion) unless custom_field.possible_values.split('|').include? value or value.empty?
+ end
end
-end
+end
+
diff --git a/redmine/app/models/document.rb b/redmine/app/models/document.rb
index 40c3a1656..08e0ef607 100644
--- a/redmine/app/models/document.rb
+++ b/redmine/app/models/document.rb
@@ -20,5 +20,5 @@ class Document < ActiveRecord::Base
belongs_to :category, :class_name => "Enumeration", :foreign_key => "category_id"
has_many :attachments, :as => :container, :dependent => true
- validates_presence_of :title
+ validates_presence_of :project, :title, :category
end
diff --git a/redmine/app/models/issue.rb b/redmine/app/models/issue.rb
index 4a21ac03b..dc5b3fd84 100644
--- a/redmine/app/models/issue.rb
+++ b/redmine/app/models/issue.rb
@@ -29,15 +29,19 @@ class Issue < ActiveRecord::Base
has_many :histories, :class_name => 'IssueHistory', :dependent => true, :order => "issue_histories.created_on DESC", :include => :status
has_many :attachments, :as => :container, :dependent => true
- has_many :custom_values, :dependent => true
+ has_many :custom_values, :dependent => true, :as => :customized
has_many :custom_fields, :through => :custom_values
- validates_presence_of :subject, :descr, :priority, :tracker, :author
+ validates_presence_of :subject, :description, :priority, :tracker, :author
+ validates_associated :custom_values, :on => :update
# set default status for new issues
+ def before_validation
+ self.status = IssueStatus.default if new_record?
+ end
+
def before_create
- self.status = IssueStatus.default
- build_history
+ build_history
end
def long_id
diff --git a/redmine/app/models/issue_custom_field.rb b/redmine/app/models/issue_custom_field.rb
new file mode 100644
index 000000000..209ae206b
--- /dev/null
+++ b/redmine/app/models/issue_custom_field.rb
@@ -0,0 +1,27 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+class IssueCustomField < CustomField
+ has_and_belongs_to_many :projects, :join_table => "custom_fields_projects", :foreign_key => "custom_field_id"
+ has_and_belongs_to_many :trackers, :join_table => "custom_fields_trackers", :foreign_key => "custom_field_id"
+ has_many :issues, :through => :issue_custom_values
+
+ def type_name
+ :label_issue_plural
+ end
+end
+
diff --git a/redmine/app/models/mailer.rb b/redmine/app/models/mailer.rb
index b04ec7ebc..bf4c85dbb 100644
--- a/redmine/app/models/mailer.rb
+++ b/redmine/app/models/mailer.rb
@@ -17,20 +17,34 @@
class Mailer < ActionMailer::Base
- def issue_change_status(issue)
- # Sends to all project members
- @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
- @from = 'redmine@somenet.foo'
- @subject = "Issue ##{issue.id} has been updated"
- @body['issue'] = issue
- end
-
- def issue_add(issue)
- # Sends to all project members
- @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
- @from = 'redmine@somenet.foo'
- @subject = "Issue ##{issue.id} has been reported"
- @body['issue'] = issue
- end
-
+ def issue_change_status(issue)
+ # Sends to all project members
+ @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
+ @from = 'redmine@somenet.foo'
+ @subject = "Issue ##{issue.id} has been updated"
+ @body['issue'] = issue
+ end
+
+ def issue_add(issue)
+ # Sends to all project members
+ @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
+ @from = 'redmine@somenet.foo'
+ @subject = "Issue ##{issue.id} has been reported"
+ @body['issue'] = issue
+ end
+
+ def lost_password(token)
+ @recipients = token.user.mail
+ @from = 'redmine@somenet.foo'
+ @subject = "redMine password"
+ @body['token'] = token
+ end
+
+ def register(token)
+ @recipients = token.user.mail
+ @from = 'redmine@somenet.foo'
+ @subject = "redMine account activation"
+ @body['token'] = token
+ end
+
end
diff --git a/redmine/app/models/news.rb b/redmine/app/models/news.rb
index 0642a4bf5..c4884ace5 100644
--- a/redmine/app/models/news.rb
+++ b/redmine/app/models/news.rb
@@ -19,7 +19,7 @@ class News < ActiveRecord::Base
belongs_to :project
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
- validates_presence_of :title, :shortdescr, :descr
+ validates_presence_of :title, :description
# returns last created news
def self.latest
diff --git a/redmine/app/models/permission.rb b/redmine/app/models/permission.rb
index e05ca0fba..164ca21b9 100644
--- a/redmine/app/models/permission.rb
+++ b/redmine/app/models/permission.rb
@@ -18,7 +18,7 @@
class Permission < ActiveRecord::Base
has_and_belongs_to_many :roles
- validates_presence_of :controller, :action, :descr
+ validates_presence_of :controller, :action, :description
GROUPS = {
100 => "Project",
diff --git a/redmine/app/models/project.rb b/redmine/app/models/project.rb
index e5b5779cb..ee848cb30 100644
--- a/redmine/app/models/project.rb
+++ b/redmine/app/models/project.rb
@@ -16,30 +16,34 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class Project < ActiveRecord::Base
- has_many :versions, :dependent => true, :order => "versions.effective_date DESC"
- has_many :members, :dependent => true
- has_many :users, :through => :members
- has_many :issues, :dependent => true, :order => "issues.created_on DESC", :include => :status
- has_many :documents, :dependent => true
- has_many :news, :dependent => true, :include => :author
- has_many :issue_categories, :dependent => true
- has_and_belongs_to_many :custom_fields
- acts_as_tree :order => "name", :counter_cache => true
-
- validates_presence_of :name, :descr
- validates_uniqueness_of :name
-
- # returns 5 last created projects
- def self.latest
- find(:all, :limit => 5, :order => "created_on DESC")
- end
-
- # Returns an array of all custom fields enabled for project issues
- # (explictly associated custom fields and custom fields enabled for all projects)
- def custom_fields_for_issues
- (CustomField.for_all + custom_fields).uniq
- end
-
+ has_many :versions, :dependent => true, :order => "versions.effective_date DESC, versions.name DESC"
+ has_many :members, :dependent => true
+ has_many :users, :through => :members
+ has_many :custom_values, :dependent => true, :as => :customized
+ has_many :issues, :dependent => true, :order => "issues.created_on DESC", :include => :status
+ has_many :documents, :dependent => true
+ has_many :news, :dependent => true, :include => :author
+ has_many :issue_categories, :dependent => true, :order => "issue_categories.name"
+ has_and_belongs_to_many :custom_fields, :class_name => 'IssueCustomField', :join_table => 'custom_fields_projects', :association_foreign_key => 'custom_field_id'
+ acts_as_tree :order => "name", :counter_cache => true
+
+ validates_presence_of :name, :description
+ validates_uniqueness_of :name
+ validates_associated :custom_values, :on => :update
+
+ # returns 5 last created projects
+ def self.latest
+ find(:all, :limit => 5, :order => "created_on DESC")
+ end
+
+ # Returns an array of all custom fields enabled for project issues
+ # (explictly associated custom fields and custom fields enabled for all projects)
+ def custom_fields_for_issues(tracker)
+ tracker.custom_fields.find(:all, :include => :projects,
+ :conditions => ["is_for_all=? or project_id=?", true, self.id])
+ #(CustomField.for_all + custom_fields).uniq
+ end
+
protected
def validate
errors.add(parent_id, " must be a root project") if parent and parent.parent
diff --git a/redmine/app/models/project_custom_field.rb b/redmine/app/models/project_custom_field.rb
new file mode 100644
index 000000000..baa533812
--- /dev/null
+++ b/redmine/app/models/project_custom_field.rb
@@ -0,0 +1,22 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+class ProjectCustomField < CustomField
+ def type_name
+ :label_project_plural
+ end
+end
diff --git a/redmine/app/models/token.rb b/redmine/app/models/token.rb
new file mode 100644
index 000000000..98745d29e
--- /dev/null
+++ b/redmine/app/models/token.rb
@@ -0,0 +1,44 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+class Token < ActiveRecord::Base
+ belongs_to :user
+
+ @@validity_time = 1.day
+
+ def before_create
+ self.value = Token.generate_token_value
+ end
+
+ # Return true if token has expired
+ def expired?
+ return Time.now > self.created_on + @@validity_time
+ end
+
+ # Delete all expired tokens
+ def self.destroy_expired
+ Token.delete_all ["created_on < ?", Time.now - @@validity_time]
+ end
+
+private
+ def self.generate_token_value
+ chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
+ token_value = ''
+ 40.times { |i| token_value << chars[rand(chars.size-1)] }
+ token_value
+ end
+end
diff --git a/redmine/app/models/tracker.rb b/redmine/app/models/tracker.rb
index 4283f471d..ca37eb939 100644
--- a/redmine/app/models/tracker.rb
+++ b/redmine/app/models/tracker.rb
@@ -19,7 +19,8 @@ class Tracker < ActiveRecord::Base
before_destroy :check_integrity
has_many :issues
has_many :workflows, :dependent => true
-
+ has_and_belongs_to_many :custom_fields, :class_name => 'IssueCustomField', :join_table => 'custom_fields_trackers', :association_foreign_key => 'custom_field_id'
+
validates_presence_of :name
validates_uniqueness_of :name
diff --git a/redmine/app/models/user.rb b/redmine/app/models/user.rb
index e0adbb0df..ea313483c 100644
--- a/redmine/app/models/user.rb
+++ b/redmine/app/models/user.rb
@@ -19,7 +19,9 @@ require "digest/sha1"
class User < ActiveRecord::Base
has_many :memberships, :class_name => 'Member', :include => [ :project, :role ], :dependent => true
-
+ has_many :custom_values, :dependent => true, :as => :customized
+ belongs_to :auth_source
+
attr_accessor :password, :password_confirmation
attr_accessor :last_before_login_on
# Prevents unauthorized assignments
@@ -33,6 +35,12 @@ class User < ActiveRecord::Base
# Password length between 4 and 12
validates_length_of :password, :in => 4..12, :allow_nil => true
validates_confirmation_of :password, :allow_nil => true
+ validates_associated :custom_values, :on => :update
+
+ # Account statuses
+ STATUS_ACTIVE = 1
+ STATUS_REGISTERED = 2
+ STATUS_LOCKED = 3
def before_save
# update hashed_password if password was set
@@ -41,23 +49,52 @@ class User < ActiveRecord::Base
# Returns the user that matches provided login and password, or nil
def self.try_to_login(login, password)
- user = find(:first, :conditions => ["login=? and hashed_password=? and locked=?", login, User.hash_password(password), false])
+ user = find(:first, :conditions => ["login=?", login])
if user
- user.last_before_login_on = user.last_login_on
- user.update_attribute(:last_login_on, Time.now)
- end
+ # user is already in local database
+ return nil if !user.active?
+ if user.auth_source
+ # user has an external authentication method
+ return nil unless user.auth_source.authenticate(login, password)
+ else
+ # local authentication
+ return nil unless User.hash_password(password) == user.hashed_password
+ end
+ else
+ # user is not yet registered, try to authenticate with available sources
+ attrs = AuthSource.authenticate(login, password)
+ if attrs
+ onthefly = new(*attrs)
+ onthefly.login = login
+ onthefly.language = $RDM_DEFAULT_LANG
+ if onthefly.save
+ user = find(:first, :conditions => ["login=?", login])
+ end
+ end
+ end
+ user.update_attribute(:last_login_on, Time.now) if user
user
+
+ rescue => text
+ raise text
end
# Return user's full name for display
def display_name
firstname + " " + lastname
end
+
+ def active?
+ self.status == STATUS_ACTIVE
+ end
+
+ def locked?
+ self.status == STATUS_LOCKED
+ end
def check_password?(clear_password)
User.hash_password(clear_password) == self.hashed_password
end
-
def role_for_project(project_id)
@role_for_projects ||=
diff --git a/redmine/app/models/user_custom_field.rb b/redmine/app/models/user_custom_field.rb
new file mode 100644
index 000000000..866234a7f
--- /dev/null
+++ b/redmine/app/models/user_custom_field.rb
@@ -0,0 +1,23 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+class UserCustomField < CustomField
+ def type_name
+ :label_user_plural
+ end
+end
+
diff --git a/redmine/app/views/account/login.rhtml b/redmine/app/views/account/login.rhtml
index bc2b5a562..2c806b421 100644
--- a/redmine/app/views/account/login.rhtml
+++ b/redmine/app/views/account/login.rhtml
@@ -1,13 +1,25 @@
-<div class="box">
-<h2><%=_('Please login') %></h2>
+<center>
+<div class="box login">
+<h2><%= image_tag 'login' %>&nbsp;&nbsp;<%=l(:label_please_login)%></h2>
-<%= start_form_tag :action=> "login" %>
-<p><label for="login"><%=_ 'Login' %>:</label><br/>
-<%= text_field_tag 'login', nil, :size => 25 %></p>
-
-<p><label for="user_password"><%=_ 'Password' %>:</label><br/>
-<%= password_field_tag 'password', nil, :size => 25 %></p>
+<%= start_form_tag :action=> "login" %>
+<table cellpadding="4">
+ <tr>
+ <td><label for="login"><%=l(:field_login)%>:</label></td>
+ <td><%= text_field_tag 'login', nil, :size => 25 %></td>
+ </tr>
+ <tr>
+ <td><label for="password"><%=l(:field_password)%>:</label></td>
+ <td><%= password_field_tag 'password', nil, :size => 25 %></td>
+ </tr>
+</table>
+
+&nbsp;
-<p><input type="submit" name="login" value="<%=_ 'Log in' %> &#187;" class="primary" /></p>
-<%= end_form_tag %>
-</div> \ No newline at end of file
+<p><center><input type="submit" name="login" value="<%=l(:button_login)%> &#187;" class="primary" /></center></p>
+<%= end_form_tag %>
+<br />
+<% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %>
+<%= link_to l(:label_password_lost), :action => 'lost_password' %>
+</div>
+</center> \ No newline at end of file
diff --git a/redmine/app/views/account/lost_password.rhtml b/redmine/app/views/account/lost_password.rhtml
new file mode 100644
index 000000000..cd392f243
--- /dev/null
+++ b/redmine/app/views/account/lost_password.rhtml
@@ -0,0 +1,14 @@
+<center>
+<div class="box login">
+<h2><%=l(:label_password_lost)%></h2>
+
+<%= start_form_tag %>
+
+<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/>
+<%= text_field_tag 'mail', nil, :size => 40 %></p>
+
+<p><center><%= submit_tag l(:button_submit) %></center></p>
+
+<%= end_form_tag %>
+</div>
+</center> \ No newline at end of file
diff --git a/redmine/app/views/account/my_account.rhtml b/redmine/app/views/account/my_account.rhtml
index 7248f0e4a..097e23181 100644
--- a/redmine/app/views/account/my_account.rhtml
+++ b/redmine/app/views/account/my_account.rhtml
@@ -1,34 +1,34 @@
-<h2><%=_('My account')%></h2>
+<h2><%=l(:label_my_account)%></h2>
-<p><%=_('Login')%>: <strong><%= @user.login %></strong><br />
-<%=_('Created on')%>: <%= format_time(@user.created_on) %>,
-<%=_('Last update')%>: <%= format_time(@user.updated_on) %></p>
+<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
+<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>,
+<%=l(:field_updated_on)%>: <%= format_time(@user.updated_on) %></p>
<%= error_messages_for 'user' %>
<div class="splitcontentleft">
<div class="box">
- <h3><%=_('Information')%></h3>
+ <h3><%=l(:label_information_plural)%></h3>
&nbsp;
<%= start_form_tag :action => 'my_account' %>
<!--[form:user]-->
- <p><label for="user_firstname"><%=_('Firstname')%> <span class="required">*</span></label><br/>
+ <p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label><br/>
<%= text_field 'user', 'firstname' %></p>
- <p><label for="user_lastname"><%=_('Lastname')%> <span class="required">*</span></label><br/>
+ <p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label><br/>
<%= text_field 'user', 'lastname' %></p>
- <p><label for="user_mail"><%=_('Mail')%> <span class="required">*</span></label><br/>
- <%= text_field 'user', 'mail' %></p>
+ <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/>
+ <%= text_field 'user', 'mail' %></p>
- <p><label for="user_language"><%=_('Language')%></label><br/>
- <%= select("user", "language", Localization.langs) %></p>
+ <p><label for="user_language"><%=l(:field_language)%></label><br/>
+ <%= select("user", "language", Localization.langs.invert) %></p>
<!--[eoform:user]-->
- <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=_('Mail notifications')%></label></p>
+ <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p>
- <center><%= submit_tag _('Save') %></center>
+ <center><%= submit_tag l(:button_save) %></center>
<%= end_form_tag %>
</div>
</div>
@@ -36,20 +36,20 @@
<div class="splitcontentright">
<div class="box">
- <h3><%=_('Password')%></h3>
+ <h3><%=l(:field_password)%></h3>
&nbsp;
<%= start_form_tag :action => 'change_password' %>
- <p><label for="password"><%=_('Password')%> <span class="required">*</span></label><br/>
+ <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label><br/>
<%= password_field_tag 'password', nil, :size => 25 %></p>
- <p><label for="new_password"><%=_('New password')%> <span class="required">*</span></label><br/>
+ <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label><br/>
<%= password_field_tag 'new_password', nil, :size => 25 %></p>
- <p><label for="new_password_confirmation"><%=_('Confirmation')%> <span class="required">*</span></label><br/>
+ <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label><br/>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
- <center><%= submit_tag _('Save') %></center>
+ <center><%= submit_tag l(:button_save) %></center>
<%= end_form_tag %>
</div>
</div> \ No newline at end of file
diff --git a/redmine/app/views/account/my_page.rhtml b/redmine/app/views/account/my_page.rhtml
index 7f6458262..54b5685e8 100644
--- a/redmine/app/views/account/my_page.rhtml
+++ b/redmine/app/views/account/my_page.rhtml
@@ -1,19 +1,22 @@
-<h2><%=_('My page') %></h2>
+<h2><%=l(:label_my_page)%></h2>
<p>
-<%=_('Welcome')%> <b><%= @user.firstname %></b><br />
<% unless @user.last_before_login_on.nil? %>
- <%=_('Last login')%>: <%= format_time(@user.last_before_login_on) %>
+ <%=l(:label_last_login)%>: <%= format_time(@user.last_before_login_on) %>
<% end %>
</p>
<div class="splitcontentleft">
- <h3><%=_('Reported issues')%></h3>
+ <h3><%=l(:label_reported_issues)%></h3>
<%= render :partial => 'issues/list_simple', :locals => { :issues => @reported_issues } %>
- <%= "<p>(Last #{@reported_issues.length} updated)</p>" if @reported_issues.length > 0 %>
+ <% if @reported_issues.length > 0 %>
+ <p><%=lwr(:label_last_updates, @reported_issues.length)%></p>
+ <% end %>
</div>
<div class="splitcontentright">
-<h3><%=_('Assigned to me')%></h3>
+<h3><%=l(:label_assigned_to_me_issues)%></h3>
<%= render :partial => 'issues/list_simple', :locals => { :issues => @assigned_issues } %>
- <%= "<p>(Last #{@assigned_issues.length} updated)</p>" if @assigned_issues.length > 0 %>
+ <% if @assigned_issues.length > 0 %>
+ <p><%=lwr(:label_last_updates, @assigned_issues.length)%></p>
+ <% end %>
</div> \ No newline at end of file
diff --git a/redmine/app/views/account/password_recovery.rhtml b/redmine/app/views/account/password_recovery.rhtml
new file mode 100644
index 000000000..b4f73d28c
--- /dev/null
+++ b/redmine/app/views/account/password_recovery.rhtml
@@ -0,0 +1,21 @@
+<center>
+<div class="box login">
+<h2><%=l(:label_password_lost)%></h2>
+
+<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
+
+<%= error_messages_for 'user' %>
+
+ <%= start_form_tag :token => @token.value %>
+
+ <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label><br/>
+ <%= password_field_tag 'new_password', nil, :size => 25 %></p>
+
+ <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label><br/>
+ <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
+
+ <p><center><%= submit_tag l(:button_save) %></center></p>
+ <%= end_form_tag %>
+
+</div>
+</center> \ No newline at end of file
diff --git a/redmine/app/views/account/register.rhtml b/redmine/app/views/account/register.rhtml
new file mode 100644
index 000000000..2bdf380f9
--- /dev/null
+++ b/redmine/app/views/account/register.rhtml
@@ -0,0 +1,46 @@
+<h2><%=l(:label_register)%></h2>
+
+<%= start_form_tag %>
+
+<%= error_messages_for 'user' %>
+
+<div class="box">
+<!--[form:user]-->
+<p><label for="user_login"><%=l(:field_login)%></label> <span class="required">*</span><br/>
+<%= text_field 'user', 'login', :size => 25 %></p>
+
+<p><label for="password"><%=l(:field_password)%></label> <span class="required">*</span><br/>
+<%= password_field_tag 'password', nil, :size => 25 %></p>
+
+<p><label for="password_confirmation"><%=l(:field_password_confirmation)%></label> <span class="required">*</span><br/>
+<%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
+
+<p><label for="user_firstname"><%=l(:field_firstname)%></label> <span class="required">*</span><br/>
+<%= text_field 'user', 'firstname' %></p>
+
+<p><label for="user_lastname"><%=l(:field_lastname)%></label> <span class="required">*</span><br/>
+<%= text_field 'user', 'lastname' %></p>
+
+<p><label for="user_mail"><%=l(:field_mail)%></label> <span class="required">*</span><br/>
+<%= text_field 'user', 'mail' %></p>
+
+<p><label for="user_language"><%=l(:field_language)%></label><br/>
+<%= select("user", "language", Localization.langs.invert) %></p>
+
+<% for custom_value in @custom_values %>
+ <div style="float:left;margin-right:10px;">
+ <p><%= content_tag "label", custom_value.custom_field.name %>
+ <% if custom_value.custom_field.is_required? %><span class="required">*</span><% end %>
+ <br />
+ <%= custom_field_tag custom_value %></p>
+ </div>
+<% end %>
+
+<div style="clear: both;"></div>
+
+<p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p>
+<!--[eoform:user]-->
+</div>
+
+ <%= submit_tag l(:button_submit) %>
+<%= end_form_tag %>
diff --git a/redmine/app/views/account/show.rhtml b/redmine/app/views/account/show.rhtml
index df918e5bf..78fe0a679 100644
--- a/redmine/app/views/account/show.rhtml
+++ b/redmine/app/views/account/show.rhtml
@@ -2,10 +2,10 @@
<p>
<%= mail_to @user.mail %><br />
-<%=_('Registered on')%>: <%= format_date(@user.created_on) %>
+<%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %>
</p>
-<h3><%=_('Projects')%></h3>
+<h3><%=l(:label_project_plural)%></h3>
<p>
<% for membership in @user.memberships %>
<%= membership.project.name %> (<%= membership.role.name %>, <%= format_date(membership.created_on) %>)
@@ -13,7 +13,7 @@
<% end %>
</p>
-<h3><%=_('Activity')%></h3>
+<h3><%=l(:label_activity)%></h3>
<p>
-<%=_('Reported issues')%>: <%= Issue.count( [ "author_id=?", @user.id]) %>
+<%=l(:label_reported_issues)%>: <%= Issue.count(["author_id=?", @user.id]) %>
</p> \ No newline at end of file
diff --git a/redmine/app/views/admin/index.rhtml b/redmine/app/views/admin/index.rhtml
index b3607d813..d937e287c 100644
--- a/redmine/app/views/admin/index.rhtml
+++ b/redmine/app/views/admin/index.rhtml
@@ -1,45 +1,50 @@
-<h2><%=_('Administration')%></h2>
+<h2><%=l(:label_administration)%></h2>
<p>
<%= image_tag "projects" %>
-<%= link_to _('Projects'), :controller => 'admin', :action => 'projects' %> |
-<%= link_to _('New'), :controller => 'projects', :action => 'add' %>
+<%= link_to l(:label_project_plural), :controller => 'admin', :action => 'projects' %> |
+<%= link_to l(:label_new), :controller => 'projects', :action => 'add' %>
</p>
<p>
<%= image_tag "users" %>
-<%= link_to _('Users'), :controller => 'users' %> |
-<%= link_to _('New'), :controller => 'users', :action => 'add' %>
+<%= link_to l(:label_user_plural), :controller => 'users' %> |
+<%= link_to l(:label_new), :controller => 'users', :action => 'add' %>
</p>
<p>
<%= image_tag "role" %>
-<%= link_to _('Roles and permissions'), :controller => 'roles' %>
+<%= link_to l(:label_role_and_permissions), :controller => 'roles' %>
</p>
<p>
<%= image_tag "tracker" %>
-<%= link_to _('Trackers'), :controller => 'trackers' %> |
-<%= link_to _('Custom fields'), :controller => 'custom_fields' %>
+<%= link_to l(:label_tracker_plural), :controller => 'trackers' %> |
+<%= link_to l(:label_custom_field_plural), :controller => 'custom_fields' %>
</p>
<p>
<%= image_tag "workflow" %>
-<%= link_to _('Issue Statuses'), :controller => 'issue_statuses' %> |
-<%= link_to _('Workflow'), :controller => 'roles', :action => 'workflow' %>
+<%= link_to l(:label_issue_status_plural), :controller => 'issue_statuses' %> |
+<%= link_to l(:label_workflow), :controller => 'roles', :action => 'workflow' %>
</p>
<p>
<%= image_tag "options" %>
-<%= link_to _('Enumerations'), :controller => 'enumerations' %>
+<%= link_to l(:label_enumerations), :controller => 'enumerations' %>
</p>
<p>
<%= image_tag "mailer" %>
-<%= link_to _('Mail notifications'), :controller => 'admin', :action => 'mail_options' %>
+<%= link_to l(:field_mail_notification), :controller => 'admin', :action => 'mail_options' %>
+</p>
+
+<p>
+<%= image_tag "login" %>
+<%= link_to l(:label_authentication), :controller => 'auth_sources' %>
</p>
<p>
<%= image_tag "help" %>
-<%= link_to _('Information'), :controller => 'admin', :action => 'info' %>
+<%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %>
</p> \ No newline at end of file
diff --git a/redmine/app/views/admin/info.rhtml b/redmine/app/views/admin/info.rhtml
index c987805c9..03dddafb6 100644
--- a/redmine/app/views/admin/info.rhtml
+++ b/redmine/app/views/admin/info.rhtml
@@ -1,8 +1,8 @@
<h2><%=_('Information')%></h2>
-<p><%=_('Version')%>: <strong><%= RDM_APP_NAME %> <%= RDM_APP_VERSION %></strong></p>
+<p><%=l(:field_version)%>: <strong><%= RDM_APP_NAME %> <%= RDM_APP_VERSION %></strong></p>
-Environment:
+<%=l(:label_environment)%>:
<ul>
<% Rails::Info.properties.each do |name, value| %>
<li><%= name %>: <%= value %></li>
diff --git a/redmine/app/views/admin/mail_options.rhtml b/redmine/app/views/admin/mail_options.rhtml
index 2d1d80ebb..dcfc619fe 100644
--- a/redmine/app/views/admin/mail_options.rhtml
+++ b/redmine/app/views/admin/mail_options.rhtml
@@ -1,16 +1,16 @@
-<h2><%=_('Mail notifications')%></h2>
+<h2><%=l(:field_mail_notification)%></h2>
-<p><%=_('Select actions for which mail notification should be enabled.')%></p>
+<p><%=l(:text_select_mail_notifications)%></p>
<%= start_form_tag ({}, :id => 'mail_options_form')%>
<% for action in @actions %>
<%= check_box_tag "action_ids[]", action.id, action.mail_enabled? %>
- <%= action.descr %><br />
+ <%= action.description %><br />
<% end %>
<br />
<p>
-<a href="javascript:checkAll('mail_options_form', true)"><%=_('Check all')%></a> |
-<a href="javascript:checkAll('mail_options_form', false)"><%=_('Uncheck all')%></a>
+<a href="javascript:checkAll('mail_options_form', true)"><%=l(:button_check_all)%></a> |
+<a href="javascript:checkAll('mail_options_form', false)"><%=l(:button_uncheck_all)%></a>
</p>
-<%= submit_tag _('Save') %>
+<%= submit_tag l(:button_save) %>
<%= end_form_tag %> \ No newline at end of file
diff --git a/redmine/app/views/admin/projects.rhtml b/redmine/app/views/admin/projects.rhtml
index bcb940b4d..68552fb90 100644
--- a/redmine/app/views/admin/projects.rhtml
+++ b/redmine/app/views/admin/projects.rhtml
@@ -1,25 +1,25 @@
-<h2><%=_('Projects')%></h2>
+<h2><%=l(:label_project_plural)%></h2>
<table width="100%" cellspacing="1" cellpadding="2" class="listTableContent">
<tr class="ListHead">
- <%= sort_header_tag('name', :caption => _('Project')) %>
- <th><%=_('Description')%></th>
- <th><%=_('Public')%></th>
- <th><%=_('Subprojects')%></th>
- <%= sort_header_tag('created_on', :caption => _('Created on')) %>
+ <%= sort_header_tag('name', :caption => l(:label_project)) %>
+ <th><%=l(:field_description)%></th>
+ <th><%=l(:field_is_public)%></th>
+ <th><%=l(:label_subproject_plural)%></th>
+ <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
<th></th>
</tr>
<% for project in @projects %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
- <td><%= project.descr %>
+ <td><%= project.description %>
<td align="center"><%= image_tag 'true' if project.is_public? %>
<td align="center"><%= project.projects_count %>
<td align="center"><%= format_date(project.created_on) %>
<td align="center">
<%= start_form_tag({:controller => 'projects', :action => 'destroy', :id => project}) %>
- <%= submit_tag _('Delete'), :class => "button-small" %>
+ <%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %>
</td>
</tr>
@@ -29,4 +29,4 @@
<p><%= pagination_links_full @project_pages %>
[ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p>
-<p><%= link_to ('&#187; ' + _('New project')), :controller => 'projects', :action => 'add' %></p> \ No newline at end of file
+<p><%= link_to ('&#187; ' + l(:label_project_new)), :controller => 'projects', :action => 'add' %></p> \ No newline at end of file
diff --git a/redmine/app/views/auth_sources/_form.rhtml b/redmine/app/views/auth_sources/_form.rhtml
new file mode 100644
index 000000000..4bb3c3335
--- /dev/null
+++ b/redmine/app/views/auth_sources/_form.rhtml
@@ -0,0 +1,49 @@
+<%= error_messages_for 'auth_source' %>
+
+<div class="box">
+<!--[form:auth_source]-->
+<p><label for="auth_source_name"><%=l(:field_name)%></label> <span class="required">*</span><br/>
+<%= text_field 'auth_source', 'name' %></p>
+
+<p><label for="auth_source_host"><%=l(:field_host)%></label> <span class="required">*</span><br/>
+<%= text_field 'auth_source', 'host' %></p>
+
+<p><label for="auth_source_port"><%=l(:field_port)%></label> <span class="required">*</span><br/>
+<%= text_field 'auth_source', 'port', :size => 6 %></p>
+
+<p><label for="auth_source_account"><%=l(:field_account)%></label><br/>
+<%= text_field 'auth_source', 'account' %></p>
+
+<p><label for="auth_source_account_password"><%=l(:field_password)%></label><br/>
+<%= password_field 'auth_source', 'account_password' %></p>
+
+<p><label for="auth_source_base_dn"><%=l(:field_base_dn)%></label> <span class="required">*</span><br/>
+<%= text_field 'auth_source', 'base_dn', :size => 60 %></p>
+
+<p><%= check_box 'auth_source', 'onthefly_register' %>
+<label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label></p>
+
+<fieldset><legend><%=l(:label_attribute_plural)%></legend>
+<div style="float:left;margin-right:10px;">
+<p><label for="auth_source_attr_login"><%=l(:field_login)%></label> <span class="required">*</span><br/>
+<%= text_field 'auth_source', 'attr_login', :size => 20 %></p>
+</div>
+
+<div style="float:left;margin-right:10px;">
+<p><label for="auth_source_attr_firstname"><%=l(:field_firstname)%></label><br/>
+<%= text_field 'auth_source', 'attr_firstname', :size => 20 %></p>
+</div>
+
+<div style="float:left;margin-right:10px;">
+<p><label for="auth_source_attr_lastname"><%=l(:field_lastname)%></label><br/>
+<%= text_field 'auth_source', 'attr_lastname', :size => 20 %></p>
+</div>
+
+<div>
+<p><label for="auth_source_attr_mail"><%=l(:field_mail)%></label><br/>
+<%= text_field 'auth_source', 'attr_mail', :size => 20 %></p>
+</div>
+</fieldset>
+
+<!--[eoform:auth_source]-->
+</div>
diff --git a/redmine/app/views/auth_sources/edit.rhtml b/redmine/app/views/auth_sources/edit.rhtml
new file mode 100644
index 000000000..7e4ee01ce
--- /dev/null
+++ b/redmine/app/views/auth_sources/edit.rhtml
@@ -0,0 +1,7 @@
+<h2><%=l(:label_auth_source)%> (<%= @auth_source.auth_method_name %>)</h2>
+
+<%= start_form_tag :action => 'update', :id => @auth_source %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag l(:button_save) %>
+<%= end_form_tag %>
+
diff --git a/redmine/app/views/auth_sources/list.rhtml b/redmine/app/views/auth_sources/list.rhtml
new file mode 100644
index 000000000..cbaa9c3eb
--- /dev/null
+++ b/redmine/app/views/auth_sources/list.rhtml
@@ -0,0 +1,32 @@
+<h2><%=l(:label_auth_source_plural)%></h2>
+
+<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
+ <tr class="ListHead">
+ <td><%=l(:field_name)%></td>
+ <td><%=l(:field_type)%></td>
+ <td><%=l(:field_host)%></td>
+ <td></td>
+ <td></td>
+ </tr>
+
+<% for source in @auth_sources %>
+ <tr class="<%= cycle("odd", "even") %>">
+ <td><%= link_to source.name, :action => 'edit', :id => source%></td>
+ <td align="center"><%= source.auth_method_name %></td>
+ <td align="center"><%= source.host %></td>
+ <td align="center">
+ <%= link_to l(:button_test), :action => 'test_connection', :id => source %>
+ </td>
+ <td align="center">
+ <%= start_form_tag :action => 'destroy', :id => source %>
+ <%= submit_tag l(:button_delete), :class => "button-small" %>
+ <%= end_form_tag %>
+ </td>
+ </tr>
+<% end %>
+</table>
+
+<%= pagination_links_full @auth_source_pages %>
+<br />
+<%= link_to '&#187; ' + l(:label_auth_source_new), :action => 'new' %>
+
diff --git a/redmine/app/views/auth_sources/new.rhtml b/redmine/app/views/auth_sources/new.rhtml
new file mode 100644
index 000000000..7cb81dab0
--- /dev/null
+++ b/redmine/app/views/auth_sources/new.rhtml
@@ -0,0 +1,6 @@
+<h2><%=l(:label_auth_source_new)%> (<%= @auth_source.auth_method_name %>)</h2>
+
+<%= start_form_tag :action => 'create' %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag l(:button_create) %>
+<%= end_form_tag %>
diff --git a/redmine/app/views/custom_fields/_form.rhtml b/redmine/app/views/custom_fields/_form.rhtml
index d268461fc..00e36dd36 100644
--- a/redmine/app/views/custom_fields/_form.rhtml
+++ b/redmine/app/views/custom_fields/_form.rhtml
@@ -1,26 +1,53 @@
<%= error_messages_for 'custom_field' %>
<!--[form:custom_field]-->
-<p><label for="custom_field_name"><%=_('Name')%></label><br/>
-<%= text_field 'custom_field', 'name' %></p>
+<div class="box">
+<p><label for="custom_field_name"><%=l(:field_name)%></label> <span class="required">*</span><br/>
+<%= text_field 'custom_field', 'name' %></p>
-<p><label for="custom_field_typ"><%=_('Type')%></label><br/>
-<%= select("custom_field", "typ", CustomField::TYPES) %></p>
+<p><label for="custom_field_typ"><%=l(:field_field_format)%></label><br/>
+<%= select("custom_field", "field_format", custom_field_formats_for_select) %></p>
-<p><%= check_box 'custom_field', 'is_required' %>
-<label for="custom_field_is_required"><%=_('Required')%></label></p>
-
-<p><%= check_box 'custom_field', 'is_for_all' %>
-<label for="custom_field_is_for_all"><%=_('For all projects')%></label></p>
-
-<p><label for="custom_field_min_length"><%=_('Min - max length')%></label> (<%=_('0 means no restriction')%>)<br/>
+<p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label> (<%=l(:text_min_max_length_info)%>)<br/>
<%= text_field 'custom_field', 'min_length', :size => 5 %> -
<%= text_field 'custom_field', 'max_length', :size => 5 %></p>
-<p><label for="custom_field_regexp"><%=_('Regular expression pattern')%></label> (eg. ^[A-Z0-9]+$)<br/>
+<p><label for="custom_field_regexp"><%=l(:field_regexp)%></label> (<%=l(:text_regexp_info)%>)<br/>
<%= text_field 'custom_field', 'regexp', :size => 50 %></p>
-<p><label for="custom_field_possible_values"><%=_('Possible values')%></label> (separator: |)<br/>
-<%= text_area 'custom_field', 'possible_values', :rows => 5, :cols => 60 %></p>
+<p><label for="custom_field_possible_values"><%=l(:field_possible_values)%></label> (<%=l(:text_possible_values_info)%>)<br/>
+<%= text_area 'custom_field', 'possible_values', :rows => 5, :cols => 60 %></p>
+</div>
<!--[eoform:custom_field]-->
+<div class="box">
+<% case type.to_s
+ when "IssueCustomField" %>
+
+<fieldset><legend><%=l(:label_tracker_plural)%></legend>
+<% for tracker in @trackers %>
+ <input type="checkbox"
+ name="tracker_ids[]"
+ value="<%= tracker.id %>"
+ <%if @custom_field.trackers.include? tracker%>checked="checked"<%end%>
+ > <%= tracker.name %>
+<% end %></fieldset>
+&nbsp;
+
+<p><%= check_box 'custom_field', 'is_required' %>
+<label for="custom_field_is_required"><%=l(:field_is_required)%></label></p>
+
+<p><%= check_box 'custom_field', 'is_for_all' %>
+<label for="custom_field_is_for_all"><%=l(:field_is_for_all)%></label></p>
+
+<% when "UserCustomField" %>
+<p><%= check_box 'custom_field', 'is_required' %>
+<label for="custom_field_is_required"><%=l(:field_is_required)%></label></p>
+
+<% when "ProjectCustomField" %>
+<p><%= check_box 'custom_field', 'is_required' %>
+<label for="custom_field_is_required"><%=l(:field_is_required)%></label></p>
+
+
+<% end %>
+</div>
diff --git a/redmine/app/views/custom_fields/edit.rhtml b/redmine/app/views/custom_fields/edit.rhtml
index ab4ea8b24..c9473fd04 100644
--- a/redmine/app/views/custom_fields/edit.rhtml
+++ b/redmine/app/views/custom_fields/edit.rhtml
@@ -1,6 +1,6 @@
-<h2><%=_('Custom field')%></h2>
+<h2><%=l(:label_custom_field)%> (<%=l(@custom_field.type_name)%>)</h2>
<%= start_form_tag :action => 'edit', :id => @custom_field %>
- <%= render :partial => 'form' %>
- <%= submit_tag _('Save') %>
+ <%= render :partial => 'form', :locals => { :type => @custom_field.type } %>
+ <%= submit_tag l(:button_save) %>
<%= end_form_tag %>
diff --git a/redmine/app/views/custom_fields/list.rhtml b/redmine/app/views/custom_fields/list.rhtml
index 2e654072f..fba952100 100644
--- a/redmine/app/views/custom_fields/list.rhtml
+++ b/redmine/app/views/custom_fields/list.rhtml
@@ -1,32 +1,37 @@
-<h2><%=_('Custom fields')%></h2>
+<h2><%=l(:label_custom_field_plural)%></h2>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<tr class="ListHead">
- <th><%=_('Name')%></th>
- <th><%=_('Type')%></th>
- <th><%=_('Required')%></th>
- <th><%=_('For all projects')%></th>
+ <th><%=l(:field_name)%></th>
+ <th><%=l(:field_type)%></th>
+ <th><%=l(:field_field_format)%></th>
+ <th><%=l(:field_is_required)%></th>
+ <th><%=l(:field_is_for_all)%></th>
<th><%=_('Used by')%></th>
<th></th>
</tr>
<% for custom_field in @custom_fields %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
- <td align="center"><%= CustomField::TYPES[custom_field.typ][0] %></td>
+ <td align="center"><%= l(custom_field.type_name) %></td>
+ <td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format]) %></td>
<td align="center"><%= image_tag 'true' if custom_field.is_required? %></td>
<td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td>
- <td align="center"><%= custom_field.projects.count.to_s + ' ' + _('Project') + '(s)' unless custom_field.is_for_all? %></td>
+ <td align="center"><%= custom_field.projects.count.to_s + ' ' + lwr(:label_project, custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
<td align="center">
<%= start_form_tag :action => 'destroy', :id => custom_field %>
- <%= submit_tag _('Delete'), :class => "button-small" %>
+ <%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %> </td>
</tr>
<% end %>
</table>
-<%= link_to ('&#171; ' + _('Previous')), { :page => @custom_field_pages.current.previous } if @custom_field_pages.current.previous %>
-<%= link_to (_('Next') + ' &#187;'), { :page => @custom_field_pages.current.next } if @custom_field_pages.current.next %>
+<%= pagination_links_full @custom_field_pages %>
<br />
-
-<%= link_to ('&#187; ' + _('New custom field')), :action => 'new' %>
+<%=l(:label_custom_field_new)%>:
+<ul>
+<li><%= link_to l(:label_issue_plural), :action => 'new', :type => 'IssueCustomField' %></li>
+<li><%= link_to l(:label_project_plural), :action => 'new', :type => 'ProjectCustomField' %></li>
+<li><%= link_to l(:label_user_plural), :action => 'new', :type => 'UserCustomField' %></li>
+</ul>
diff --git a/redmine/app/views/custom_fields/new.rhtml b/redmine/app/views/custom_fields/new.rhtml
index 0e6492a28..1605ada2b 100644
--- a/redmine/app/views/custom_fields/new.rhtml
+++ b/redmine/app/views/custom_fields/new.rhtml
@@ -1,7 +1,8 @@
-<h2><%=_('New custom field')%></h2>
+<h2><%=l(:label_custom_field_new)%> (<%=l(@custom_field.type_name)%>)</h2>
<%= start_form_tag :action => 'new' %>
- <%= render :partial => 'form' %>
- <%= submit_tag _('Create') %>
+ <%= render :partial => 'form', :locals => { :type => @custom_field.type } %>
+ <%= hidden_field_tag 'type', @custom_field.type %>
+ <%= submit_tag l(:button_save) %>
<%= end_form_tag %>
diff --git a/redmine/app/views/documents/_form.rhtml b/redmine/app/views/documents/_form.rhtml
index 4440a156e..e4dac38e6 100644
--- a/redmine/app/views/documents/_form.rhtml
+++ b/redmine/app/views/documents/_form.rhtml
@@ -1,15 +1,15 @@
<%= error_messages_for 'document' %>
<!--[form:document]-->
-<p><label for="document_category_id"><%=_('Category')%></label><br />
+<p><label for="document_category_id"><%=l(:field_category)%></label><br />
<select name="document[category_id]">
-<%= options_from_collection_for_select @categories, "id", "name",@document.category_id %>
+<%= options_from_collection_for_select @categories, "id", "name", @document.category_id %>
</select></p>
-<p><label for="document_title"><%=_('Title')%> <span class="required">*</span></label><br />
+<p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label><br />
<%= text_field 'document', 'title', :size => 60 %></p>
-<p><label for="document_descr"><%=_('Description')%> <span class="required">*</span></label><br />
-<%= text_area 'document', 'descr', :cols => 60, :rows => 5 %></p>
+<p><label for="document_description"><%=l(:field_description)%> <span class="required">*</span></label><br />
+<%= text_area 'document', 'description', :cols => 60, :rows => 5 %></p>
<!--[eoform:document]-->
diff --git a/redmine/app/views/documents/show.rhtml b/redmine/app/views/documents/show.rhtml
index 8e09bb2f5..1cadf7c42 100644
--- a/redmine/app/views/documents/show.rhtml
+++ b/redmine/app/views/documents/show.rhtml
@@ -1,6 +1,6 @@
<h2><%= @document.title %></h2>
-<strong><%=_('Description')%>:</strong> <%= @document.descr %><br />
+<strong><%=_('Description')%>:</strong> <%= @document.description %><br />
<strong><%=_('Category')%>:</strong> <%= @document.category.name %><br />
<br />
diff --git a/redmine/app/views/issues/change_status.rhtml b/redmine/app/views/issues/change_status.rhtml
index 58032cefc..aa85ae249 100644
--- a/redmine/app/views/issues/change_status.rhtml
+++ b/redmine/app/views/issues/change_status.rhtml
@@ -5,7 +5,8 @@
<%= hidden_field_tag 'confirm', 1 %>
<%= hidden_field 'history', 'status_id' %>
-
+
+<div class="box">
<p><%=_('New status')%>: <b><%= @history.status.name %></b></p>
<div>
@@ -24,6 +25,8 @@
<p><label for="history_notes"><%=_('Notes')%></label><br />
<%= text_area 'history', 'notes', :cols => 60, :rows => 10 %></p>
+</div>
+
<%= submit_tag _('Save') %>
<%= end_form_tag %>
diff --git a/redmine/app/views/issues/edit.rhtml b/redmine/app/views/issues/edit.rhtml
index 1249cfc8d..876542fbe 100644
--- a/redmine/app/views/issues/edit.rhtml
+++ b/redmine/app/views/issues/edit.rhtml
@@ -1,18 +1,12 @@
-<h2><%=_('Issue')%> #<%= @issue.id %></h2>
+<h2><%=_@issue.tracker.name%> #<%= @issue.id %> - <%= @issue.subject %></h2>
<%= error_messages_for 'issue' %>
<%= start_form_tag :action => 'edit', :id => @issue %>
+<div class="box">
<!--[form:issue]-->
<p><%=_('Status')%>: <b><%= @issue.status.name %></b></p>
-<div style="float:left;margin-right:10px;">
-<p><label for="issue_tracker_id"><%=_('Tracker')%> <span class="required">*</span></label><br/>
-<select name="issue[tracker_id]">
-<%= options_from_collection_for_select @trackers, "id", "name", @issue.tracker_id %></p>
-</select></p>
-</div>
-
<div style="float:left;margin-right:10px;">
<p><label for="issue_priority_id"><%=_('Priority')%> <span class="required">*</span></label><br/>
<select name="issue[priority_id]">
@@ -39,24 +33,21 @@
<p><label for="issue_subject"><%=_('Subject')%></label><span class="required">*</span><br/>
<%= text_field 'issue', 'subject', :size => 60 %></p>
-<p><label for="issue_descr"><%=_('Description')%></label><span class="required">*</span><br/>
-<%= text_area 'issue', 'descr', :cols => 60, :rows => 10 %></p>
+<p><label for="issue_description"><%=_('Description')%></label><span class="required">*</span><br/>
+<%= text_area 'issue', 'description', :cols => 60, :rows => 10 %></p>
-
-<% for custom_value in @custom_values %>
- <p><%= content_tag "label", custom_value.custom_field.name %>
- <% if custom_value.custom_field.is_required? %><span class="required">*</span><% end %>
- <br />
- <%= custom_field_tag custom_value %></p>
+<% for custom_value in @custom_values %>
+ <p><%= custom_field_tag_with_label custom_value %></p>
<% end %>
-
<p><label for="issue_fixed_version"><%=_('Fixed in version')%></label><br/>
<select name="issue[fixed_version_id]">
<option value="">--none--</option>
<%= options_from_collection_for_select @project.versions, "id", "name", @issue.fixed_version_id %>
</select></p>
+
<!--[eoform:issue]-->
+</div>
-<center><%= submit_tag _('Save') %></center>
+<%= submit_tag _('Save') %>
<%= end_form_tag %>
diff --git a/redmine/app/views/issues/show.rhtml b/redmine/app/views/issues/show.rhtml
index 58c9b3579..649f9adf9 100644
--- a/redmine/app/views/issues/show.rhtml
+++ b/redmine/app/views/issues/show.rhtml
@@ -1,18 +1,21 @@
-<h2><%=_('Issue')%> #<%= @issue.id %> - <%= @issue.subject %></h2>
+<h2><%=_(@issue.tracker.name)%> #<%= @issue.id %> - <%= @issue.subject %></h2>
<div class="box">
-<p><b><%=_('Tracker')%>:</b> <%= @issue.tracker.name %></p>
+<p><b><%=_('Status')%>:</b> <%= @issue.status.name %></p>
<p><b><%=_('Priority')%>:</b> <%= @issue.priority.name %></p>
<p><b><%=_('Category')%>:</b> <%= @issue.category.name unless @issue.category_id.nil? %></p>
-<p><b><%=_('Status')%>:</b> <%= @issue.status.name %></p>
<p><b><%=_('Author')%>:</b> <%= @issue.author.display_name %></p>
<p><b><%=_('Assigned to')%>:</b> <%= @issue.assigned_to.display_name unless @issue.assigned_to.nil? %></p>
<p><b><%=_('Subject')%>:</b> <%= @issue.subject %></p>
-<p><b><%=_('Description')%>:</b> <%= simple_format auto_link @issue.descr %></p>
+<p><b><%=_('Description')%>:</b> <%= simple_format auto_link @issue.description %></p>
<p><b><%=_('Created on')%>:</b> <%= format_date(@issue.created_on) %></p>
+<% for custom_value in @custom_values %>
+<p><b><%= custom_value.custom_field.name %></b>: <%= show_value custom_value %></p>
+<% end %>
+
<% if authorize_for('issues', 'edit') %>
<%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %>
<%= submit_tag _('Edit') %>
diff --git a/redmine/app/views/layouts/base.rhtml b/redmine/app/views/layouts/base.rhtml
index 21bb036d3..de99a0b4a 100644
--- a/redmine/app/views/layouts/base.rhtml
+++ b/redmine/app/views/layouts/base.rhtml
@@ -1,13 +1,51 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
-<title>redMine</title>
+<title><%= $RDM_HEADER_TITLE %></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="redMine" />
<meta name="keywords" content="issue,bug,tracker" />
<%= stylesheet_link_tag "application" %>
+<%= stylesheet_link_tag "menu" %>
<%= stylesheet_link_tag "rails" %>
<%= javascript_include_tag :defaults %>
+<%= javascript_include_tag 'menu' %>
+
+<script type='text/javascript'>
+var menu_contenu=' \
+<div id="menuAdmin" class="menu" onmouseover="menuMouseover(event)"> \
+<a class="menuItem" href="\/admin\/projects" onmouseover="menuItemMouseover(event,\'menuProjects\');"><span class="menuItemText"><%=_('Projects')%><\/span><span class="menuItemArrow">&#9654;<\/span><\/a> \
+<a class="menuItem" href="\/users" onmouseover="menuItemMouseover(event,\'menuUsers\');"><span class="menuItemText"><%=_('Users')%><\/span><span class="menuItemArrow">&#9654;<\/span><\/a> \
+<a class="menuItem" href="\/roles"><%=_('Roles and permissions')%><\/a> \
+<a class="menuItem" href="\/trackers" onmouseover="menuItemMouseover(event,\'menuTrackers\');"><span class="menuItemText"><%=_('Trackers')%><\/span><span class="menuItemArrow">&#9654;<\/span><\/a> \
+<a class="menuItem" href="\/custom_fields"><%=_('Custom fields')%><\/a> \
+<a class="menuItem" href="\/enumerations"><%=_('Enumerations')%><\/a> \
+<a class="menuItem" href="\/admin\/mail_options"><%=_('Mail notifications')%><\/a> \
+<a class="menuItem" href="\/auth_sources"><%=l(:label_authentication)%><\/a> \
+<a class="menuItem" href="\/admin\/info"><%=_('Information')%><\/a> \
+<\/div> \
+<div id="menuTrackers" class="menu"> \
+<a class="menuItem" href="\/issue_statuses"><%=_('Issue Statuses')%><\/a> \
+<a class="menuItem" href="\/roles\/workflow"><%=_('Workflow')%><\/a> \
+<\/div> \
+<div id="menuProjects" class="menu"><a class="menuItem" href="\/projects\/add"><%=_('New')%><\/a><\/div> \
+<div id="menuUsers" class="menu"><a class="menuItem" href="\/users\/add"><%=_('New')%><\/a><\/div> \
+ \
+<% unless @project.nil? || @project.id.nil? %> \
+<div id="menuProject" class="menu" onmouseover="menuMouseover(event)"> \
+<%= link_to _('Issues'), {:controller => 'projects', :action => 'list_issues', :id => @project }, :class => "menuItem" %> \
+<%= link_to _('Reports'), {:controller => 'reports', :action => 'issue_report', :id => @project }, :class => "menuItem" %> \
+<%= link_to _('News'), {:controller => 'projects', :action => 'list_news', :id => @project }, :class => "menuItem" %> \
+<%= link_to _('Change log'), {:controller => 'projects', :action => 'changelog', :id => @project }, :class => "menuItem" %> \
+<%= link_to _('Documents'), {:controller => 'projects', :action => 'list_documents', :id => @project }, :class => "menuItem" %> \
+<%= link_to _('Members'), {:controller => 'projects', :action => 'list_members', :id => @project }, :class => "menuItem" %> \
+<%= link_to _('Files'), {:controller => 'projects', :action => 'list_files', :id => @project }, :class => "menuItem" %> \
+<%= link_to_if_authorized _('Settings'), {:controller => 'projects', :action => 'settings', :id => @project }, :class => "menuItem" %> \
+<\/div> \
+<% end %> \
+';
+</script>
+
</head>
<body>
@@ -15,37 +53,42 @@
<div id="header">
<div style="float: left;">
- <h1><%= RDM_APP_NAME %></h1>
- <h2>Project management</h2>
+ <h1><%= $RDM_HEADER_TITLE %></h1>
+ <h2><%= $RDM_HEADER_SUBTITLE %></h2>
</div>
<div style="float: right; padding-right: 1em; padding-top: 0.2em;">
- <% unless session[:user].nil? %><small><%=_('Logged as')%> <b><%= session[:user].login %></b></small><% end %>
+ <% if loggedin? %><small><%=l(:label_logged_as)%> <b><%= @logged_in_user.login %></b></small><% end %>
</div>
</div>
<div id="navigation">
<ul>
- <li class="selected"><%= link_to _('Home'), { :controller => '' }, :class => "picHome" %></li>
- <li><%= link_to _('My page'), { :controller => 'account', :action => 'my_page'}, :class => "picUserPage" %></li>
- <li><%= link_to _('Projects'), { :controller => 'projects' }, :class => "picProject" %></li>
+ <li class="selected"><%= link_to l(:label_home), { :controller => '' }, :class => "picHome" %></li>
+ <li><%= link_to l(:label_my_page), { :controller => 'account', :action => 'my_page'}, :class => "picUserPage" %></li>
+ <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "picProject" %></li>
- <% unless session[:user].nil? %>
- <li><%= link_to _('My account'), { :controller => 'account', :action => 'my_account' }, :class => "picUser" %></li>
- <% end %>
+ <% unless @project.nil? || @project.id.nil? %>
+ <li><%= link_to @project.name, { :controller => 'projects', :action => 'show', :id => @project }, :class => "picProject", :onmouseover => "buttonMouseover(event, 'menuProject');" %></li>
+ <% end %>
- <% if admin_loggedin? %>
- <li><%= link_to _('Administration'), { :controller => 'admin' }, :class => "picAdmin" %></li>
- <% end %>
+ <% if loggedin? %>
+ <li><%= link_to l(:label_my_account), { :controller => 'account', :action => 'my_account' }, :class => "picUser" %></li>
+ <% end %>
- <li class="right"><%= link_to _('Help'), { :controller => 'help', :ctrl => @params[:controller], :page => @params[:action] }, :target => "new", :class => "picHelp" %></li>
- <% if session[:user].nil? %>
- <li class="right"><%= link_to _('Log in'), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li>
- <% else %>
- <li class="right"><%= link_to _('Logout'), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>
- <% end %>
- </ul>
-
+ <% if admin_loggedin? %>
+ <li><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "picAdmin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li>
+ <% end %>
+
+ <li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => @params[:controller], :page => @params[:action] }, :target => "new", :class => "picHelp" %></li>
+
+ <% if loggedin? %>
+ <li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>
+ <% else %>
+ <li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li>
+ <% end %>
+ </ul>
</div>
+ <script type='text/javascript'>if(document.getElementById) {document.write(menu_contenu);}</script>
<div id="subcontent">
@@ -64,15 +107,14 @@
</ul>
<% end %>
- <% unless session[:user].nil? %>
+ <% if loggedin? and @logged_in_user.memberships.length > 0 %>
<h2><%=_('My projects') %></h2>
<ul class="menublock">
- <% for membership in session[:user].memberships %>
+ <% for membership in @logged_in_user.memberships %>
<li><%= link_to membership.project.name, :controller => 'projects', :action => 'show', :id => membership.project %></li>
<% end %>
</ul>
- <% end %>
-
+ <% end %>
</div>
<div id="content">
@@ -81,7 +123,10 @@
</div>
<div id="footer">
- <p><a href="http://redmine.org/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %></p>
+ <p>
+ <%= auto_link $RDM_FOOTER_SIG %> |
+ <a href="http://redmine.org/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %>
+ </p>
</div>
</div>
diff --git a/redmine/app/views/mailer/_issue.rhtml b/redmine/app/views/mailer/_issue.rhtml
index 1f238f513..f2ab6fa5f 100644
--- a/redmine/app/views/mailer/_issue.rhtml
+++ b/redmine/app/views/mailer/_issue.rhtml
@@ -1,6 +1,6 @@
<%=_('Issue')%> #<%= issue.id %> - <%= issue.subject %>
<%=_('Author')%>: <%= issue.author.display_name %>
-<%= issue.descr %>
+<%= issue.description %>
-http://<%= RDM_HOST_NAME %>/issues/show/<%= issue.id %> \ No newline at end of file
+http://<%= $RDM_HOST_NAME %>/issues/show/<%= issue.id %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/issue_add.rhtml b/redmine/app/views/mailer/issue_add_en.rhtml
index 9efec9ad9..9efec9ad9 100644
--- a/redmine/app/views/mailer/issue_add.rhtml
+++ b/redmine/app/views/mailer/issue_add_en.rhtml
diff --git a/redmine/app/views/mailer/issue_add_fr.rhtml b/redmine/app/views/mailer/issue_add_fr.rhtml
new file mode 100644
index 000000000..628ecae12
--- /dev/null
+++ b/redmine/app/views/mailer/issue_add_fr.rhtml
@@ -0,0 +1,3 @@
+Une nouvelle demande (#<%= @issue.id %>) a été soumise.
+----------------------------------------
+<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/issue_change_status.rhtml b/redmine/app/views/mailer/issue_change_status_en.rhtml
index e3612ea81..e3612ea81 100644
--- a/redmine/app/views/mailer/issue_change_status.rhtml
+++ b/redmine/app/views/mailer/issue_change_status_en.rhtml
diff --git a/redmine/app/views/mailer/issue_change_status_fr.rhtml b/redmine/app/views/mailer/issue_change_status_fr.rhtml
new file mode 100644
index 000000000..831f301d5
--- /dev/null
+++ b/redmine/app/views/mailer/issue_change_status_fr.rhtml
@@ -0,0 +1,3 @@
+La demande #<%= @issue.id %> a été mise à jour au statut "<%= @issue.status.name %>".
+----------------------------------------
+<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/lost_password_en.rhtml b/redmine/app/views/mailer/lost_password_en.rhtml
new file mode 100644
index 000000000..2593edbda
--- /dev/null
+++ b/redmine/app/views/mailer/lost_password_en.rhtml
@@ -0,0 +1,3 @@
+To change your password, use the following link:
+
+http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/lost_password_fr.rhtml b/redmine/app/views/mailer/lost_password_fr.rhtml
new file mode 100644
index 000000000..30996f118
--- /dev/null
+++ b/redmine/app/views/mailer/lost_password_fr.rhtml
@@ -0,0 +1,3 @@
+Pour changer votre mot de passe, utilisez le lien suivant:
+
+http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/register_en.rhtml b/redmine/app/views/mailer/register_en.rhtml
new file mode 100644
index 000000000..2c0341b24
--- /dev/null
+++ b/redmine/app/views/mailer/register_en.rhtml
@@ -0,0 +1,3 @@
+To activate your redMine account, use the following link:
+
+http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/register_fr.rhtml b/redmine/app/views/mailer/register_fr.rhtml
new file mode 100644
index 000000000..3f5d0ccaf
--- /dev/null
+++ b/redmine/app/views/mailer/register_fr.rhtml
@@ -0,0 +1,3 @@
+Pour activer votre compte sur redMine, utilisez le lien suivant:
+
+http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/news/_form.rhtml b/redmine/app/views/news/_form.rhtml
index 609b15cd9..ea6d5df7f 100644
--- a/redmine/app/views/news/_form.rhtml
+++ b/redmine/app/views/news/_form.rhtml
@@ -4,10 +4,10 @@
<p><label for="news_title"><%=_('Title')%></label> <span class="required">*</span><br/>
<%= text_field 'news', 'title', :size => 60 %></p>
-<p><label for="news_shortdescr"><%=_('Summary')%> <span class="required">*</span></label><br/>
-<%= text_area 'news', 'shortdescr', :cols => 60, :rows => 2 %></p>
+<p><label for="news_summary"><%=_('Summary')%></label><br/>
+<%= text_area 'news', 'summary', :cols => 60, :rows => 2 %></p>
-<p><label for="news_descr"><%=_('Description')%> <span class="required">*</span></label><br/>
-<%= text_area 'news', 'descr', :cols => 60, :rows => 10 %></p>
+<p><label for="news_description"><%=_('Description')%> <span class="required">*</span></label><br/>
+<%= text_area 'news', 'description', :cols => 60, :rows => 10 %></p>
<!--[eoform:news]-->
diff --git a/redmine/app/views/news/show.rhtml b/redmine/app/views/news/show.rhtml
index d6773cda9..f571b54ca 100644
--- a/redmine/app/views/news/show.rhtml
+++ b/redmine/app/views/news/show.rhtml
@@ -1,10 +1,10 @@
<h2><%= @news.title %></h2>
<p>
-<b><%=_('Summary')%></b>: <%= @news.shortdescr %><br />
+<b><%=_('Summary')%></b>: <%= @news.summary %><br />
<b><%=_('By')%></b>: <%= @news.author.display_name %><br />
<b><%=_('Date')%></b>: <%= format_time(@news.created_on) %>
</p>
-<%= simple_format auto_link @news.descr %>
+<%= simple_format auto_link @news.description %>
diff --git a/redmine/app/views/projects/_form.rhtml b/redmine/app/views/projects/_form.rhtml
index 89f58354e..9623a9d46 100644
--- a/redmine/app/views/projects/_form.rhtml
+++ b/redmine/app/views/projects/_form.rhtml
@@ -1,10 +1,11 @@
<%= error_messages_for 'project' %>
+<div class="box">
<!--[form:project]-->
<p><label for="project_name"><%=_('Name')%> <span class="required">*</span></label><br/>
<%= text_field 'project', 'name' %></p>
-<% if session[:user].admin %>
+<% if admin_loggedin? %>
<p><label for="project_parent_id"><%=_('Subproject of')%></label><br/>
<select name="project[parent_id]">
<option value=""></option>
@@ -12,15 +13,19 @@
</select></p>
<% end %>
-<p><label for="project_descr"><%=_('Description')%> <span class="required">*</span></label><br/>
-<%= text_area 'project', 'descr', :cols => 60, :rows => 3 %></p>
+<p><label for="project_description"><%=_('Description')%> <span class="required">*</span></label><br/>
+<%= text_area 'project', 'description', :cols => 60, :rows => 3 %></p>
<p><label for="project_homepage"><%=_('Homepage')%></label><br/>
<%= text_field 'project', 'homepage', :size => 40 %></p>
<p><%= check_box 'project', 'is_public' %>
<label for="project_is_public"><%=_('Public')%></label></p>
-
+
+<% for custom_value in @custom_values %>
+ <p><%= custom_field_tag_with_label custom_value %></p>
+<% end %>
+
<fieldset><legend><%=_('Custom fields')%></legend>
<% for custom_field in @custom_fields %>
<input type="checkbox"
@@ -31,6 +36,6 @@
> <%= custom_field.name %>
<% end %></fieldset>
-<br />
-
+
+</div>
<!--[eoform:project]-->
diff --git a/redmine/app/views/projects/add.rhtml b/redmine/app/views/projects/add.rhtml
index 6344705b0..bdfe0862e 100644
--- a/redmine/app/views/projects/add.rhtml
+++ b/redmine/app/views/projects/add.rhtml
@@ -4,4 +4,3 @@
<%= render :partial => 'form' %>
<%= submit_tag _('Create') %>
<%= end_form_tag %>
-
diff --git a/redmine/app/views/projects/add_document.rhtml b/redmine/app/views/projects/add_document.rhtml
index 13e75dd77..f1adc8d4d 100644
--- a/redmine/app/views/projects/add_document.rhtml
+++ b/redmine/app/views/projects/add_document.rhtml
@@ -12,8 +12,8 @@
<p><label for="document_title"><%=_('Title')%> <span class="required">*</span></label><br />
<%= text_field 'document', 'title', :size => 60 %></p>
-<p><label for="document_descr"><%=_('Description')%> <span class="required">*</span></label><br />
-<%= text_area 'document', 'descr', :cols => 60, :rows => 5 %></p>
+<p><label for="document_description"><%=_('Description')%> <span class="required">*</span></label><br />
+<%= text_area 'document', 'description', :cols => 60, :rows => 5 %></p>
<p><label for="attachment_file"><%=_('File')%></label><br/>
<%= file_field 'attachment', 'file' %></p>
diff --git a/redmine/app/views/projects/add_issue.rhtml b/redmine/app/views/projects/add_issue.rhtml
index a6b37cc46..5e4d450ec 100644
--- a/redmine/app/views/projects/add_issue.rhtml
+++ b/redmine/app/views/projects/add_issue.rhtml
@@ -1,16 +1,12 @@
-<h2><%=_('New issue')%></h2>
+<h2><%=_('New issue')%>: <%=_(@tracker.name)%></h2>
<%= start_form_tag( { :action => 'add_issue', :id => @project }, :multipart => true) %>
<%= error_messages_for 'issue' %>
+<div class="box">
<!--[form:issue]-->
-
-<div style="float:left;margin-right:10px;">
-<p><label for="issue_tracker_id"><%=_('Tracker')%> <span class="required">*</span></label><br/>
-<select name="issue[tracker_id]">
-<%= options_from_collection_for_select @trackers, "id", "name", @issue.tracker_id %></p>
-</select></p>
-</div>
+
+<%= hidden_field_tag 'tracker_id', @tracker.id %>
<div style="float:left;margin-right:10px;">
<p><label for="issue_priority_id"><%=_('Priority')%> <span class="required">*</span></label><br/>
@@ -30,33 +26,26 @@
<div>
<p><label for="issue_category_id"><%=_('Category')%></label><br/>
<select name="issue[category_id]">
-<option value=""></option>
-<%= options_from_collection_for_select @project.issue_categories, "id", "name", @issue.category_id %></p>
+<option value=""></option><%= options_from_collection_for_select @project.issue_categories, "id", "name", @issue.category_id %>
</select></p>
</div>
<p><label for="issue_subject"><%=_('Subject')%> <span class="required">*</span></label><br/>
<%= text_field 'issue', 'subject', :size => 80 %></p>
-<p><label for="issue_descr"><%=_('Description')%> <span class="required">*</span></label><br/>
-<%= text_area 'issue', 'descr', :cols => 60, :rows => 10 %></p>
-
+<p><label for="issue_description"><%=_('Description')%> <span class="required">*</span></label><br/>
+<%= text_area 'issue', 'description', :cols => 60, :rows => 10 %></p>
-<% for custom_value in @custom_values %>
- <div style="float:left;margin-right:10px;">
- <p><%= content_tag "label", custom_value.custom_field.name %>
- <% if custom_value.custom_field.is_required? %><span class="required">*</span><% end %>
- <br />
- <%= custom_field_tag custom_value %></p>
- </div>
+<% for custom_value in @custom_values %>
+ <p><%= custom_field_tag_with_label custom_value %></p>
<% end %>
-<div style="clear: both;">
<p><label for="attachment_file"><%=_('Attachment')%></label><br/>
<%= file_field 'attachment', 'file' %></p>
-</div>
<!--[eoform:issue]-->
+</div>
+
<%= submit_tag _('Create') %>
<%= end_form_tag %> \ No newline at end of file
diff --git a/redmine/app/views/projects/changelog.rhtml b/redmine/app/views/projects/changelog.rhtml
index 3be8fb0dc..5d2a588ea 100644
--- a/redmine/app/views/projects/changelog.rhtml
+++ b/redmine/app/views/projects/changelog.rhtml
@@ -3,7 +3,7 @@
<% fixed_issues = @fixed_issues.group_by {|i| i.fixed_version } %>
<% fixed_issues.each do |version, issues| %>
<p><strong><%= version.name %></strong> - <%= format_date(version.effective_date) %><br />
- <%=h version.descr %></p>
+ <%=h version.description %></p>
<ul>
<% issues.each do |i| %>
<li><%= link_to i.long_id, :controller => 'issues', :action => 'show', :id => i %> [<%= i.tracker.name %>]: <%= i.subject %></li>
diff --git a/redmine/app/views/projects/list.rhtml b/redmine/app/views/projects/list.rhtml
index bee507af6..1c7cd4374 100644
--- a/redmine/app/views/projects/list.rhtml
+++ b/redmine/app/views/projects/list.rhtml
@@ -10,7 +10,7 @@
<% for project in @projects %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to project.name, :action => 'show', :id => project %>
- <td><%= project.descr %>
+ <td><%= project.description %>
<td align="center"><%= format_date(project.created_on) %>
</tr>
<% end %>
diff --git a/redmine/app/views/projects/list_documents.rhtml b/redmine/app/views/projects/list_documents.rhtml
index 1c7db5ec9..aa7670964 100644
--- a/redmine/app/views/projects/list_documents.rhtml
+++ b/redmine/app/views/projects/list_documents.rhtml
@@ -8,7 +8,7 @@
<li>
<b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b>
<br />
- <%=_('Desciption')%>: <%= d.descr %><br />
+ <%=_('Desciption')%>: <%= d.description %><br />
<%= format_time(d.created_on) %>
</li>
diff --git a/redmine/app/views/projects/list_issues.rhtml b/redmine/app/views/projects/list_issues.rhtml
index 7e32fb257..652ad6bc5 100644
--- a/redmine/app/views/projects/list_issues.rhtml
+++ b/redmine/app/views/projects/list_issues.rhtml
@@ -7,6 +7,7 @@
<td><small><%=_('Tracker')%>:</small><br /><%= search_filter_tag 'tracker_id', :class => 'select-small' %></td>
<td><small><%=_('Priority')%>:</small><br /><%= search_filter_tag 'priority_id', :class => 'select-small' %></td>
<td><small><%=_('Category')%>:</small><br /><%= search_filter_tag 'category_id', :class => 'select-small' %></td>
+ <td><small><%=_('Fixed in version')%>:</small><br /><%= search_filter_tag 'fixed_version_id', :class => 'select-small' %></td>
<td><small><%=_('Assigned to')%>:</small><br /><%= search_filter_tag 'assigned_to_id', :class => 'select-small' %></td>
<td><small><%=_('Subprojects')%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td>
@@ -52,9 +53,4 @@
<p>
<%= pagination_links_full @issue_pages %>
[ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
- </p>
-
-
-<p>
-<%= link_to_if_authorized '&#187; ' + _('Report an issue'), :controller => 'projects', :action => 'add_issue', :id => @project %>
-</p> \ No newline at end of file
+ </p> \ No newline at end of file
diff --git a/redmine/app/views/projects/list_news.rhtml b/redmine/app/views/projects/list_news.rhtml
index 7db53391e..aee4146bf 100644
--- a/redmine/app/views/projects/list_news.rhtml
+++ b/redmine/app/views/projects/list_news.rhtml
@@ -6,7 +6,7 @@
<%= link_to_if_authorized image_tag('edit_small'), :controller => 'news', :action => 'edit', :id => news %>
<%= link_to_if_authorized image_tag('delete'), { :controller => 'news', :action => 'destroy', :id => news }, :confirm => 'Are you sure?' %>
<br />
- <%= news.shortdescr %>
+ <%= news.summary %>
<small>[<%= link_to _('Read...'), :controller => 'news', :action => 'show', :id => news %>]</small>
</p>
<% end %>
diff --git a/redmine/app/views/projects/settings.rhtml b/redmine/app/views/projects/settings.rhtml
index c130ed036..f6b5e169f 100644
--- a/redmine/app/views/projects/settings.rhtml
+++ b/redmine/app/views/projects/settings.rhtml
@@ -1,11 +1,11 @@
<h2><%=_('Settings')%></h2>
-<div class="box">
<%= start_form_tag :action => 'edit', :id => @project %>
<%= render :partial => 'form' %>
<center><%= submit_tag _('Save') %></center>
<%= end_form_tag %>
-</div>
+
+&nbsp;
<div class="box">
<h3><%=_('Members')%></h3>
@@ -54,7 +54,7 @@
<% for version in @project.versions %>
<tr>
<td><%= link_to version.name, :controller => 'versions', :action => 'edit', :id => version %></td>
- <td><%=h version.descr %></td>
+ <td><%=h version.description %></td>
<td>
<%= start_form_tag :controller => 'versions', :action => 'destroy', :id => version %>
<%= submit_tag _('Delete'), :class => "button-small" %>
diff --git a/redmine/app/views/projects/show.rhtml b/redmine/app/views/projects/show.rhtml
index 4fdbe51b4..985142f3e 100644
--- a/redmine/app/views/projects/show.rhtml
+++ b/redmine/app/views/projects/show.rhtml
@@ -1,16 +1,21 @@
<h2><%=_('Overview')%></h2>
<div class="splitcontentleft">
- <%= @project.descr %>
+ <%= @project.description %>
<ul>
<li><%=_('Homepage')%>: <%= link_to @project.homepage, @project.homepage %></li>
<li><%=_('Created on')%>: <%= format_date(@project.created_on) %></li>
+ <% for custom_value in @custom_values %>
+ <% if !custom_value.value.empty? %>
+ <li><%= custom_value.custom_field.name%>: <%= custom_value.value%></li>
+ <% end %>
+ <% end %>
</ul>
<div class="box">
<h3><%= image_tag "tracker" %> <%=_('Trackers')%></h3>
<ul>
- <% for tracker in Tracker.find_all %>
+ <% for tracker in @trackers %>
<li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id => @project,
:set_filter => 1,
"tracker_id" => tracker.id %>:
@@ -18,8 +23,14 @@
</li>
<% end %>
</ul>
- <%= link_to_if_authorized '&#187; ' + _('Report an issue'), :controller => 'projects', :action => 'add_issue', :id => @project %>
- <br />
+ <% if authorize_for 'projects', 'add_issue' %>
+ &#187; <%=_('Report an issue')%>:
+ <ul>
+ <% @trackers.each do |tracker| %>
+ <li><%= link_to _(tracker.name), :controller => 'projects', :action => 'add_issue', :id => @project, :tracker_id => tracker %></li>
+ <% end %>
+ </ul>
+ <% end %>
<center><small>[ <%= link_to _('View all issues'), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %> ]</small></center>
</div>
</div>
@@ -46,7 +57,7 @@
<% for news in @news %>
<p>
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
- <%= news.shortdescr %>
+ <%= news.summary %>
<small>[<%= link_to _('Read...'), :controller => 'news', :action => 'show', :id => news %>]</small>
</p>
<hr />
diff --git a/redmine/app/views/roles/_form.rhtml b/redmine/app/views/roles/_form.rhtml
index 02eef4717..cc30e82b0 100644
--- a/redmine/app/views/roles/_form.rhtml
+++ b/redmine/app/views/roles/_form.rhtml
@@ -1,5 +1,6 @@
<%= error_messages_for 'role' %>
+<div class="box">
<!--[form:role]-->
<p><label for="role_name"><%=_('Name')%> <span class="required">*</span></label><br />
<%= text_field 'role', 'name' %></p>
@@ -10,7 +11,7 @@
<fieldset><legend><%= _(Permission::GROUPS[group_id]) %></legend>
<% permissions[group_id].each do |p| %>
<div style="width:200px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %>
- <%= _(p.descr) %>
+ <%= _(p.description) %>
</div>
<% end %>
</fieldset>
@@ -19,4 +20,4 @@
<a href="javascript:checkAll('role_form', true)"><%=_('Check all')%></a> |
<a href="javascript:checkAll('role_form', false)"><%=_('Uncheck all')%></a><br />
<!--[eoform:role]-->
-
+</div>
diff --git a/redmine/app/views/trackers/_form.rhtml b/redmine/app/views/trackers/_form.rhtml
index 95d06d777..0eab8e96a 100644
--- a/redmine/app/views/trackers/_form.rhtml
+++ b/redmine/app/views/trackers/_form.rhtml
@@ -1,7 +1,7 @@
<%= error_messages_for 'tracker' %>
<!--[form:tracker]-->
-<p><label for="tracker_name"><%=_('Name')%></label><br/>
+<p><label for="tracker_name"><%=_('Name')%></label> <span class="required">*</span><br/>
<%= text_field 'tracker', 'name' %></p>
<p><%= check_box 'tracker', 'is_in_chlog' %>
diff --git a/redmine/app/views/users/_form.rhtml b/redmine/app/views/users/_form.rhtml
index 6574cb026..84cc6f171 100644
--- a/redmine/app/views/users/_form.rhtml
+++ b/redmine/app/views/users/_form.rhtml
@@ -1,31 +1,37 @@
<%= error_messages_for 'user' %>
+<div class="box">
<!--[form:user]-->
-<p><label for="user_login"><%=_('Login')%></label><br/>
+<p><label for="user_login"><%=_('Login')%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'login', :size => 25 %></p>
-<p><label for="password"><%=_('Password')%></label><br/>
+<p><label for="password"><%=_('Password')%></label> <span class="required">*</span><br/>
<%= password_field_tag 'password', nil, :size => 25 %></p>
-<p><label for="password_confirmation"><%=_('Confirmation')%></label><br/>
+<p><label for="password_confirmation"><%=_('Confirmation')%></label> <span class="required">*</span><br/>
<%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
-<p><label for="user_firstname"><%=_('Firstname')%></label><br/>
+<p><label for="user_firstname"><%=_('Firstname')%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'firstname' %></p>
-<p><label for="user_lastname"><%=_('Lastname')%></label><br/>
+<p><label for="user_lastname"><%=_('Lastname')%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'lastname' %></p>
-<p><label for="user_mail"><%=_('Mail')%></label><br/>
+<p><label for="user_mail"><%=_('Mail')%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'mail' %></p>
<p><label for="user_language"><%=_('Language')%></label><br/>
-<%= select("user", "language", Localization.langs) %></p>
+<%= select("user", "language", Localization.langs.invert) %></p>
+
+<% for custom_value in @custom_values %>
+ <p><%= custom_field_tag_with_label custom_value %></p>
+<% end %>
+
+<div style="clear: both;"></div>
<p><%= check_box 'user', 'admin' %> <label for="user_admin"><%=_('Administrator')%></label></p>
<p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=_('Mail notifications')%></label></p>
-<p><%= check_box 'user', 'locked' %> <label for="user_locked"><%=_('Locked')%></label></p>
<!--[eoform:user]-->
-
+</div>
diff --git a/redmine/app/views/users/list.rhtml b/redmine/app/views/users/list.rhtml
index 3e3c21659..7263000aa 100644
--- a/redmine/app/views/users/list.rhtml
+++ b/redmine/app/views/users/list.rhtml
@@ -7,7 +7,7 @@
<%= sort_header_tag('lastname', :caption => _('Lastname')) %>
<th><%=_('Mail')%></th>
<%= sort_header_tag('admin', :caption => _('Admin')) %>
- <%= sort_header_tag('locked', :caption => _('Locked')) %>
+ <%= sort_header_tag('status', :caption => _('Status')) %>
<%= sort_header_tag('created_on', :caption => _('Created on')) %>
<%= sort_header_tag('last_login_on', :caption => _('Last login')) %>
<th></th>
@@ -25,10 +25,10 @@
<td align="center">
<%= start_form_tag :action => 'edit', :id => user %>
<% if user.locked? %>
- <%= hidden_field_tag 'user[locked]', 0 %>
+ <%= hidden_field_tag 'user[status]', User::STATUS_ACTIVE %>
<%= submit_tag _('Unlock'), :class => "button-small" %>
<% else %>
- <%= hidden_field_tag 'user[locked]', 1 %>
+ <%= hidden_field_tag 'user[status]', User::STATUS_LOCKED %>
<%= submit_tag _('Lock'), :class => "button-small" %>
<% end %>
<%= end_form_tag %>
diff --git a/redmine/app/views/versions/_form.rhtml b/redmine/app/views/versions/_form.rhtml
index 71c761e3d..a62d22d84 100644
--- a/redmine/app/views/versions/_form.rhtml
+++ b/redmine/app/views/versions/_form.rhtml
@@ -4,8 +4,8 @@
<p><label for="version_name"><%=_('Version')%></label> <span class="required">*</span><br/>
<%= text_field 'version', 'name', :size => 20 %></p>
-<p><label for="version_descr"><%=_('Description')%></label><br/>
-<%= text_field 'version', 'descr', :size => 60 %></p>
+<p><label for="version_description"><%=_('Description')%></label><br/>
+<%= text_field 'version', 'description', :size => 60 %></p>
<p><label for="version_effective_date"><%=_('Date')%></label><br/>
<%= date_select 'version', 'effective_date' %></p>
diff --git a/redmine/app/views/welcome/index.rhtml b/redmine/app/views/welcome/index.rhtml
index 89a18f105..694de9b7b 100644
--- a/redmine/app/views/welcome/index.rhtml
+++ b/redmine/app/views/welcome/index.rhtml
@@ -1,12 +1,13 @@
<div class="splitcontentleft">
- <h2><%=_('Welcome')%> !</h2>
-
+ <h2><%= $RDM_WELCOME_TITLE || _('Welcome') %> !</h2>
+ <p><%= $RDM_WELCOME_TEXT %></p>
+
<div class="box">
<h3><%=_('Latest news')%></h3>
<% for news in @news %>
<p>
<b><%= news.title %></b> (<%= link_to_user news.author %> <%= format_time(news.created_on) %> - <%= news.project.name %>)<br />
- <%= news.shortdescr %><br />
+ <%= news.summary %><br />
[<%= link_to 'Read...', :controller => 'news', :action => 'show', :id => news %>]
</p>
<hr />
@@ -21,7 +22,7 @@
<% for project in @projects %>
<li>
<%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (added <%= format_time(project.created_on) %>)<br />
- <%= project.descr %>
+ <%= project.description %>
</li>
<% end %>
</ul>
diff --git a/redmine/config/config_custom.rb b/redmine/config/config_custom.rb
new file mode 100644
index 000000000..23970c905
--- /dev/null
+++ b/redmine/config/config_custom.rb
@@ -0,0 +1,57 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# To set your own configuration, rename this file to config_custom.rb
+# and edit parameters below
+# Don't forget to restart the application after any change.
+
+
+# Application host name
+# Used to provide absolute links in mail notifications
+# $RDM_HOST_NAME = "somenet.foo"
+
+# File storage path
+# Directory used to store uploaded files
+# #{RAILS_ROOT} represents application's home directory
+# $RDM_STORAGE_PATH = "#{RAILS_ROOT}/files"
+
+# Set $RDM_LOGIN_REQUIRED to true if you want to force users to login
+# to access any page of the application
+# $RDM_LOGIN_REQUIRED = false
+
+# Uncomment to disable user self-registration
+# $RDM_SELF_REGISTRATION = false
+
+# Default langage ('en', 'es', 'fr' are available)
+# $RDM_DEFAULT_LANG = 'en'
+
+# Page title
+# $RDM_HEADER_TITLE = "Title"
+
+# Page sub-title
+# $RDM_HEADER_SUBTITLE = "Sub title"
+
+# Welcome page title
+# $RDM_WELCOME_TITLE = "Welcome"
+
+# Welcome page text
+# $RDM_WELCOME_TEXT = ""
+
+# Signature displayed in footer
+# Email adresses will be automatically displayed as a mailto link
+# $RDM_FOOTER_SIG = "admin@somenet.foo"
diff --git a/redmine/config/environment.rb b/redmine/config/environment.rb
index acba82e7b..23b8a99be 100644
--- a/redmine/config/environment.rb
+++ b/redmine/config/environment.rb
@@ -68,18 +68,67 @@ end
# inflect.uncountable %w( fish sheep )
# end
-# Include your application configuration below
-
-# application name
-RDM_APP_NAME = "redMine"
-# application version
-RDM_APP_VERSION = "0.2.0"
+if File.exist? File.join(File.dirname(__FILE__), 'config_custom.rb')
+ begin
+ print "=> Loading config_custom.rb... "
+ require File.join(File.dirname(__FILE__), 'config_custom')
+ puts "done."
+ rescue Exception => detail
+ puts
+ puts detail
+ puts detail.backtrace.join("\n")
+ puts "=> Error in config_custom.rb. Check your configuration."
+ exit
+ end
+end
+
+# IMPORTANT !!! DO NOT MODIFY PARAMETERS HERE
+# Instead, rename config_custom.example.rb to config_custom.rb
+# and set your own configuration in that file
+# Parameters defined in config_custom.rb override those defined below
+
# application host name
-RDM_HOST_NAME = "somenet.foo"
+$RDM_HOST_NAME ||= "localhost:3000"
# file storage path
-RDM_STORAGE_PATH = "#{RAILS_ROOT}/files"
+$RDM_STORAGE_PATH ||= "#{RAILS_ROOT}/files"
# if RDM_LOGIN_REQUIRED is set to true, login is required to access the application
-RDM_LOGIN_REQUIRED = false
+$RDM_LOGIN_REQUIRED ||= false
# default langage
-RDM_DEFAULT_LANG = 'en'
-
+$RDM_DEFAULT_LANG ||= 'en'
+
+# page title
+$RDM_HEADER_TITLE ||= "redMine"
+# page sub-title
+$RDM_HEADER_SUBTITLE ||= "Project management"
+# footer signature
+$RDM_FOOTER_SIG = "admin@somenet.foo"
+
+# application name
+RDM_APP_NAME = "redMine"
+# application version
+RDM_APP_VERSION = "0.3.0"
+
+ActiveRecord::Errors.default_error_messages = {
+ :inclusion => "activerecord_error_inclusion",
+ :exclusion => "activerecord_error_exclusion",
+ :invalid => "activerecord_error_invalid",
+ :confirmation => "activerecord_error_confirmation",
+ :accepted => "activerecord_error_accepted",
+ :empty => "activerecord_error_empty",
+ :blank => "activerecord_error_blank",
+ :too_long => "activerecord_error_too_long",
+ :too_short => "activerecord_error_too_short",
+ :wrong_length => "activerecord_error_wrong_length",
+ :taken => "activerecord_error_taken",
+ :not_a_number => "activerecord_error_not_a_number"
+}
+
+ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "<span class=\"fieldWithErrors\">#{html_tag}</span>" }
+
+GLoc.set_config :default_language => $RDM_DEFAULT_LANG
+GLoc.clear_strings
+GLoc.set_kcode
+GLoc.load_localized_strings
+GLoc.set_config(:raise_string_not_found_errors => false)
+
+
diff --git a/redmine/config/environments/test.rb b/redmine/config/environments/test.rb
index 0b34ef19a..9ba9ae0f8 100644
--- a/redmine/config/environments/test.rb
+++ b/redmine/config/environments/test.rb
@@ -13,3 +13,4 @@ config.whiny_nils = true
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
+config.action_mailer.delivery_method = :test
diff --git a/redmine/doc/CHANGELOG b/redmine/doc/CHANGELOG
index 31e0212f9..99f71ba57 100644
--- a/redmine/doc/CHANGELOG
+++ b/redmine/doc/CHANGELOG
@@ -5,6 +5,34 @@ Copyright (C) 2006 Jean-Philippe Lang
http://redmine.org/
+== xx/xx/2006 v0.3.0
+
+* user authentication against multiple LDAP
+* token based "lost password" functionality
+* user self-registration functionality (optional)
+* custom fields now available for issues, users and projects
+* new custom field format "text" (textarea)
+* project & administration drop down menus in navigation bar
+* error messages internationalization
+* Localization plugin replaced with GLoc 1.1.0
+* new filter in issues list: "Fixed version"
+* colored background for active filters on issues list
+* custom configuration is now defined in config/config_custom.rb
+* user object no more stored in session (only user_id)
+* news summary field is no longer required
+* Fixed: boolean custom field not working
+* Fixed: error messages for custom fields are not displayed
+* Fixed: custom fields values are not validated on issue update
+* Fixed: user unable to choose an empty value for 'List' custom fields
+* Fixed: no issue categories sorting
+* Fixed: incorrect versions sorting
+
+
+== 07/12/2006 - v0.2.2
+
+* Fixed: bug in "issues list"
+
+
== 07/09/2006 - v0.2.1
* new databases supported: Oracle, PostgreSQL, SQL Server
diff --git a/redmine/doc/INSTALL b/redmine/doc/INSTALL
index e263a66ed..53648a73c 100644
--- a/redmine/doc/INSTALL
+++ b/redmine/doc/INSTALL
@@ -49,21 +49,11 @@ Supported databases:
== Configuration
-You can setup a few things in config/environment.rb:
+A sample configuration file is provided: "config/config_custom.example.rb"
+Rename it to config_custom.rb and edit parameters.
Don't forget to restart the application after any change.
config.action_mailer.server_settings: SMTP server configuration
config.action_mailer.perform_deliveries: set to false to disable mail delivering
-RDM_HOST_NAME: hostname used to provide urls in notification mails
-
-RDM_STORAGE_PATH: path for all attachments storage (default: "#{RAILS_ROOT}/files")
- "#{RAILS_ROOT}/" represents application main directory
-
-RDM_LOGIN_REQUIRED: set to true if you want to force users to login to access
- any part of the application (default: false)
-
-RDM_DEFAULT_LANG: default language for anonymous users: 'en' (default), 'es', 'fr' available
-
-
diff --git a/redmine/lang/en.yml b/redmine/lang/en.yml
new file mode 100644
index 000000000..04d671fd6
--- /dev/null
+++ b/redmine/lang/en.yml
@@ -0,0 +1,113 @@
+_gloc_rule_default: '|n| n==1 ? "" : "_plural" '
+
+actionview_datehelper_select_day_prefix:
+actionview_datehelper_select_month_names: January,February,March,April,May,June,July,August,September,October,November,December
+actionview_datehelper_select_month_names_abbr: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
+actionview_datehelper_select_month_prefix:
+actionview_datehelper_select_year_prefix:
+actionview_datehelper_time_in_words_day: 1 day
+actionview_datehelper_time_in_words_day_plural: %d days
+actionview_datehelper_time_in_words_hour_about: about an hour
+actionview_datehelper_time_in_words_hour_about_plural: about %d hours
+actionview_datehelper_time_in_words_hour_about_single: about an hour
+actionview_datehelper_time_in_words_minute: 1 minute
+actionview_datehelper_time_in_words_minute_half: half a minute
+actionview_datehelper_time_in_words_minute_less_than: less than a minute
+actionview_datehelper_time_in_words_minute_plural: %d minutes
+actionview_datehelper_time_in_words_minute_single: 1 minute
+actionview_datehelper_time_in_words_second_less_than: less than a second
+actionview_datehelper_time_in_words_second_less_than_plural: less than %d seconds
+actionview_instancetag_blank_option: Please select
+
+activerecord_error_inclusion: is not included in the list
+activerecord_error_exclusion: is reserved
+activerecord_error_invalid: is invalid
+activerecord_error_confirmation: doesn't match confirmation
+activerecord_error_accepted: must be accepted
+activerecord_error_empty: can't be empty
+activerecord_error_blank: can't be blank
+activerecord_error_too_long: is too long
+activerecord_error_too_short: is too short
+activerecord_error_wrong_length: is the wrong length
+activerecord_error_taken: has already been taken
+activerecord_error_not_a_number: is not a number
+
+general_fmt_age: %d yr
+general_fmt_age_plural: %d yrs
+general_fmt_date: %%b %%d, %%Y (%%a)
+general_fmt_datetime: %%b %%d, %%Y (%%a), %%I:%%M %%p
+general_fmt_datetime_short: %%b %%d, %%I:%%M %%p
+general_fmt_time: %%I:%%M %%p
+general_text_No: 'No'
+general_text_Yes: 'Yes'
+general_text_no: 'no'
+general_text_yes: 'yes'
+
+notice_account_updated: Account was successfully updated.
+notice_account_invalid_creditentials: Invalid user or password
+notice_account_password_updated: Password was successfully updated.
+notice_account_wrong_password: Wrong password
+notice_account_register_done: Account was successfully created.
+notice_account_unknown_email: Unknown user.
+notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you.
+
+gui_menu_home: Home
+gui_menu_my_page: My page
+gui_menu_projects: Projects
+gui_menu_my_account: My account
+gui_menu_admin: Administration
+gui_menu_login: Login
+gui_menu_logout: Logout
+gui_menu_help: Help
+gui_validation_error: 1 error
+gui_validation_error_plural: %d errors
+
+field_name: Name
+field_description: Description
+field_summary: Summary
+field_is_required: Required
+field_firstname: Firstname
+field_lastname: Lastname
+field_mail: Email
+field_filename: File
+field_filesize: Size
+field_downloads: Downloads
+field_author: Author
+field_created_on: Created
+field_updated_on: Updated
+field_field_format: Format
+field_is_for_all: For all projects
+field_possible_values: Possible values
+field_regexp: Regular expression
+field_min_length: Minimum length
+field_max_length: Maximum length
+field_value: Value
+field_category: Catogory
+field_title: Title
+field_project: Project
+field_issue: Issue
+field_status: Status
+field_notes: Notes
+field_is_closed: Issue closed
+field_is_default: Default status
+field_html_color: Color
+field_tracker: Tracker
+field_subject: Subject
+field_assigned_to: Assigned to
+field_priority: Priority
+field_fixed_version: Fixed version
+field_user: User
+field_role: Role
+field_homepage: Homepage
+field_is_public: Public
+field_parent: Subproject de
+field_is_in_chlog: Issues displayed in changelog
+field_login: Login
+field_mail_notification: Mail notifications
+field_admin: Administrator
+field_locked: Locked
+field_last_login_on: Last connection
+field_language: Language
+field_effective_date: Date
+field_password: Password
+field_password_confirmation: Confirmation \ No newline at end of file
diff --git a/redmine/lang/en_US.rb b/redmine/lang/en_US.rb
index aa402421e..7f5d6d163 100644
--- a/redmine/lang/en_US.rb
+++ b/redmine/lang/en_US.rb
@@ -1,4 +1,6 @@
Localization.define('en', 'English') do |l|
l.store '(date)', lambda { |t| t.strftime('%m/%d/%Y') }
l.store '(time)', lambda { |t| t.strftime('%m/%d/%Y %I:%M%p') }
+
+ l.store '%d errors', ['1 error', '%d errors']
end \ No newline at end of file
diff --git a/redmine/lang/fr.yml b/redmine/lang/fr.yml
new file mode 100644
index 000000000..560b11bbf
--- /dev/null
+++ b/redmine/lang/fr.yml
@@ -0,0 +1,199 @@
+_gloc_rule_default: '|n| n==1 ? "" : "_plural" '
+
+actionview_datehelper_select_day_prefix:
+actionview_datehelper_select_month_names: Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre
+actionview_datehelper_select_month_names_abbr: Jan,Fév,Mars,Avril,Mai,Juin,Juil,Août,Sept,Oct,Nov,Déc
+actionview_datehelper_select_month_prefix:
+actionview_datehelper_select_year_prefix:
+actionview_datehelper_time_in_words_day: 1 jour
+actionview_datehelper_time_in_words_day_plural: %d jours
+actionview_datehelper_time_in_words_hour_about: about an hour
+actionview_datehelper_time_in_words_hour_about_plural: about %d hours
+actionview_datehelper_time_in_words_hour_about_single: about an hour
+actionview_datehelper_time_in_words_minute: 1 minute
+actionview_datehelper_time_in_words_minute_half: 30 secondes
+actionview_datehelper_time_in_words_minute_less_than: moins d'une minute
+actionview_datehelper_time_in_words_minute_plural: %d minutes
+actionview_datehelper_time_in_words_minute_single: 1 minute
+actionview_datehelper_time_in_words_second_less_than: moins d'une seconde
+actionview_datehelper_time_in_words_second_less_than_plural: moins de %d secondes
+actionview_instancetag_blank_option: Choisir
+
+activerecord_error_inclusion: n'est pas inclus dans la liste
+activerecord_error_exclusion: est reservé
+activerecord_error_invalid: est invalide
+activerecord_error_confirmation: ne correspond pas à la confirmation
+activerecord_error_accepted: doit être accepté
+activerecord_error_empty: doit être renseigné
+activerecord_error_blank: doit être renseigné
+activerecord_error_too_long: est trop long
+activerecord_error_too_short: est trop court
+activerecord_error_wrong_length: n'est pas de la bonne longueur
+activerecord_error_taken: est déjà utilisé
+activerecord_error_not_a_number: n'est pas un nombre
+
+general_fmt_age: %d an
+general_fmt_age_plural: %d ans
+general_fmt_date: %%d/%%m/%%Y
+general_fmt_datetime: %%d/%%m/%%Y %%H:%%M
+general_fmt_datetime_short: %%d/%%m %%H:%%M
+general_fmt_time: %%H:%%M
+general_text_No: 'Non'
+general_text_Yes: 'Oui'
+general_text_no: 'non'
+general_text_yes: 'oui'
+
+notice_account_updated: Le compte a été mis à jour avec succès.
+notice_account_invalid_creditentials: Identifiant ou mot de passe invalide.
+notice_account_password_updated: Mot de passe mis à jour avec succès.
+notice_account_wrong_password: Mot de passe incorrect
+notice_account_register_done: Un message contenant les instructions pour activer votre compte vous a été envoyé.
+notice_account_unknown_email: Aucun compte ne correspond à cette adresse.
+notice_account_lost_email_sent: Un message contenant les instructions pour choisir un nouveau mot de passe vous a été envoyé.
+notice_account_activated: Votre compte a été activé. Vous pouvez à présent vous connecter.
+notice_successful_update: Mise à jour effectuée avec succès.
+notice_successful_create: Création effectuée avec succès.
+notice_successful_delete: Suppression effectuée avec succès.
+notice_successful_connection: Connection réussie.
+
+gui_validation_error: 1 erreur
+gui_validation_error_plural: %d erreurs
+
+field_name: Nom
+field_description: Description
+field_summary: Résumé
+field_is_required: Obligatoire
+field_firstname: Prénom
+field_lastname: Nom
+field_mail: Email
+field_filename: Fichier
+field_filesize: Taille
+field_downloads: Téléchargements
+field_author: Auteur
+field_created_on: Créé
+field_updated_on: Mis à jour
+field_field_format: Format
+field_is_for_all: Pour tous les projets
+field_possible_values: Valeurs possibles
+field_regexp: Expression régulière
+field_min_length: Longueur minimum
+field_max_length: Longueur maximum
+field_value: Valeur
+field_category: Catégorie
+field_title: Titre
+field_project: Projet
+field_issue: Demande
+field_status: Statut
+field_notes: Notes
+field_is_closed: Demande fermée
+field_is_default: Statut par défaut
+field_html_color: Couleur
+field_tracker: Tracker
+field_subject: Sujet
+field_assigned_to: Assigné à
+field_priority: Priorité
+field_fixed_version: Version corrigée
+field_user: Utilisateur
+field_role: Rôle
+field_homepage: Site web
+field_is_public: Public
+field_parent: Sous-projet de
+field_is_in_chlog: Demandes affichées dans l'historique
+field_login: Identifiant
+field_mail_notification: Notifications par mail
+field_admin: Administrateur
+field_locked: Verrouillé
+field_last_login_on: Dernière connexion
+field_language: Langue
+field_effective_date: Date
+field_password: Mot de passe
+field_new_password: Nouveau mot de passe
+field_password_confirmation: Confirmation
+field_version: Version
+field_type: Type
+field_host: Hôte
+field_port: Port
+field_account: Compte
+field_base_dn: Base DN
+field_attr_login: Attribut Identifiant
+field_attr_firstname: Attribut Prénom
+field_attr_lastname: Attribut Nom
+field_attr_mail: Attribut Email
+field_onthefly: Création des utilisateurs à la volée
+
+label_user: Utilisateur
+label_user_plural: Utilisateurs
+label_user_new: Nouvel utilisateur
+label_project: Projet
+label_project_new: Nouveau projet
+label_project_plural: Projets
+label_issue: Demande
+label_issue_new: Nouvelle demande
+label_issue_plural: Demandes
+label_role: Rôle
+label_role_plural: Rôles
+label_role_add: Nouveau rôle
+label_role_and_permissions: Rôles et permissions
+label_tracker: Tracker
+label_tracker_plural: Trackers
+label_tracker_add: Nouveau tracker
+label_workflow: Workflow
+label_issue_status: Statut de demandes
+label_issue_status_plural: Statuts de demandes
+label_issue_status_add: Nouveau statut
+label_custom_field: Champ personnalisé
+label_custom_field_plural: Champs personnalisés
+label_custom_field_new: Nouveau champ personnalisé
+label_enumerations: Listes de valeurs
+label_information: Information
+label_information_plural: Informations
+label_please_login: Identification
+label_register: S'enregistrer
+label_password_lost: Mot de passe perdu
+label_home: Accueil
+label_my_page: Ma page
+label_my_account: Mon compte
+label_administration: Administration
+label_login: Connexion
+label_logout: Déconnexion
+label_help: Aide
+label_reported_issues: Demandes soumises
+label_assigned_to_me_issues: Demandes qui me sont assignées
+label_last_login: Dernière connexion
+label_last_updates: Dernière mise à jour
+label_last_updates_plural: %d dernières mises à jour
+label_registered_on: Inscrit le
+label_activity: Activité
+label_new: Nouveau
+label_logged_as: Connecté en tant que
+label_environment: Environnement
+label_authentication: Authentification
+label_auth_source: Mode d'authentification
+label_auth_source_new: Nouveau mode d'authentification
+label_auth_source_plural: Modes d'authentification
+label_subproject: Sous-projet
+label_subproject_plural: Sous-projets
+label_min_max_length: Longueurs mini - maxi
+label_list: Liste
+label_date: Date
+label_integer: Entier
+label_boolean: Booléen
+label_string: Chaîne
+label_text: Texte
+label_attribute: Attribut
+label_attribute_plural: Attributs
+
+
+button_login: Connexion
+button_submit: Soumettre
+button_save: Valider
+button_check_all: Tout cocher
+button_uncheck_all: Tout décocher
+button_delete: Supprimer
+button_create: Créer
+button_test: Tester
+
+text_select_mail_notifications: Sélectionner les actions pour lesquelles la notification par mail doit être activée.
+text_regexp_info: eg. ^[A-Z0-9]+$
+text_min_max_length_info: 0 pour aucune restriction
+text_possible_values_info: valeurs séparées par | \ No newline at end of file
diff --git a/redmine/lang/fr_FR.rb b/redmine/lang/fr_FR.rb
index 0a7ce01ab..68f214b69 100644
--- a/redmine/lang/fr_FR.rb
+++ b/redmine/lang/fr_FR.rb
@@ -27,12 +27,36 @@ Localization.define('fr', 'Français') do |l|
l.store 'Document categories', 'Catégories de documents'
l.store 'Uncategorized', 'Sans catégorie'
l.store 'User documentation', 'Documentation utilisateur'
- l.store 'Technical documentation', 'Documentation technique'
+ l.store 'Technical documentation', 'Documentation technique'
+ # custom fields formats
+ l.store 'String', 'Chaîne'
+ l.store 'Integer', 'Entier'
+ l.store 'Date', 'Date'
+ l.store 'Boolean', 'Booléen'
+ l.store 'List', 'Liste'
# dates
l.store '(date)', lambda { |t| t.strftime('%d/%m/%Y') }
l.store '(time)', lambda { |t| t.strftime('%d/%m/%Y %H:%M') }
- # ./script/../config/../app/views/account/login.rhtml
+
+ # error messages
+ l.store '%d errors', ['1 erreur', '%d erreurs']
+
+ l.store "is not included in the list", "n'est pas inclus dans la liste"
+ l.store "is reserved", "est réservé"
+ l.store "is invalid", "n'est pas valide"
+ l.store "doesn't match confirmation", "ne correspond pas à la confirmation"
+ l.store "must be accepted", "doit être accepté"
+ l.store "can't be empty", "ne doit pas être vide"
+ l.store "can't be blank", "doit être renseigné"
+ l.store "is too long", "est trop long"
+ l.store "is too short", "est trop court"
+ l.store "is the wrong length", "n'est pas de la bonne longueur"
+ l.store "has already been taken", "est déjà utilisé"
+ l.store "is not a number", "doit être un nombre"
+
+ # notice messages
+ l.store 'Invalid user/password', 'Identifiant/Mot de passe invalide'
# ./script/../config/../app/views/account/my_account.rhtml
l.store 'My account', 'Mon compte'
@@ -59,6 +83,9 @@ Localization.define('fr', 'Français') do |l|
# ./script/../config/../app/views/account/login.rhtml
l.store 'Please login', 'Identification'
+ l.store 'Register', "S'enregistrer"
+ l.store 'Password lost', 'Mot de passe perdu'
+ l.store 'Submit', 'Soumettre'
# ./script/../config/../app/views/account/show.rhtml
l.store 'Registered on', 'Inscrit le'
@@ -97,6 +124,7 @@ Localization.define('fr', 'Français') do |l|
# ./script/../config/../app/views/custom_fields/list.rhtml
l.store 'Name', 'Nom'
+ l.store 'For', 'Pour'
l.store 'Type', 'Type'
l.store 'Required', 'Obligatoire'
l.store 'For all projects', 'Pour tous les projets'
diff --git a/redmine/lib/tasks/extract_fixtures.rake b/redmine/lib/tasks/extract_fixtures.rake
new file mode 100644
index 000000000..49834e5ab
--- /dev/null
+++ b/redmine/lib/tasks/extract_fixtures.rake
@@ -0,0 +1,24 @@
+desc 'Create YAML test fixtures from data in an existing database.
+Defaults to development database. Set RAILS_ENV to override.'
+
+task :extract_fixtures => :environment do
+ sql = "SELECT * FROM %s"
+ skip_tables = ["schema_info"]
+ ActiveRecord::Base.establish_connection
+ (ActiveRecord::Base.connection.tables - skip_tables).each do |table_name|
+ i = "000"
+ File.open("#{RAILS_ROOT}/#{table_name}.yml", 'w' ) do |file|
+ data = ActiveRecord::Base.connection.select_all(sql % table_name)
+ file.write data.inject({}) { |hash, record|
+
+ # cast extracted values
+ ActiveRecord::Base.connection.columns(table_name).each { |col|
+ record[col.name] = col.type_cast(record[col.name]) if record[col.name]
+ }
+
+ hash["#{table_name}_#{i.succ!}"] = record
+ hash
+ }.to_yaml
+ end
+ end
+end \ No newline at end of file
diff --git a/redmine/public/images/Copie de help.png b/redmine/public/images/Copie de help.png
deleted file mode 100644
index 6dc4f684a..000000000
--- a/redmine/public/images/Copie de help.png
+++ /dev/null
Binary files differ
diff --git a/redmine/public/images/alert.png b/redmine/public/images/alert.png
new file mode 100644
index 000000000..ba107e83b
--- /dev/null
+++ b/redmine/public/images/alert.png
Binary files differ
diff --git a/redmine/public/images/login.png b/redmine/public/images/login.png
new file mode 100644
index 000000000..7e0c62d9c
--- /dev/null
+++ b/redmine/public/images/login.png
Binary files differ
diff --git a/redmine/public/images/logout.png b/redmine/public/images/logout.png
deleted file mode 100644
index edf94abcd..000000000
--- a/redmine/public/images/logout.png
+++ /dev/null
Binary files differ
diff --git a/redmine/public/javascripts/menu.js b/redmine/public/javascripts/menu.js
new file mode 100644
index 000000000..bf5612dd5
--- /dev/null
+++ b/redmine/public/javascripts/menu.js
@@ -0,0 +1,556 @@
+//*****************************************************************************
+// Do not remove this notice.
+//
+// Copyright 2000-2004 by Mike Hall.
+// See http://www.brainjar.com for terms of use.
+//*****************************************************************************
+
+//----------------------------------------------------------------------------
+// Emulation de la fonction push pour IE5.0
+//----------------------------------------------------------------------------
+if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0;i<arguments.length;i++)this[this.length]=arguments[i];};};
+
+//----------------------------------------------------------------------------
+// Code to determine the browser and version.
+//----------------------------------------------------------------------------
+
+function Browser() {
+
+ var ua, s, i;
+
+ this.isIE = false; // Internet Explorer
+ this.isOP = false; // Opera
+ this.isNS = false; // Netscape
+ this.version = null;
+ //-- debut ajout ci ----
+ this.isIE5mac = false; // Internet Explorer 5 mac
+ //-- fin ajout ci ----
+
+ ua = navigator.userAgent;
+
+ //-- debut ajout ci ----
+ if (ua.indexOf("Opera")==-1 && ua.indexOf("MSIE 5")>-1 && ua.indexOf("Mac")>-1) {
+ this.isIE5mac = true;
+ this.version = "";
+ return;
+ }
+ //-- fin ajout ci ----
+
+ s = "Opera";
+ if ((i = ua.indexOf(s)) >= 0) {
+ this.isOP = true;
+ this.version = parseFloat(ua.substr(i + s.length));
+ return;
+ }
+
+ s = "Netscape6/";
+ if ((i = ua.indexOf(s)) >= 0) {
+ this.isNS = true;
+ this.version = parseFloat(ua.substr(i + s.length));
+ return;
+ }
+
+ // Treat any other "Gecko" browser as Netscape 6.1.
+
+ s = "Gecko";
+ if ((i = ua.indexOf(s)) >= 0) {
+ this.isNS = true;
+ this.version = 6.1;
+ return;
+ }
+
+ s = "MSIE";
+ if ((i = ua.indexOf(s))) {
+ this.isIE = true;
+ this.version = parseFloat(ua.substr(i + s.length));
+ return;
+ }
+}
+
+var browser = new Browser();
+
+//----------------------------------------------------------------------------
+// Code for handling the menu bar and active button.
+//----------------------------------------------------------------------------
+
+var activeButton = null;
+
+
+function buttonClick(event, menuId) {
+
+ var button;
+
+ // Get the target button element.
+
+ if (browser.isIE)
+ button = window.event.srcElement;
+ else
+ button = event.currentTarget;
+
+ // Blur focus from the link to remove that annoying outline.
+
+ button.blur();
+
+ // Associate the named menu to this button if not already done.
+ // Additionally, initialize menu display.
+
+ if (button.menu == null) {
+ button.menu = document.getElementById(menuId);
+ if (button.menu.isInitialized == null)
+ menuInit(button.menu);
+ }
+
+ // Set mouseout event handler for the button, if not already done.
+
+ if (button.onmouseout == null)
+ button.onmouseout = buttonOrMenuMouseout;
+
+ // Exit if this button is the currently active one.
+
+ if (button == activeButton)
+ return false;
+
+ // Reset the currently active button, if any.
+
+ if (activeButton != null)
+ resetButton(activeButton);
+
+ // Activate this button, unless it was the currently active one.
+
+ if (button != activeButton) {
+ depressButton(button);
+ activeButton = button;
+ }
+ else
+ activeButton = null;
+
+ return false;
+}
+
+function buttonMouseover(event, menuId) {
+
+ var button;
+//-- debut ajout ci ----
+ if (!browser.isIE5mac) {
+ //-- fin ajout ci ----
+
+//-- debut ajout ci ----
+ cicacheselect();
+//-- fin ajout ci ----
+
+ // Activates this button's menu if no other is currently active.
+
+ if (activeButton == null) {
+ buttonClick(event, menuId);
+ return;
+ }
+
+ // Find the target button element.
+
+ if (browser.isIE)
+ button = window.event.srcElement;
+ else
+ button = event.currentTarget;
+
+ // If any other button menu is active, make this one active instead.
+
+ if (activeButton != null && activeButton != button)
+ buttonClick(event, menuId);
+ //-- debut ajout ci ----
+ }
+ //-- fin ajout ci ----
+
+}
+
+function depressButton(button) {
+
+ var x, y;
+
+ // Update the button's style class to make it look like it's
+ // depressed.
+
+ button.className += " menuButtonActive";
+
+ // Set mouseout event handler for the button, if not already done.
+
+ if (button.onmouseout == null)
+ button.onmouseout = buttonOrMenuMouseout;
+ if (button.menu.onmouseout == null)
+ button.menu.onmouseout = buttonOrMenuMouseout;
+
+ // Position the associated drop down menu under the button and
+ // show it.
+
+ x = getPageOffsetLeft(button);
+ y = getPageOffsetTop(button) + button.offsetHeight - 1;
+
+ // For IE, adjust position.
+
+ if (browser.isIE) {
+ x += button.offsetParent.clientLeft;
+ y += button.offsetParent.clientTop;
+ }
+
+ button.menu.style.left = x + "px";
+ button.menu.style.top = y + "px";0
+ button.menu.style.visibility = "visible";
+}
+
+function resetButton(button) {
+
+ // Restore the button's style class.
+
+ removeClassName(button, "menuButtonActive");
+
+ // Hide the button's menu, first closing any sub menus.
+
+ if (button.menu != null) {
+ closeSubMenu(button.menu);
+ button.menu.style.visibility = "hidden";
+ }
+}
+
+//----------------------------------------------------------------------------
+// Code to handle the menus and sub menus.
+//----------------------------------------------------------------------------
+
+function menuMouseover(event) {
+
+ var menu;
+ //-- debut ajout ci ----
+ if (!browser.isIE5mac) {
+ //-- fin ajout ci ----
+//-- debut ajout ci ----
+ cicacheselect();
+//-- fin ajout ci ----
+
+ // Find the target menu element.
+ if (browser.isIE)
+ menu = getContainerWith(window.event.srcElement, "DIV", "menu");
+ else
+ menu = event.currentTarget;
+
+ // Close any active sub menu.
+
+ if (menu.activeItem != null)
+ closeSubMenu(menu);
+ //-- debut ajout ci ----
+ }
+ //-- fin ajout ci ----
+}
+
+function menuItemMouseover(event, menuId) {
+
+ var item, menu, x, y;
+//-- debut ajout ci ----
+ cicacheselect();
+//-- fin ajout ci ----
+
+ // Find the target item element and its parent menu element.
+
+ if (browser.isIE)
+ item = getContainerWith(window.event.srcElement, "A", "menuItem");
+ else
+ item = event.currentTarget;
+ menu = getContainerWith(item, "DIV", "menu");
+
+ // Close any active sub menu and mark this one as active.
+
+ if (menu.activeItem != null)
+ closeSubMenu(menu);
+ menu.activeItem = item;
+
+ // Highlight the item element.
+
+ item.className += " menuItemHighlight";
+
+ // Initialize the sub menu, if not already done.
+
+ if (item.subMenu == null) {
+ item.subMenu = document.getElementById(menuId);
+ if (item.subMenu.isInitialized == null)
+ menuInit(item.subMenu);
+ }
+
+ // Set mouseout event handler for the sub menu, if not already done.
+
+ if (item.subMenu.onmouseout == null)
+ item.subMenu.onmouseout = buttonOrMenuMouseout;
+
+ // Get position for submenu based on the menu item.
+
+ x = getPageOffsetLeft(item) + item.offsetWidth;
+ y = getPageOffsetTop(item);
+
+ // Adjust position to fit in view.
+
+ var maxX, maxY;
+
+ if (browser.isIE) {
+ maxX = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) +
+ (document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.body.clientWidth);
+ maxY = Math.max(document.documentElement.scrollTop, document.body.scrollTop) +
+ (document.documentElement.clientHeight != 0 ? document.documentElement.clientHeight : document.body.clientHeight);
+ }
+ if (browser.isOP) {
+ maxX = document.documentElement.scrollLeft + window.innerWidth;
+ maxY = document.documentElement.scrollTop + window.innerHeight;
+ }
+ if (browser.isNS) {
+ maxX = window.scrollX + window.innerWidth;
+ maxY = window.scrollY + window.innerHeight;
+ }
+ maxX -= item.subMenu.offsetWidth;
+ maxY -= item.subMenu.offsetHeight;
+
+ if (x > maxX)
+ x = Math.max(0, x - item.offsetWidth - item.subMenu.offsetWidth
+ + (menu.offsetWidth - item.offsetWidth));
+ y = Math.max(0, Math.min(y, maxY));
+
+ // Position and show the sub menu.
+
+ item.subMenu.style.left = x + "px";
+ item.subMenu.style.top = y + "px";
+ item.subMenu.style.visibility = "visible";
+
+ // Stop the event from bubbling.
+
+ if (browser.isIE)
+ window.event.cancelBubble = true;
+ else
+ event.stopPropagation();
+}
+
+function closeSubMenu(menu) {
+
+ if (menu == null || menu.activeItem == null)
+ return;
+
+ // Recursively close any sub menus.
+
+ if (menu.activeItem.subMenu != null) {
+ closeSubMenu(menu.activeItem.subMenu);
+ menu.activeItem.subMenu.style.visibility = "hidden";
+ menu.activeItem.subMenu = null;
+ }
+ removeClassName(menu.activeItem, "menuItemHighlight");
+ menu.activeItem = null;
+}
+
+
+function buttonOrMenuMouseout(event) {
+
+ var el;
+
+ // If there is no active button, exit.
+
+ if (activeButton == null)
+ return;
+
+ // Find the element the mouse is moving to.
+
+ if (browser.isIE)
+ el = window.event.toElement;
+ else if (event.relatedTarget != null)
+ el = (event.relatedTarget.tagName ? event.relatedTarget : event.relatedTarget.parentNode);
+
+ // If the element is not part of a menu, reset the active button.
+
+ if (getContainerWith(el, "DIV", "menu") == null) {
+ resetButton(activeButton);
+ activeButton = null;
+//-- debut ajout ci ----
+ cimontreselect();
+//-- fin ajout ci ----
+ }
+}
+
+
+//----------------------------------------------------------------------------
+// Code to initialize menus.
+//----------------------------------------------------------------------------
+
+function menuInit(menu) {
+
+ var itemList, spanList;
+ var textEl, arrowEl;
+ var itemWidth;
+ var w, dw;
+ var i, j;
+
+ // For IE, replace arrow characters.
+
+ if (browser.isIE) {
+ menu.style.lineHeight = "2.5ex";
+ spanList = menu.getElementsByTagName("SPAN");
+ for (i = 0; i < spanList.length; i++)
+ if (hasClassName(spanList[i], "menuItemArrow")) {
+ spanList[i].style.fontFamily = "Webdings";
+ spanList[i].firstChild.nodeValue = "4";
+ }
+ }
+
+ // Find the width of a menu item.
+
+ itemList = menu.getElementsByTagName("A");
+ if (itemList.length > 0)
+ itemWidth = itemList[0].offsetWidth;
+ else
+ return;
+
+ // For items with arrows, add padding to item text to make the
+ // arrows flush right.
+
+ for (i = 0; i < itemList.length; i++) {
+ spanList = itemList[i].getElementsByTagName("SPAN");
+ textEl = null;
+ arrowEl = null;
+ for (j = 0; j < spanList.length; j++) {
+ if (hasClassName(spanList[j], "menuItemText"))
+ textEl = spanList[j];
+ if (hasClassName(spanList[j], "menuItemArrow"))
+ arrowEl = spanList[j];
+ }
+ if (textEl != null && arrowEl != null) {
+ textEl.style.paddingRight = (itemWidth
+ - (textEl.offsetWidth + arrowEl.offsetWidth)) + "px";
+ // For Opera, remove the negative right margin to fix a display bug.
+ if (browser.isOP)
+ arrowEl.style.marginRight = "0px";
+ }
+ }
+
+ // Fix IE hover problem by setting an explicit width on first item of
+ // the menu.
+
+ if (browser.isIE) {
+ w = itemList[0].offsetWidth;
+ itemList[0].style.width = w + "px";
+ dw = itemList[0].offsetWidth - w;
+ w -= dw;
+ itemList[0].style.width = w + "px";
+ }
+
+ // Mark menu as initialized.
+
+ menu.isInitialized = true;
+}
+
+//----------------------------------------------------------------------------
+// General utility functions.
+//----------------------------------------------------------------------------
+
+function getContainerWith(node, tagName, className) {
+
+ // Starting with the given node, find the nearest containing element
+ // with the specified tag name and style class.
+
+ while (node != null) {
+ if (node.tagName != null && node.tagName == tagName &&
+ hasClassName(node, className))
+ return node;
+ node = node.parentNode;
+ }
+
+ return node;
+}
+
+function hasClassName(el, name) {
+
+ var i, list;
+
+ // Return true if the given element currently has the given class
+ // name.
+
+ list = el.className.split(" ");
+ for (i = 0; i < list.length; i++)
+ if (list[i] == name)
+ return true;
+
+ return false;
+}
+
+function removeClassName(el, name) {
+
+ var i, curList, newList;
+
+ if (el.className == null)
+ return;
+
+ // Remove the given class name from the element's className property.
+
+ newList = new Array();
+ curList = el.className.split(" ");
+ for (i = 0; i < curList.length; i++)
+ if (curList[i] != name)
+ newList.push(curList[i]);
+ el.className = newList.join(" ");
+}
+
+function getPageOffsetLeft(el) {
+
+ var x;
+
+ // Return the x coordinate of an element relative to the page.
+
+ x = el.offsetLeft;
+ if (el.offsetParent != null)
+ x += getPageOffsetLeft(el.offsetParent);
+
+ return x;
+}
+
+function getPageOffsetTop(el) {
+
+ var y;
+
+ // Return the x coordinate of an element relative to the page.
+
+ y = el.offsetTop;
+ if (el.offsetParent != null)
+ y += getPageOffsetTop(el.offsetParent);
+
+ return y;
+}
+
+//-- debut ajout ci ----
+function cicacheselect(){
+ if (browser.isIE) {
+ oSelects = document.getElementsByTagName('SELECT');
+ if (oSelects.length > 0) {
+ for (i = 0; i < oSelects.length; i++) {
+ oSlt = oSelects[i];
+ if (oSlt.style.visibility != 'hidden') {oSlt.style.visibility = 'hidden';}
+ }
+ }
+ oSelects = document.getElementsByName('masquable');
+ if (oSelects.length > 0) {
+ for (i = 0; i < oSelects.length; i++) {
+ oSlt = oSelects[i];
+ if (oSlt.style.visibility != 'hidden') {oSlt.style.visibility = 'hidden';}
+ }
+ }
+ }
+}
+
+function cimontreselect(){
+ if (browser.isIE) {
+ oSelects = document.getElementsByTagName('SELECT');
+ if (oSelects.length > 0) {
+ for (i = 0; i < oSelects.length; i++) {
+ oSlt = oSelects[i];
+ if (oSlt.style.visibility != 'visible') {oSlt.style.visibility = 'visible';}
+ }
+ }
+ oSelects = document.getElementsByName('masquable');
+ if (oSelects.length > 0) {
+ for (i = 0; i < oSelects.length; i++) {
+ oSlt = oSelects[i];
+ if (oSlt.style.visibility != 'visible') {oSlt.style.visibility = 'visible';}
+ }
+ }
+ }
+}
+
+//-- fin ajout ci ----
diff --git a/redmine/public/stylesheets/application.css b/redmine/public/stylesheets/application.css
index 43f2bac51..39c7d465c 100644
--- a/redmine/public/stylesheets/application.css
+++ b/redmine/public/stylesheets/application.css
@@ -15,6 +15,7 @@ color:#303030;
background:#e8eaec;
}
+
a{
color:#467aa7;
font-weight:bold;
@@ -136,7 +137,6 @@ padding:20px 10px 10px 20px;
/*position: absolute;*/
margin: 0 0 0 140px;
border-left: 1px dashed #c0c0c0;
-
}
#content h2{
@@ -180,6 +180,11 @@ form {
width:100%;
}
+textarea {
+ padding:0;
+ margin:0;
+}
+
input {
vertical-align: top;
}
@@ -191,7 +196,15 @@ input.button-small
select.select-small
{
- font-size: 0.8em;
+ border: 1px solid #7F9DB9;
+ padding: 1px;
+ font-size: 0.8em;
+}
+
+.active-filter
+{
+ background-color: #F9FA9E;
+
}
label {
@@ -201,6 +214,12 @@ label {
fieldset {
border:1px solid #7F9DB9;
+ padding: 6px;
+}
+
+legend {
+ color: #505050;
+
}
.required {
@@ -328,4 +347,8 @@ color:#505050;
line-height:1.5em;
}
+.login {
+width: 50%;
+text-align: left;
+}
diff --git a/redmine/public/stylesheets/menu.css b/redmine/public/stylesheets/menu.css
new file mode 100644
index 000000000..b7084c2e7
--- /dev/null
+++ b/redmine/public/stylesheets/menu.css
@@ -0,0 +1,39 @@
+/*========== Drop down menu ==============*/
+div.menu {
+ background-color: #FFFFFF;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #7F9DB9;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ padding: 0;
+ visibility: hidden;
+ z-index: 101;
+}
+
+div.menu a.menuItem {
+ font-size: 10px;
+ font-weight: normal;
+ line-height: 2em;
+ color: #000000;
+ background-color: #FFFFFF;
+ cursor: default;
+ display: block;
+ padding: 0 1em;
+ margin: 0;
+ border: 0;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+div.menu a.menuItem:hover, div.menu a.menuItemHighlight {
+ background-color: #80b0da;
+ color: #ffffff;
+}
+
+div.menu a.menuItem span.menuItemText {}
+
+div.menu a.menuItem span.menuItemArrow {
+ margin-right: -.75em;
+}
diff --git a/redmine/public/stylesheets/rails.css b/redmine/public/stylesheets/rails.css
index e2954c9a7..3f7b6ca41 100644
--- a/redmine/public/stylesheets/rails.css
+++ b/redmine/public/stylesheets/rails.css
@@ -1,27 +1,27 @@
.fieldWithErrors {
padding: 2px;
+ margin: 0px;
background-color: red;
display: table;
}
#errorExplanation {
width: 400px;
- border: 2px solid red;
+ border: 0;
padding: 7px;
- padding-bottom: 12px;
- margin-bottom: 20px;
- background-color: #f0f0f0;
+ padding-bottom: 3px;
+ margin-bottom: 0px;
+ /*background-color: #f0f0f0;*/
}
#errorExplanation h2 {
text-align: left;
font-weight: bold;
- padding: 5px 5px 5px 15px;
- font-size: 12px;
+ padding: 5px 5px 10px 26px;
+ font-size: 1em;
margin: -7px;
- background-color: #c00;
- color: #fff;
+ background: url(../images/alert.png) no-repeat 6px 6px;
}
#errorExplanation p {
@@ -31,8 +31,9 @@
}
#errorExplanation ul li {
- font-size: 12px;
- list-style: square;
+ font-size: 1em;
+ list-style: none;
+ margin-left: -16px;
}
div.uploadStatus {
diff --git a/redmine/test/fixtures/attachments.yml b/redmine/test/fixtures/attachments.yml
new file mode 100644
index 000000000..6c352e1e3
--- /dev/null
+++ b/redmine/test/fixtures/attachments.yml
@@ -0,0 +1,13 @@
+---
+attachments_001:
+ created_on: 2006-07-19 21:07:27 +02:00
+ downloads: 0
+ content_type: text/plain
+ disk_filename: 060719210727_error281.txt
+ container_id: 3
+ digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
+ id: 1
+ container_type: Issue
+ filesize: 28
+ filename: error281.txt
+ author_id: 2
diff --git a/redmine/test/fixtures/auth_sources.yml b/redmine/test/fixtures/auth_sources.yml
new file mode 100644
index 000000000..086c00f62
--- /dev/null
+++ b/redmine/test/fixtures/auth_sources.yml
@@ -0,0 +1,2 @@
+--- {}
+
diff --git a/redmine/test/fixtures/custom_fields.yml b/redmine/test/fixtures/custom_fields.yml
new file mode 100644
index 000000000..fcf52c17a
--- /dev/null
+++ b/redmine/test/fixtures/custom_fields.yml
@@ -0,0 +1,45 @@
+---
+custom_fields_001:
+ name: Database
+ min_length: 0
+ regexp: ""
+ is_for_all: false
+ type: IssueCustomField
+ max_length: 0
+ possible_values: MySQL|PostgreSQL|Oracle
+ id: 1
+ is_required: false
+ field_format: list
+custom_fields_002:
+ name: Build
+ min_length: 1
+ regexp: ""
+ is_for_all: true
+ type: IssueCustomField
+ max_length: 10
+ possible_values: ""
+ id: 2
+ is_required: false
+ field_format: string
+custom_fields_003:
+ name: Development status
+ min_length: 0
+ regexp: ""
+ is_for_all: false
+ type: ProjectCustomField
+ max_length: 0
+ possible_values: Stable|Beta|Alpha|Planning
+ id: 3
+ is_required: true
+ field_format: list
+custom_fields_004:
+ name: Phone number
+ min_length: 0
+ regexp: ""
+ is_for_all: false
+ type: UserCustomField
+ max_length: 0
+ possible_values: ""
+ id: 4
+ is_required: false
+ field_format: string
diff --git a/redmine/test/fixtures/custom_fields_projects.yml b/redmine/test/fixtures/custom_fields_projects.yml
new file mode 100644
index 000000000..086c00f62
--- /dev/null
+++ b/redmine/test/fixtures/custom_fields_projects.yml
@@ -0,0 +1,2 @@
+--- {}
+
diff --git a/redmine/test/fixtures/custom_fields_trackers.yml b/redmine/test/fixtures/custom_fields_trackers.yml
new file mode 100644
index 000000000..cb06d2fcf
--- /dev/null
+++ b/redmine/test/fixtures/custom_fields_trackers.yml
@@ -0,0 +1,10 @@
+---
+custom_fields_trackers_001:
+ custom_field_id: 1
+ tracker_id: 1
+custom_fields_trackers_002:
+ custom_field_id: 2
+ tracker_id: 1
+custom_fields_trackers_003:
+ custom_field_id: 2
+ tracker_id: 3
diff --git a/redmine/test/fixtures/custom_values.yml b/redmine/test/fixtures/custom_values.yml
new file mode 100644
index 000000000..4a65619c4
--- /dev/null
+++ b/redmine/test/fixtures/custom_values.yml
@@ -0,0 +1,43 @@
+---
+custom_values_006:
+ customized_type: Issue
+ custom_field_id: 2
+ customized_id: 3
+ id: 9
+ value: "125"
+custom_values_007:
+ customized_type: Project
+ custom_field_id: 3
+ customized_id: 1
+ id: 10
+ value: Stable
+custom_values_001:
+ customized_type: User
+ custom_field_id: 4
+ customized_id: 3
+ id: 2
+ value: ""
+custom_values_002:
+ customized_type: User
+ custom_field_id: 4
+ customized_id: 4
+ id: 3
+ value: 01 23 45 67 89
+custom_values_003:
+ customized_type: User
+ custom_field_id: 4
+ customized_id: 2
+ id: 4
+ value: ""
+custom_values_004:
+ customized_type: Issue
+ custom_field_id: 2
+ customized_id: 1
+ id: 7
+ value: "101"
+custom_values_005:
+ customized_type: Issue
+ custom_field_id: 2
+ customized_id: 2
+ id: 8
+ value: ""
diff --git a/redmine/test/fixtures/documents.yml b/redmine/test/fixtures/documents.yml
new file mode 100644
index 000000000..086c00f62
--- /dev/null
+++ b/redmine/test/fixtures/documents.yml
@@ -0,0 +1,2 @@
+--- {}
+
diff --git a/redmine/test/fixtures/enumerations.yml b/redmine/test/fixtures/enumerations.yml
new file mode 100644
index 000000000..eeef99b5b
--- /dev/null
+++ b/redmine/test/fixtures/enumerations.yml
@@ -0,0 +1,33 @@
+---
+enumerations_001:
+ name: Uncategorized
+ id: 1
+ opt: DCAT
+enumerations_002:
+ name: User documentation
+ id: 2
+ opt: DCAT
+enumerations_003:
+ name: Technical documentation
+ id: 3
+ opt: DCAT
+enumerations_004:
+ name: Low
+ id: 4
+ opt: IPRI
+enumerations_005:
+ name: Normal
+ id: 5
+ opt: IPRI
+enumerations_006:
+ name: High
+ id: 6
+ opt: IPRI
+enumerations_007:
+ name: Urgent
+ id: 7
+ opt: IPRI
+enumerations_008:
+ name: Immediate
+ id: 8
+ opt: IPRI
diff --git a/redmine/test/fixtures/issue_categories.yml b/redmine/test/fixtures/issue_categories.yml
new file mode 100644
index 000000000..a994560d4
--- /dev/null
+++ b/redmine/test/fixtures/issue_categories.yml
@@ -0,0 +1,9 @@
+---
+issue_categories_001:
+ name: Printing
+ project_id: 1
+ id: 1
+issue_categories_002:
+ name: Recipes
+ project_id: 1
+ id: 2
diff --git a/redmine/test/fixtures/issue_histories.yml b/redmine/test/fixtures/issue_histories.yml
new file mode 100644
index 000000000..5b7803650
--- /dev/null
+++ b/redmine/test/fixtures/issue_histories.yml
@@ -0,0 +1,29 @@
+---
+issue_histories_003:
+ created_on: 2006-07-19 21:07:27 +02:00
+ notes:
+ issue_id: 3
+ id: 3
+ author_id: 2
+ status_id: 1
+issue_histories_004:
+ created_on: 2006-07-19 21:09:50 +02:00
+ notes: Should be bone quickly
+ issue_id: 2
+ id: 4
+ author_id: 2
+ status_id: 2
+issue_histories_001:
+ created_on: 2006-07-19 21:02:17 +02:00
+ notes:
+ issue_id: 1
+ id: 1
+ author_id: 2
+ status_id: 1
+issue_histories_002:
+ created_on: 2006-07-19 21:04:21 +02:00
+ notes:
+ issue_id: 2
+ id: 2
+ author_id: 2
+ status_id: 1
diff --git a/redmine/test/fixtures/issue_statuses.yml b/redmine/test/fixtures/issue_statuses.yml
new file mode 100644
index 000000000..b5a509f39
--- /dev/null
+++ b/redmine/test/fixtures/issue_statuses.yml
@@ -0,0 +1,37 @@
+---
+issue_statuses_006:
+ name: Rejected
+ is_default: false
+ html_color: F5C28B
+ is_closed: true
+ id: 6
+issue_statuses_001:
+ name: New
+ is_default: true
+ html_color: F98787
+ is_closed: false
+ id: 1
+issue_statuses_002:
+ name: Assigned
+ is_default: false
+ html_color: C0C0FF
+ is_closed: false
+ id: 2
+issue_statuses_003:
+ name: Resolved
+ is_default: false
+ html_color: 88E0B3
+ is_closed: false
+ id: 3
+issue_statuses_004:
+ name: Feedback
+ is_default: false
+ html_color: F3A4F4
+ is_closed: false
+ id: 4
+issue_statuses_005:
+ name: Closed
+ is_default: false
+ html_color: DBDBDB
+ is_closed: true
+ id: 5
diff --git a/redmine/test/fixtures/issues.yml b/redmine/test/fixtures/issues.yml
new file mode 100644
index 000000000..5719a9bc9
--- /dev/null
+++ b/redmine/test/fixtures/issues.yml
@@ -0,0 +1,43 @@
+---
+issues_001:
+ created_on: 2006-07-19 21:02:17 +02:00
+ project_id: 1
+ updated_on: 2006-07-19 21:04:30 +02:00
+ priority_id: 4
+ subject: Can't print recipes
+ id: 1
+ fixed_version_id:
+ category_id: 1
+ description: Unable to print recipes
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+issues_002:
+ created_on: 2006-07-19 21:04:21 +02:00
+ project_id: 1
+ updated_on: 2006-07-19 21:09:50 +02:00
+ priority_id: 5
+ subject: Add ingredients categories
+ id: 2
+ fixed_version_id:
+ category_id:
+ description: Ingredients should be classified by categories
+ tracker_id: 2
+ assigned_to_id: 3
+ author_id: 2
+ status_id: 2
+issues_003:
+ created_on: 2006-07-19 21:07:27 +02:00
+ project_id: 1
+ updated_on: 2006-07-19 21:07:27 +02:00
+ priority_id: 4
+ subject: Error 281 when updating a recipe
+ id: 3
+ fixed_version_id:
+ category_id:
+ description: Error 281 is encountered when saving a recipe
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
diff --git a/redmine/test/fixtures/members.yml b/redmine/test/fixtures/members.yml
new file mode 100644
index 000000000..0626bdb18
--- /dev/null
+++ b/redmine/test/fixtures/members.yml
@@ -0,0 +1,13 @@
+---
+members_001:
+ created_on: 2006-07-19 19:35:33 +02:00
+ project_id: 1
+ role_id: 1
+ id: 1
+ user_id: 2
+members_002:
+ created_on: 2006-07-19 19:35:36 +02:00
+ project_id: 1
+ role_id: 2
+ id: 2
+ user_id: 3
diff --git a/redmine/test/fixtures/news.yml b/redmine/test/fixtures/news.yml
new file mode 100644
index 000000000..1bef9184e
--- /dev/null
+++ b/redmine/test/fixtures/news.yml
@@ -0,0 +1,20 @@
+---
+news_001:
+ created_on: 2006-07-19 22:40:26 +02:00
+ project_id: 1
+ title: eCookbook first release !
+ id: 1
+ description: |-
+ eCookbook 1.0 has been released.
+
+ Visit http://ecookbook.somenet.foo/
+ summary: First version was released...
+ author_id: 2
+news_002:
+ created_on: 2006-07-19 22:42:58 +02:00
+ project_id: 1
+ title: 100,000 downloads for eCookbook
+ id: 2
+ description: eCookbook 1.0 have downloaded 100,000 times
+ summary: eCookbook 1.0 have downloaded 100,000 times
+ author_id: 2
diff --git a/redmine/test/fixtures/permissions.yml b/redmine/test/fixtures/permissions.yml
new file mode 100644
index 000000000..5ab97fa7a
--- /dev/null
+++ b/redmine/test/fixtures/permissions.yml
@@ -0,0 +1,379 @@
+---
+permissions_041:
+ action: add_file
+ id: 41
+ description: Add
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1320
+ is_public: false
+permissions_030:
+ action: destroy
+ id: 30
+ description: Delete
+ controller: news
+ mail_enabled: false
+ mail_option: false
+ sort: 1122
+ is_public: false
+permissions_019:
+ action: download
+ id: 19
+ description: Download file
+ controller: issues
+ mail_enabled: false
+ mail_option: false
+ sort: 1010
+ is_public: true
+permissions_008:
+ action: edit
+ id: 8
+ description: Edit
+ controller: members
+ mail_enabled: false
+ mail_option: false
+ sort: 221
+ is_public: false
+permissions_042:
+ action: destroy_file
+ id: 42
+ description: Delete
+ controller: versions
+ mail_enabled: false
+ mail_option: false
+ sort: 1322
+ is_public: false
+permissions_031:
+ action: list_documents
+ id: 31
+ description: View list
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1200
+ is_public: true
+permissions_020:
+ action: add_issue
+ id: 20
+ description: Report an issue
+ controller: projects
+ mail_enabled: true
+ mail_option: true
+ sort: 1050
+ is_public: false
+permissions_009:
+ action: destroy
+ id: 9
+ description: Delete
+ controller: members
+ mail_enabled: false
+ mail_option: false
+ sort: 222
+ is_public: false
+permissions_032:
+ action: show
+ id: 32
+ description: View
+ controller: documents
+ mail_enabled: false
+ mail_option: false
+ sort: 1201
+ is_public: true
+permissions_021:
+ action: edit
+ id: 21
+ description: Edit
+ controller: issues
+ mail_enabled: false
+ mail_option: false
+ sort: 1055
+ is_public: false
+permissions_010:
+ action: add_version
+ id: 10
+ description: New version
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 320
+ is_public: false
+permissions_033:
+ action: download
+ id: 33
+ description: Download
+ controller: documents
+ mail_enabled: false
+ mail_option: false
+ sort: 1202
+ is_public: true
+permissions_022:
+ action: change_status
+ id: 22
+ description: Change status
+ controller: issues
+ mail_enabled: true
+ mail_option: true
+ sort: 1060
+ is_public: false
+permissions_011:
+ action: edit
+ id: 11
+ description: Edit
+ controller: versions
+ mail_enabled: false
+ mail_option: false
+ sort: 321
+ is_public: false
+permissions_034:
+ action: add_document
+ id: 34
+ description: Add
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1220
+ is_public: false
+permissions_023:
+ action: destroy
+ id: 23
+ description: Delete
+ controller: issues
+ mail_enabled: false
+ mail_option: false
+ sort: 1065
+ is_public: false
+permissions_012:
+ action: destroy
+ id: 12
+ description: Delete
+ controller: versions
+ mail_enabled: false
+ mail_option: false
+ sort: 322
+ is_public: false
+permissions_001:
+ action: show
+ id: 1
+ description: Overview
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 100
+ is_public: true
+permissions_035:
+ action: edit
+ id: 35
+ description: Edit
+ controller: documents
+ mail_enabled: false
+ mail_option: false
+ sort: 1221
+ is_public: false
+permissions_024:
+ action: add_attachment
+ id: 24
+ description: Add file
+ controller: issues
+ mail_enabled: false
+ mail_option: false
+ sort: 1070
+ is_public: false
+permissions_013:
+ action: add_issue_category
+ id: 13
+ description: New issue category
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 420
+ is_public: false
+permissions_002:
+ action: changelog
+ id: 2
+ description: View change log
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 105
+ is_public: true
+permissions_036:
+ action: destroy
+ id: 36
+ description: Delete
+ controller: documents
+ mail_enabled: false
+ mail_option: false
+ sort: 1222
+ is_public: false
+permissions_025:
+ action: destroy_attachment
+ id: 25
+ description: Delete file
+ controller: issues
+ mail_enabled: false
+ mail_option: false
+ sort: 1075
+ is_public: false
+permissions_014:
+ action: edit
+ id: 14
+ description: Edit
+ controller: issue_categories
+ mail_enabled: false
+ mail_option: false
+ sort: 421
+ is_public: false
+permissions_003:
+ action: issue_report
+ id: 3
+ description: View reports
+ controller: reports
+ mail_enabled: false
+ mail_option: false
+ sort: 110
+ is_public: true
+permissions_037:
+ action: add_attachment
+ id: 37
+ description: Add file
+ controller: documents
+ mail_enabled: false
+ mail_option: false
+ sort: 1223
+ is_public: false
+permissions_026:
+ action: list_news
+ id: 26
+ description: View list
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1100
+ is_public: true
+permissions_015:
+ action: destroy
+ id: 15
+ description: Delete
+ controller: issue_categories
+ mail_enabled: false
+ mail_option: false
+ sort: 422
+ is_public: false
+permissions_004:
+ action: settings
+ id: 4
+ description: Settings
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 150
+ is_public: false
+permissions_038:
+ action: destroy_attachment
+ id: 38
+ description: Delete file
+ controller: documents
+ mail_enabled: false
+ mail_option: false
+ sort: 1224
+ is_public: false
+permissions_027:
+ action: show
+ id: 27
+ description: View
+ controller: news
+ mail_enabled: false
+ mail_option: false
+ sort: 1101
+ is_public: true
+permissions_016:
+ action: list_issues
+ id: 16
+ description: View list
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1000
+ is_public: true
+permissions_005:
+ action: edit
+ id: 5
+ description: Edit
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 151
+ is_public: false
+permissions_039:
+ action: list_files
+ id: 39
+ description: View list
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1300
+ is_public: true
+permissions_028:
+ action: add_news
+ id: 28
+ description: Add
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1120
+ is_public: false
+permissions_017:
+ action: export_issues_csv
+ id: 17
+ description: Export list to CSV
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 1001
+ is_public: true
+permissions_006:
+ action: list_members
+ id: 6
+ description: View list
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 200
+ is_public: true
+permissions_040:
+ action: download
+ id: 40
+ description: Download
+ controller: versions
+ mail_enabled: false
+ mail_option: false
+ sort: 1301
+ is_public: true
+permissions_029:
+ action: edit
+ id: 29
+ description: Edit
+ controller: news
+ mail_enabled: false
+ mail_option: false
+ sort: 1121
+ is_public: false
+permissions_018:
+ action: show
+ id: 18
+ description: View
+ controller: issues
+ mail_enabled: false
+ mail_option: false
+ sort: 1005
+ is_public: true
+permissions_007:
+ action: add_member
+ id: 7
+ description: New member
+ controller: projects
+ mail_enabled: false
+ mail_option: false
+ sort: 220
+ is_public: false
diff --git a/redmine/test/fixtures/permissions_roles.yml b/redmine/test/fixtures/permissions_roles.yml
new file mode 100644
index 000000000..d4a054ecc
--- /dev/null
+++ b/redmine/test/fixtures/permissions_roles.yml
@@ -0,0 +1,379 @@
+---
+permissions_roles_075:
+ role_id: 3
+ permission_id: 34
+permissions_roles_047:
+ role_id: 1
+ permission_id: 15
+permissions_roles_102:
+ role_id: 2
+ permission_id: 4
+permissions_roles_019:
+ role_id: 3
+ permission_id: 30
+permissions_roles_048:
+ role_id: 2
+ permission_id: 24
+permissions_roles_103:
+ role_id: 2
+ permission_id: 27
+permissions_roles_076:
+ role_id: 2
+ permission_id: 41
+permissions_roles_049:
+ role_id: 1
+ permission_id: 3
+permissions_roles_104:
+ role_id: 2
+ permission_id: 36
+permissions_roles_077:
+ role_id: 2
+ permission_id: 7
+permissions_roles_105:
+ role_id: 2
+ permission_id: 32
+permissions_roles_078:
+ role_id: 3
+ permission_id: 38
+permissions_roles_106:
+ role_id: 2
+ permission_id: 14
+permissions_roles_020:
+ role_id: 2
+ permission_id: 9
+permissions_roles_079:
+ role_id: 2
+ permission_id: 18
+permissions_roles_107:
+ role_id: 3
+ permission_id: 40
+permissions_roles_021:
+ role_id: 1
+ permission_id: 13
+permissions_roles_108:
+ role_id: 1
+ permission_id: 29
+permissions_roles_050:
+ role_id: 2
+ permission_id: 29
+permissions_roles_022:
+ role_id: 3
+ permission_id: 4
+permissions_roles_109:
+ role_id: 3
+ permission_id: 22
+permissions_roles_051:
+ role_id: 3
+ permission_id: 37
+permissions_roles_023:
+ role_id: 1
+ permission_id: 23
+permissions_roles_052:
+ role_id: 2
+ permission_id: 33
+permissions_roles_024:
+ role_id: 1
+ permission_id: 1
+permissions_roles_080:
+ role_id: 2
+ permission_id: 13
+permissions_roles_053:
+ role_id: 2
+ permission_id: 1
+permissions_roles_025:
+ role_id: 2
+ permission_id: 10
+permissions_roles_081:
+ role_id: 3
+ permission_id: 20
+permissions_roles_054:
+ role_id: 2
+ permission_id: 12
+permissions_roles_026:
+ role_id: 1
+ permission_id: 36
+permissions_roles_082:
+ role_id: 1
+ permission_id: 39
+permissions_roles_110:
+ role_id: 3
+ permission_id: 6
+permissions_roles_027:
+ role_id: 3
+ permission_id: 31
+permissions_roles_083:
+ role_id: 1
+ permission_id: 33
+permissions_roles_055:
+ role_id: 1
+ permission_id: 38
+permissions_roles_111:
+ role_id: 3
+ permission_id: 1
+permissions_roles_028:
+ role_id: 1
+ permission_id: 24
+permissions_roles_084:
+ role_id: 3
+ permission_id: 16
+permissions_roles_056:
+ role_id: 2
+ permission_id: 5
+permissions_roles_029:
+ role_id: 1
+ permission_id: 9
+permissions_roles_085:
+ role_id: 3
+ permission_id: 27
+permissions_roles_057:
+ role_id: 1
+ permission_id: 16
+permissions_roles_112:
+ role_id: 1
+ permission_id: 20
+permissions_roles_086:
+ role_id: 3
+ permission_id: 12
+permissions_roles_058:
+ role_id: 1
+ permission_id: 26
+permissions_roles_113:
+ role_id: 2
+ permission_id: 37
+permissions_roles_087:
+ role_id: 1
+ permission_id: 5
+permissions_roles_059:
+ role_id: 3
+ permission_id: 18
+permissions_roles_114:
+ role_id: 2
+ permission_id: 20
+permissions_roles_115:
+ role_id: 2
+ permission_id: 15
+permissions_roles_088:
+ role_id: 2
+ permission_id: 3
+permissions_roles_001:
+ role_id: 2
+ permission_id: 21
+permissions_roles_116:
+ role_id: 3
+ permission_id: 23
+permissions_roles_030:
+ role_id: 1
+ permission_id: 30
+permissions_roles_089:
+ role_id: 1
+ permission_id: 28
+permissions_roles_002:
+ role_id: 3
+ permission_id: 29
+permissions_roles_117:
+ role_id: 3
+ permission_id: 28
+permissions_roles_031:
+ role_id: 2
+ permission_id: 38
+permissions_roles_003:
+ role_id: 3
+ permission_id: 41
+permissions_roles_118:
+ role_id: 1
+ permission_id: 34
+permissions_roles_032:
+ role_id: 3
+ permission_id: 9
+permissions_roles_004:
+ role_id: 2
+ permission_id: 8
+permissions_roles_060:
+ role_id: 2
+ permission_id: 2
+permissions_roles_119:
+ role_id: 1
+ permission_id: 21
+permissions_roles_033:
+ role_id: 2
+ permission_id: 28
+permissions_roles_005:
+ role_id: 3
+ permission_id: 3
+permissions_roles_061:
+ role_id: 2
+ permission_id: 40
+permissions_roles_006:
+ role_id: 3
+ permission_id: 14
+permissions_roles_090:
+ role_id: 2
+ permission_id: 26
+permissions_roles_062:
+ role_id: 1
+ permission_id: 19
+permissions_roles_034:
+ role_id: 2
+ permission_id: 11
+permissions_roles_007:
+ role_id: 1
+ permission_id: 35
+permissions_roles_091:
+ role_id: 3
+ permission_id: 35
+permissions_roles_063:
+ role_id: 2
+ permission_id: 30
+permissions_roles_035:
+ role_id: 2
+ permission_id: 23
+permissions_roles_008:
+ role_id: 2
+ permission_id: 17
+permissions_roles_092:
+ role_id: 2
+ permission_id: 31
+permissions_roles_064:
+ role_id: 3
+ permission_id: 33
+permissions_roles_036:
+ role_id: 3
+ permission_id: 5
+permissions_roles_120:
+ role_id: 3
+ permission_id: 13
+permissions_roles_009:
+ role_id: 1
+ permission_id: 12
+permissions_roles_093:
+ role_id: 2
+ permission_id: 42
+permissions_roles_065:
+ role_id: 3
+ permission_id: 26
+permissions_roles_037:
+ role_id: 1
+ permission_id: 42
+permissions_roles_121:
+ role_id: 3
+ permission_id: 2
+permissions_roles_094:
+ role_id: 3
+ permission_id: 39
+permissions_roles_066:
+ role_id: 2
+ permission_id: 6
+permissions_roles_038:
+ role_id: 1
+ permission_id: 25
+permissions_roles_122:
+ role_id: 1
+ permission_id: 7
+permissions_roles_095:
+ role_id: 2
+ permission_id: 19
+permissions_roles_067:
+ role_id: 1
+ permission_id: 17
+permissions_roles_039:
+ role_id: 3
+ permission_id: 36
+permissions_roles_123:
+ role_id: 3
+ permission_id: 24
+permissions_roles_096:
+ role_id: 1
+ permission_id: 18
+permissions_roles_068:
+ role_id: 1
+ permission_id: 32
+permissions_roles_124:
+ role_id: 1
+ permission_id: 11
+permissions_roles_010:
+ role_id: 1
+ permission_id: 8
+permissions_roles_069:
+ role_id: 3
+ permission_id: 19
+permissions_roles_097:
+ role_id: 2
+ permission_id: 35
+permissions_roles_125:
+ role_id: 2
+ permission_id: 16
+permissions_roles_011:
+ role_id: 3
+ permission_id: 42
+permissions_roles_098:
+ role_id: 1
+ permission_id: 6
+permissions_roles_126:
+ role_id: 3
+ permission_id: 7
+permissions_roles_012:
+ role_id: 3
+ permission_id: 8
+permissions_roles_040:
+ role_id: 1
+ permission_id: 2
+permissions_roles_099:
+ role_id: 3
+ permission_id: 17
+permissions_roles_041:
+ role_id: 2
+ permission_id: 39
+permissions_roles_013:
+ role_id: 1
+ permission_id: 40
+permissions_roles_070:
+ role_id: 3
+ permission_id: 11
+permissions_roles_042:
+ role_id: 1
+ permission_id: 37
+permissions_roles_014:
+ role_id: 1
+ permission_id: 22
+permissions_roles_071:
+ role_id: 1
+ permission_id: 4
+permissions_roles_043:
+ role_id: 3
+ permission_id: 32
+permissions_roles_015:
+ role_id: 2
+ permission_id: 22
+permissions_roles_072:
+ role_id: 1
+ permission_id: 27
+permissions_roles_044:
+ role_id: 1
+ permission_id: 14
+permissions_roles_016:
+ role_id: 3
+ permission_id: 15
+permissions_roles_073:
+ role_id: 2
+ permission_id: 34
+permissions_roles_045:
+ role_id: 3
+ permission_id: 10
+permissions_roles_100:
+ role_id: 1
+ permission_id: 10
+permissions_roles_017:
+ role_id: 3
+ permission_id: 25
+permissions_roles_074:
+ role_id: 2
+ permission_id: 25
+permissions_roles_046:
+ role_id: 1
+ permission_id: 31
+permissions_roles_101:
+ role_id: 3
+ permission_id: 21
+permissions_roles_018:
+ role_id: 1
+ permission_id: 41
diff --git a/redmine/test/fixtures/projects.yml b/redmine/test/fixtures/projects.yml
index 0358c5f7b..9aa2f9abe 100644
--- a/redmine/test/fixtures/projects.yml
+++ b/redmine/test/fixtures/projects.yml
@@ -1,26 +1,41 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-ecookbook:
- id: 1
- name: eCookbook
- descr: Recipes management application
- homepage: http://ecookbook.somenet.foo/
- projects_count: 1
- created_on: 2005-01-01 01:00:00
- updated_on: 2005-01-01 01:00:00
-onlinestore:
- id: 2
- name: OnlineStore
- descr: E-commerce web site
- is_public: false
- projects_count: 0
- created_on: 2005-01-01 01:00:00
- updated_on: 2005-01-01 01:00:00
-tracker:
- id: 3
- name: tracker
- descr: bug tracker
- is_public: true
- projects_count: 0
- parent_id: 1
- created_on: 2005-01-01 01:00:00
- updated_on: 2005-01-01 01:00:00 \ No newline at end of file
+---
+projects_001:
+ created_on: 2006-07-19 19:13:59 +02:00
+ name: eCookbook
+ updated_on: 2006-07-19 22:53:01 +02:00
+ projects_count: 2
+ id: 1
+ description: Recipes management application
+ homepage: http://ecookbook.somenet.foo/
+ is_public: true
+ parent_id:
+projects_002:
+ created_on: 2006-07-19 19:14:19 +02:00
+ name: OnlineStore
+ updated_on: 2006-07-19 19:14:19 +02:00
+ projects_count: 0
+ id: 2
+ description: E-commerce web site
+ homepage: ""
+ is_public: false
+ parent_id:
+projects_003:
+ created_on: 2006-07-19 19:15:21 +02:00
+ name: eCookbook Subproject 1
+ updated_on: 2006-07-19 19:18:12 +02:00
+ projects_count: 0
+ id: 3
+ description: eCookBook Subproject 1
+ homepage: ""
+ is_public: true
+ parent_id: 1
+projects_004:
+ created_on: 2006-07-19 19:15:51 +02:00
+ name: eCookbook Subproject 2
+ updated_on: 2006-07-19 19:17:07 +02:00
+ projects_count: 0
+ id: 4
+ description: eCookbook Subproject 2
+ homepage: ""
+ is_public: true
+ parent_id: 1
diff --git a/redmine/test/fixtures/roles.yml b/redmine/test/fixtures/roles.yml
index ce676309e..4fc9881b4 100644
--- a/redmine/test/fixtures/roles.yml
+++ b/redmine/test/fixtures/roles.yml
@@ -1,10 +1,10 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-manager:
- id: 1
- name: manager
-developer:
- id: 2
- name: developer
-reporter:
- id: 3
- name: reporter
+---
+roles_001:
+ name: Manager
+ id: 1
+roles_002:
+ name: Developer
+ id: 2
+roles_003:
+ name: Reporter
+ id: 3
diff --git a/redmine/test/fixtures/tokens.yml b/redmine/test/fixtures/tokens.yml
new file mode 100644
index 000000000..977bafe6e
--- /dev/null
+++ b/redmine/test/fixtures/tokens.yml
@@ -0,0 +1 @@
+---
diff --git a/redmine/test/fixtures/trackers.yml b/redmine/test/fixtures/trackers.yml
new file mode 100644
index 000000000..d4ea34ac8
--- /dev/null
+++ b/redmine/test/fixtures/trackers.yml
@@ -0,0 +1,13 @@
+---
+trackers_001:
+ name: Bug
+ id: 1
+ is_in_chlog: true
+trackers_002:
+ name: Feature request
+ id: 2
+ is_in_chlog: true
+trackers_003:
+ name: Support request
+ id: 3
+ is_in_chlog: false
diff --git a/redmine/test/fixtures/users.yml b/redmine/test/fixtures/users.yml
index 1d6ca5c00..ffa2fe42e 100644
--- a/redmine/test/fixtures/users.yml
+++ b/redmine/test/fixtures/users.yml
@@ -1,19 +1,61 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-admin:
- id: 1
- login: admin
- firstname: admin
- lastname: admin
- mail: admin@somenet.foo
- hashed_password: d033e22ae348aeb5660fc2140aec35850c4da997
- admin: true
- language: en
-paulochon:
- id: 2
- login: plochon
- firstname: Paul
- lastname: Ochon
- mail: plochon@somenet.foo
- hashed_password: d033e22ae348aeb5660fc2140aec35850c4da997
- admin: false
- language: en \ No newline at end of file
+---
+users_004:
+ created_on: 2006-07-19 19:34:07 +02:00
+ status: 1
+ last_login_on:
+ language: en
+ hashed_password: 4e4aeb7baaf0706bd670263fef42dad15763b608
+ updated_on: 2006-07-19 19:34:07 +02:00
+ admin: false
+ mail: rhill@somenet.foo
+ lastname: Hill
+ firstname: Robert
+ id: 4
+ auth_source_id:
+ mail_notification: true
+ login: rhill
+users_001:
+ created_on: 2006-07-19 19:12:21 +02:00
+ status: 1
+ last_login_on: 2006-07-19 22:57:52 +02:00
+ language: en
+ hashed_password: d033e22ae348aeb5660fc2140aec35850c4da997
+ updated_on: 2006-07-19 22:57:52 +02:00
+ admin: true
+ mail: admin@somenet.foo
+ lastname: Admin
+ firstname: redMine
+ id: 1
+ auth_source_id:
+ mail_notification: true
+ login: admin
+users_002:
+ created_on: 2006-07-19 19:32:09 +02:00
+ status: 1
+ last_login_on: 2006-07-19 22:42:15 +02:00
+ language: en
+ hashed_password: a9a653d4151fa2c081ba1ffc2c2726f3b80b7d7d
+ updated_on: 2006-07-19 22:42:15 +02:00
+ admin: false
+ mail: jsmith@somenet.foo
+ lastname: Smith
+ firstname: John
+ id: 2
+ auth_source_id:
+ mail_notification: true
+ login: jsmith
+users_003:
+ created_on: 2006-07-19 19:33:19 +02:00
+ status: 1
+ last_login_on:
+ language: en
+ hashed_password: 7feb7657aa7a7bf5aef3414a5084875f27192415
+ updated_on: 2006-07-19 19:33:19 +02:00
+ admin: false
+ mail: dlopper@somenet.foo
+ lastname: Lopper
+ firstname: Dave
+ id: 3
+ auth_source_id:
+ mail_notification: true
+ login: dlopper
diff --git a/redmine/test/fixtures/versions.yml b/redmine/test/fixtures/versions.yml
new file mode 100644
index 000000000..89a738abd
--- /dev/null
+++ b/redmine/test/fixtures/versions.yml
@@ -0,0 +1,17 @@
+---
+versions_001:
+ created_on: 2006-07-19 21:00:07 +02:00
+ name: "0.1"
+ project_id: 1
+ updated_on: 2006-07-19 21:00:07 +02:00
+ id: 1
+ description: Beta
+ effective_date: 2006-07-01
+versions_002:
+ created_on: 2006-07-19 21:00:33 +02:00
+ name: "1.0"
+ project_id: 1
+ updated_on: 2006-07-19 21:00:33 +02:00
+ id: 2
+ description: Stable release
+ effective_date: 2006-07-19
diff --git a/redmine/test/fixtures/workflows.yml b/redmine/test/fixtures/workflows.yml
new file mode 100644
index 000000000..47e95e6e3
--- /dev/null
+++ b/redmine/test/fixtures/workflows.yml
@@ -0,0 +1,1621 @@
+---
+workflows_189:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 2
+ id: 189
+ tracker_id: 3
+workflows_001:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 1
+ id: 1
+ tracker_id: 1
+workflows_002:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 1
+ id: 2
+ tracker_id: 1
+workflows_003:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 1
+ id: 3
+ tracker_id: 1
+workflows_110:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 4
+ id: 110
+ tracker_id: 2
+workflows_004:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 1
+ id: 4
+ tracker_id: 1
+workflows_030:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 6
+ id: 30
+ tracker_id: 1
+workflows_111:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 5
+ id: 111
+ tracker_id: 2
+workflows_005:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 1
+ id: 5
+ tracker_id: 1
+workflows_031:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 1
+ id: 31
+ tracker_id: 1
+workflows_112:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 5
+ id: 112
+ tracker_id: 2
+workflows_006:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 2
+ id: 6
+ tracker_id: 1
+workflows_032:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 1
+ id: 32
+ tracker_id: 1
+workflows_113:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 5
+ id: 113
+ tracker_id: 2
+workflows_220:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 2
+ id: 220
+ tracker_id: 3
+workflows_007:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 2
+ id: 7
+ tracker_id: 1
+workflows_033:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 1
+ id: 33
+ tracker_id: 1
+workflows_060:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 6
+ id: 60
+ tracker_id: 1
+workflows_114:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 5
+ id: 114
+ tracker_id: 2
+workflows_140:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 4
+ id: 140
+ tracker_id: 2
+workflows_221:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 3
+ id: 221
+ tracker_id: 3
+workflows_008:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 2
+ id: 8
+ tracker_id: 1
+workflows_034:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 1
+ id: 34
+ tracker_id: 1
+workflows_115:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 5
+ id: 115
+ tracker_id: 2
+workflows_141:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 5
+ id: 141
+ tracker_id: 2
+workflows_222:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 3
+ id: 222
+ tracker_id: 3
+workflows_223:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 3
+ id: 223
+ tracker_id: 3
+workflows_009:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 2
+ id: 9
+ tracker_id: 1
+workflows_035:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 1
+ id: 35
+ tracker_id: 1
+workflows_061:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 1
+ id: 61
+ tracker_id: 1
+workflows_116:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 6
+ id: 116
+ tracker_id: 2
+workflows_142:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 5
+ id: 142
+ tracker_id: 2
+workflows_250:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 2
+ id: 250
+ tracker_id: 3
+workflows_224:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 3
+ id: 224
+ tracker_id: 3
+workflows_036:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 2
+ id: 36
+ tracker_id: 1
+workflows_062:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 1
+ id: 62
+ tracker_id: 1
+workflows_117:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 6
+ id: 117
+ tracker_id: 2
+workflows_143:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 5
+ id: 143
+ tracker_id: 2
+workflows_170:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 4
+ id: 170
+ tracker_id: 2
+workflows_251:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 3
+ id: 251
+ tracker_id: 3
+workflows_225:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 3
+ id: 225
+ tracker_id: 3
+workflows_037:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 2
+ id: 37
+ tracker_id: 1
+workflows_063:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 1
+ id: 63
+ tracker_id: 1
+workflows_090:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 6
+ id: 90
+ tracker_id: 1
+workflows_118:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 6
+ id: 118
+ tracker_id: 2
+workflows_144:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 5
+ id: 144
+ tracker_id: 2
+workflows_252:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 3
+ id: 252
+ tracker_id: 3
+workflows_226:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 4
+ id: 226
+ tracker_id: 3
+workflows_038:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 2
+ id: 38
+ tracker_id: 1
+workflows_064:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 1
+ id: 64
+ tracker_id: 1
+workflows_091:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 1
+ id: 91
+ tracker_id: 2
+workflows_119:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 6
+ id: 119
+ tracker_id: 2
+workflows_145:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 5
+ id: 145
+ tracker_id: 2
+workflows_171:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 5
+ id: 171
+ tracker_id: 2
+workflows_253:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 3
+ id: 253
+ tracker_id: 3
+workflows_227:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 4
+ id: 227
+ tracker_id: 3
+workflows_039:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 2
+ id: 39
+ tracker_id: 1
+workflows_065:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 1
+ id: 65
+ tracker_id: 1
+workflows_092:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 1
+ id: 92
+ tracker_id: 2
+workflows_146:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 6
+ id: 146
+ tracker_id: 2
+workflows_172:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 5
+ id: 172
+ tracker_id: 2
+workflows_254:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 3
+ id: 254
+ tracker_id: 3
+workflows_228:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 4
+ id: 228
+ tracker_id: 3
+workflows_066:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 2
+ id: 66
+ tracker_id: 1
+workflows_093:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 1
+ id: 93
+ tracker_id: 2
+workflows_147:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 6
+ id: 147
+ tracker_id: 2
+workflows_173:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 5
+ id: 173
+ tracker_id: 2
+workflows_255:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 3
+ id: 255
+ tracker_id: 3
+workflows_229:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 4
+ id: 229
+ tracker_id: 3
+workflows_067:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 2
+ id: 67
+ tracker_id: 1
+workflows_148:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 6
+ id: 148
+ tracker_id: 2
+workflows_174:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 5
+ id: 174
+ tracker_id: 2
+workflows_256:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 4
+ id: 256
+ tracker_id: 3
+workflows_068:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 2
+ id: 68
+ tracker_id: 1
+workflows_094:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 1
+ id: 94
+ tracker_id: 2
+workflows_149:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 6
+ id: 149
+ tracker_id: 2
+workflows_175:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 5
+ id: 175
+ tracker_id: 2
+workflows_257:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 4
+ id: 257
+ tracker_id: 3
+workflows_069:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 2
+ id: 69
+ tracker_id: 1
+workflows_095:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 1
+ id: 95
+ tracker_id: 2
+workflows_176:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 6
+ id: 176
+ tracker_id: 2
+workflows_258:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 4
+ id: 258
+ tracker_id: 3
+workflows_096:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 2
+ id: 96
+ tracker_id: 2
+workflows_177:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 6
+ id: 177
+ tracker_id: 2
+workflows_259:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 4
+ id: 259
+ tracker_id: 3
+workflows_097:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 2
+ id: 97
+ tracker_id: 2
+workflows_178:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 6
+ id: 178
+ tracker_id: 2
+workflows_098:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 2
+ id: 98
+ tracker_id: 2
+workflows_179:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 6
+ id: 179
+ tracker_id: 2
+workflows_099:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 2
+ id: 99
+ tracker_id: 2
+workflows_100:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 2
+ id: 100
+ tracker_id: 2
+workflows_020:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 4
+ id: 20
+ tracker_id: 1
+workflows_101:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 3
+ id: 101
+ tracker_id: 2
+workflows_021:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 5
+ id: 21
+ tracker_id: 1
+workflows_102:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 3
+ id: 102
+ tracker_id: 2
+workflows_210:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 6
+ id: 210
+ tracker_id: 3
+workflows_022:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 5
+ id: 22
+ tracker_id: 1
+workflows_103:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 3
+ id: 103
+ tracker_id: 2
+workflows_023:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 5
+ id: 23
+ tracker_id: 1
+workflows_104:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 3
+ id: 104
+ tracker_id: 2
+workflows_130:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 2
+ id: 130
+ tracker_id: 2
+workflows_211:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 1
+ id: 211
+ tracker_id: 3
+workflows_024:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 5
+ id: 24
+ tracker_id: 1
+workflows_050:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 4
+ id: 50
+ tracker_id: 1
+workflows_105:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 3
+ id: 105
+ tracker_id: 2
+workflows_131:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 3
+ id: 131
+ tracker_id: 2
+workflows_212:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 1
+ id: 212
+ tracker_id: 3
+workflows_025:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 5
+ id: 25
+ tracker_id: 1
+workflows_051:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 5
+ id: 51
+ tracker_id: 1
+workflows_106:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 4
+ id: 106
+ tracker_id: 2
+workflows_132:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 3
+ id: 132
+ tracker_id: 2
+workflows_213:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 1
+ id: 213
+ tracker_id: 3
+workflows_240:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 6
+ id: 240
+ tracker_id: 3
+workflows_026:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 6
+ id: 26
+ tracker_id: 1
+workflows_052:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 5
+ id: 52
+ tracker_id: 1
+workflows_107:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 4
+ id: 107
+ tracker_id: 2
+workflows_133:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 3
+ id: 133
+ tracker_id: 2
+workflows_214:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 1
+ id: 214
+ tracker_id: 3
+workflows_241:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 1
+ id: 241
+ tracker_id: 3
+workflows_027:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 6
+ id: 27
+ tracker_id: 1
+workflows_053:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 5
+ id: 53
+ tracker_id: 1
+workflows_080:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 4
+ id: 80
+ tracker_id: 1
+workflows_108:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 4
+ id: 108
+ tracker_id: 2
+workflows_134:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 3
+ id: 134
+ tracker_id: 2
+workflows_160:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 2
+ id: 160
+ tracker_id: 2
+workflows_215:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 1
+ id: 215
+ tracker_id: 3
+workflows_242:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 1
+ id: 242
+ tracker_id: 3
+workflows_028:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 6
+ id: 28
+ tracker_id: 1
+workflows_054:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 5
+ id: 54
+ tracker_id: 1
+workflows_081:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 5
+ id: 81
+ tracker_id: 1
+workflows_109:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 4
+ id: 109
+ tracker_id: 2
+workflows_135:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 3
+ id: 135
+ tracker_id: 2
+workflows_161:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 3
+ id: 161
+ tracker_id: 2
+workflows_216:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 2
+ id: 216
+ tracker_id: 3
+workflows_243:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 1
+ id: 243
+ tracker_id: 3
+workflows_029:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 6
+ id: 29
+ tracker_id: 1
+workflows_055:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 5
+ id: 55
+ tracker_id: 1
+workflows_082:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 5
+ id: 82
+ tracker_id: 1
+workflows_136:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 4
+ id: 136
+ tracker_id: 2
+workflows_162:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 3
+ id: 162
+ tracker_id: 2
+workflows_217:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 2
+ id: 217
+ tracker_id: 3
+workflows_270:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 6
+ id: 270
+ tracker_id: 3
+workflows_244:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 1
+ id: 244
+ tracker_id: 3
+workflows_056:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 6
+ id: 56
+ tracker_id: 1
+workflows_137:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 4
+ id: 137
+ tracker_id: 2
+workflows_163:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 3
+ id: 163
+ tracker_id: 2
+workflows_190:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 2
+ id: 190
+ tracker_id: 3
+workflows_218:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 2
+ id: 218
+ tracker_id: 3
+workflows_245:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 1
+ id: 245
+ tracker_id: 3
+workflows_057:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 6
+ id: 57
+ tracker_id: 1
+workflows_083:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 5
+ id: 83
+ tracker_id: 1
+workflows_138:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 4
+ id: 138
+ tracker_id: 2
+workflows_164:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 3
+ id: 164
+ tracker_id: 2
+workflows_191:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 3
+ id: 191
+ tracker_id: 3
+workflows_219:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 2
+ id: 219
+ tracker_id: 3
+workflows_246:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 2
+ id: 246
+ tracker_id: 3
+workflows_058:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 6
+ id: 58
+ tracker_id: 1
+workflows_084:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 5
+ id: 84
+ tracker_id: 1
+workflows_139:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 4
+ id: 139
+ tracker_id: 2
+workflows_165:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 3
+ id: 165
+ tracker_id: 2
+workflows_192:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 3
+ id: 192
+ tracker_id: 3
+workflows_247:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 2
+ id: 247
+ tracker_id: 3
+workflows_059:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 6
+ id: 59
+ tracker_id: 1
+workflows_085:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 5
+ id: 85
+ tracker_id: 1
+workflows_166:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 4
+ id: 166
+ tracker_id: 2
+workflows_248:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 2
+ id: 248
+ tracker_id: 3
+workflows_086:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 6
+ id: 86
+ tracker_id: 1
+workflows_167:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 4
+ id: 167
+ tracker_id: 2
+workflows_193:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 3
+ id: 193
+ tracker_id: 3
+workflows_249:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 2
+ id: 249
+ tracker_id: 3
+workflows_087:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 6
+ id: 87
+ tracker_id: 1
+workflows_168:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 4
+ id: 168
+ tracker_id: 2
+workflows_194:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 3
+ id: 194
+ tracker_id: 3
+workflows_088:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 6
+ id: 88
+ tracker_id: 1
+workflows_169:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 4
+ id: 169
+ tracker_id: 2
+workflows_195:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 3
+ id: 195
+ tracker_id: 3
+workflows_089:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 6
+ id: 89
+ tracker_id: 1
+workflows_196:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 4
+ id: 196
+ tracker_id: 3
+workflows_197:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 4
+ id: 197
+ tracker_id: 3
+workflows_198:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 4
+ id: 198
+ tracker_id: 3
+workflows_199:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 4
+ id: 199
+ tracker_id: 3
+workflows_010:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 2
+ id: 10
+ tracker_id: 1
+workflows_011:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 3
+ id: 11
+ tracker_id: 1
+workflows_012:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 3
+ id: 12
+ tracker_id: 1
+workflows_200:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 4
+ id: 200
+ tracker_id: 3
+workflows_013:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 3
+ id: 13
+ tracker_id: 1
+workflows_120:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 6
+ id: 120
+ tracker_id: 2
+workflows_201:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 5
+ id: 201
+ tracker_id: 3
+workflows_040:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 2
+ id: 40
+ tracker_id: 1
+workflows_121:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 1
+ id: 121
+ tracker_id: 2
+workflows_202:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 5
+ id: 202
+ tracker_id: 3
+workflows_014:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 3
+ id: 14
+ tracker_id: 1
+workflows_041:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 3
+ id: 41
+ tracker_id: 1
+workflows_122:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 1
+ id: 122
+ tracker_id: 2
+workflows_203:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 5
+ id: 203
+ tracker_id: 3
+workflows_015:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 3
+ id: 15
+ tracker_id: 1
+workflows_230:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 4
+ id: 230
+ tracker_id: 3
+workflows_123:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 1
+ id: 123
+ tracker_id: 2
+workflows_204:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 5
+ id: 204
+ tracker_id: 3
+workflows_016:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 4
+ id: 16
+ tracker_id: 1
+workflows_042:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 3
+ id: 42
+ tracker_id: 1
+workflows_231:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 5
+ id: 231
+ tracker_id: 3
+workflows_070:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 2
+ id: 70
+ tracker_id: 1
+workflows_124:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 1
+ id: 124
+ tracker_id: 2
+workflows_150:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 6
+ id: 150
+ tracker_id: 2
+workflows_205:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 5
+ id: 205
+ tracker_id: 3
+workflows_017:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 4
+ id: 17
+ tracker_id: 1
+workflows_043:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 3
+ id: 43
+ tracker_id: 1
+workflows_232:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 5
+ id: 232
+ tracker_id: 3
+workflows_125:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 1
+ id: 125
+ tracker_id: 2
+workflows_151:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 1
+ id: 151
+ tracker_id: 2
+workflows_206:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 6
+ id: 206
+ tracker_id: 3
+workflows_018:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 4
+ id: 18
+ tracker_id: 1
+workflows_044:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 3
+ id: 44
+ tracker_id: 1
+workflows_071:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 3
+ id: 71
+ tracker_id: 1
+workflows_233:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 5
+ id: 233
+ tracker_id: 3
+workflows_126:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 2
+ id: 126
+ tracker_id: 2
+workflows_152:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 1
+ id: 152
+ tracker_id: 2
+workflows_207:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 6
+ id: 207
+ tracker_id: 3
+workflows_019:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 4
+ id: 19
+ tracker_id: 1
+workflows_045:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 3
+ id: 45
+ tracker_id: 1
+workflows_260:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 4
+ id: 260
+ tracker_id: 3
+workflows_234:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 5
+ id: 234
+ tracker_id: 3
+workflows_127:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 2
+ id: 127
+ tracker_id: 2
+workflows_153:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 1
+ id: 153
+ tracker_id: 2
+workflows_180:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 6
+ id: 180
+ tracker_id: 2
+workflows_208:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 6
+ id: 208
+ tracker_id: 3
+workflows_046:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 4
+ id: 46
+ tracker_id: 1
+workflows_072:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 3
+ id: 72
+ tracker_id: 1
+workflows_261:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 5
+ id: 261
+ tracker_id: 3
+workflows_235:
+ new_status_id: 6
+ role_id: 2
+ old_status_id: 5
+ id: 235
+ tracker_id: 3
+workflows_154:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 1
+ id: 154
+ tracker_id: 2
+workflows_181:
+ new_status_id: 2
+ role_id: 1
+ old_status_id: 1
+ id: 181
+ tracker_id: 3
+workflows_209:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 6
+ id: 209
+ tracker_id: 3
+workflows_047:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 4
+ id: 47
+ tracker_id: 1
+workflows_073:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 3
+ id: 73
+ tracker_id: 1
+workflows_128:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 2
+ id: 128
+ tracker_id: 2
+workflows_262:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 5
+ id: 262
+ tracker_id: 3
+workflows_236:
+ new_status_id: 1
+ role_id: 2
+ old_status_id: 6
+ id: 236
+ tracker_id: 3
+workflows_155:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 1
+ id: 155
+ tracker_id: 2
+workflows_048:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 4
+ id: 48
+ tracker_id: 1
+workflows_074:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 3
+ id: 74
+ tracker_id: 1
+workflows_129:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 2
+ id: 129
+ tracker_id: 2
+workflows_263:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 5
+ id: 263
+ tracker_id: 3
+workflows_237:
+ new_status_id: 2
+ role_id: 2
+ old_status_id: 6
+ id: 237
+ tracker_id: 3
+workflows_182:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 1
+ id: 182
+ tracker_id: 3
+workflows_049:
+ new_status_id: 5
+ role_id: 2
+ old_status_id: 4
+ id: 49
+ tracker_id: 1
+workflows_075:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 3
+ id: 75
+ tracker_id: 1
+workflows_156:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 2
+ id: 156
+ tracker_id: 2
+workflows_264:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 5
+ id: 264
+ tracker_id: 3
+workflows_238:
+ new_status_id: 3
+ role_id: 2
+ old_status_id: 6
+ id: 238
+ tracker_id: 3
+workflows_183:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 1
+ id: 183
+ tracker_id: 3
+workflows_076:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 4
+ id: 76
+ tracker_id: 1
+workflows_157:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 2
+ id: 157
+ tracker_id: 2
+workflows_265:
+ new_status_id: 6
+ role_id: 3
+ old_status_id: 5
+ id: 265
+ tracker_id: 3
+workflows_239:
+ new_status_id: 4
+ role_id: 2
+ old_status_id: 6
+ id: 239
+ tracker_id: 3
+workflows_077:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 4
+ id: 77
+ tracker_id: 1
+workflows_158:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 2
+ id: 158
+ tracker_id: 2
+workflows_184:
+ new_status_id: 5
+ role_id: 1
+ old_status_id: 1
+ id: 184
+ tracker_id: 3
+workflows_266:
+ new_status_id: 1
+ role_id: 3
+ old_status_id: 6
+ id: 266
+ tracker_id: 3
+workflows_078:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 4
+ id: 78
+ tracker_id: 1
+workflows_159:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 2
+ id: 159
+ tracker_id: 2
+workflows_185:
+ new_status_id: 6
+ role_id: 1
+ old_status_id: 1
+ id: 185
+ tracker_id: 3
+workflows_267:
+ new_status_id: 2
+ role_id: 3
+ old_status_id: 6
+ id: 267
+ tracker_id: 3
+workflows_079:
+ new_status_id: 5
+ role_id: 3
+ old_status_id: 4
+ id: 79
+ tracker_id: 1
+workflows_186:
+ new_status_id: 1
+ role_id: 1
+ old_status_id: 2
+ id: 186
+ tracker_id: 3
+workflows_268:
+ new_status_id: 3
+ role_id: 3
+ old_status_id: 6
+ id: 268
+ tracker_id: 3
+workflows_187:
+ new_status_id: 3
+ role_id: 1
+ old_status_id: 2
+ id: 187
+ tracker_id: 3
+workflows_269:
+ new_status_id: 4
+ role_id: 3
+ old_status_id: 6
+ id: 269
+ tracker_id: 3
+workflows_188:
+ new_status_id: 4
+ role_id: 1
+ old_status_id: 2
+ id: 188
+ tracker_id: 3
diff --git a/redmine/test/functional/projects_controller_test.rb b/redmine/test/functional/projects_controller_test.rb
index 23776ed90..f20f8ad0f 100644
--- a/redmine/test/functional/projects_controller_test.rb
+++ b/redmine/test/functional/projects_controller_test.rb
@@ -22,7 +22,7 @@ require 'projects_controller'
class ProjectsController; def rescue_action(e) raise e end; end
class ProjectsControllerTest < Test::Unit::TestCase
- fixtures :projects
+ fixtures :projects, :permissions
def setup
@controller = ProjectsController.new
@@ -38,10 +38,77 @@ class ProjectsControllerTest < Test::Unit::TestCase
def test_list
get :list
-
assert_response :success
assert_template 'list'
-
assert_not_nil assigns(:projects)
+ end
+
+ def test_show
+ get :show, :id => 1
+ assert_response :success
+ assert_template 'show'
+ assert_not_nil assigns(:project)
+ end
+
+ def test_list_members
+ get :list_members, :id => 1
+ assert_response :success
+ assert_template 'list_members'
+ assert_not_nil assigns(:members)
+ end
+
+ def test_list_documents
+ get :list_documents, :id => 1
+ assert_response :success
+ assert_template 'list_documents'
+ assert_not_nil assigns(:documents)
+ end
+
+ def test_list_issues
+ get :list_issues, :id => 1
+ assert_response :success
+ assert_template 'list_issues'
+ assert_not_nil assigns(:issues)
+ end
+
+ def test_list_issues_with_filter
+ get :list_issues, :id => 1, :set_filter => 1
+ assert_response :success
+ assert_template 'list_issues'
+ assert_not_nil assigns(:issues)
+ end
+
+ def test_list_issues_reset_filter
+ post :list_issues, :id => 1
+ assert_response :success
+ assert_template 'list_issues'
+ assert_not_nil assigns(:issues)
+ end
+
+ def test_export_issues_csv
+ get :export_issues_csv, :id => 1
+ assert_response :success
+ assert_not_nil assigns(:issues)
+ end
+
+ def test_list_news
+ get :list_news, :id => 1
+ assert_response :success
+ assert_template 'list_news'
+ assert_not_nil assigns(:news)
+ end
+
+ def test_list_files
+ get :list_files, :id => 1
+ assert_response :success
+ assert_template 'list_files'
+ assert_not_nil assigns(:versions)
+ end
+
+ def test_changelog
+ get :changelog, :id => 1
+ assert_response :success
+ assert_template 'changelog'
+ assert_not_nil assigns(:fixed_issues)
end
end
diff --git a/redmine/test/integration/account_test.rb b/redmine/test/integration/account_test.rb
index 7652d4a5b..832e00321 100644
--- a/redmine/test/integration/account_test.rb
+++ b/redmine/test/integration/account_test.rb
@@ -24,7 +24,7 @@ class AccountTest < ActionController::IntegrationTest
def test_login
get "account/my_page"
assert_redirected_to "account/login"
- log_user('plochon', 'admin')
+ log_user('jsmith', 'jsmith')
get "account/my_account"
assert_response :success
@@ -32,12 +32,12 @@ class AccountTest < ActionController::IntegrationTest
end
def test_change_password
- log_user('plochon', 'admin')
+ log_user('jsmith', 'jsmith')
get "account/my_account"
assert_response :success
assert_template "account/my_account"
- post "account/change_password", :password => 'admin', :new_password => "hello", :new_password_confirmation => "hello2"
+ post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello2"
assert_response :success
assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
@@ -45,13 +45,13 @@ class AccountTest < ActionController::IntegrationTest
assert_response :success
assert_equal 'Wrong password', flash[:notice]
- post "account/change_password", :password => 'admin', :new_password => "hello", :new_password_confirmation => "hello"
+ post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello"
assert_response :success
- log_user('plochon', 'hello')
+ log_user('jsmith', 'hello')
end
def test_my_account
- log_user('plochon', 'admin')
+ log_user('jsmith', 'jsmith')
get "account/my_account"
assert_response :success
assert_template "account/my_account"
@@ -61,16 +61,39 @@ class AccountTest < ActionController::IntegrationTest
assert_template "account/my_account"
user = User.find(2)
assert_equal "Joe", user.firstname
- assert_equal "plochon", user.login
- assert_equal false, user.admin?
-
- log_user('plochon', 'admin')
+ assert_equal "jsmith", user.login
+ assert_equal false, user.admin?
end
def test_my_page
- log_user('plochon', 'admin')
+ log_user('jsmith', 'jsmith')
get "account/my_page"
assert_response :success
assert_template "account/my_page"
end
+
+ def test_lost_password
+ get "account/lost_password"
+ assert_response :success
+ assert_template "account/lost_password"
+
+ post "account/lost_password", :mail => 'jsmith@somenet.foo'
+ assert_redirected_to "account/login"
+
+ token = Token.find(:first)
+ assert_equal 'recovery', token.action
+ assert_equal 'jsmith@somenet.foo', token.user.mail
+ assert !token.expired?
+
+ get "account/lost_password", :token => token.value
+ assert_response :success
+ assert_template "account/password_recovery"
+
+ post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass'
+ assert_redirected_to "account/login"
+ assert_equal 'Password was successfully updated.', flash[:notice]
+
+ log_user('jsmith', 'newpass')
+ assert_equal 0, Token.count
+ end
end
diff --git a/redmine/test/integration/admin_test.rb b/redmine/test/integration/admin_test.rb
index 3b01d28dd..6602d1c15 100644
--- a/redmine/test/integration/admin_test.rb
+++ b/redmine/test/integration/admin_test.rb
@@ -25,18 +25,18 @@ class AdminTest < ActionController::IntegrationTest
get "/users/add"
assert_response :success
assert_template "users/add"
- post "/users/add", :user => { :login => "jsmith", :firstname => "John", :lastname => "Smith", :mail => "jsmith@somenet.foo", :language => "en" }, :password => "jsmith09", :password_confirmation => "jsmith09"
+ post "/users/add", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en" }, :password => "psmith09", :password_confirmation => "psmith09"
assert_redirected_to "users/list"
- user = User.find_by_login("jsmith")
+ user = User.find_by_login("psmith")
assert_kind_of User, user
- logged_user = User.try_to_login("jsmith", "jsmith09")
+ logged_user = User.try_to_login("psmith", "psmith09")
assert_kind_of User, logged_user
- assert_equal "John", logged_user.firstname
+ assert_equal "Paul", logged_user.firstname
- post "users/edit", :id => user.id, :user => { :locked => 1 }
+ post "users/edit", :id => user.id, :user => { :status => User::STATUS_LOCKED }
assert_redirected_to "users/list"
- locked_user = User.try_to_login("jsmith", "jsmith09")
+ locked_user = User.try_to_login("psmith", "psmith09")
assert_equal nil, locked_user
end
@@ -45,13 +45,13 @@ class AdminTest < ActionController::IntegrationTest
get "projects/add"
assert_response :success
assert_template "projects/add"
- post "projects/add", :project => { :name => "blog", :descr => "weblog", :is_public => 1}
+ post "projects/add", :project => { :name => "blog", :description => "weblog", :is_public => 1}
assert_redirected_to "admin/projects"
assert_equal 'Project was successfully created.', flash[:notice]
project = Project.find_by_name("blog")
assert_kind_of Project, project
- assert_equal "weblog", project.descr
+ assert_equal "weblog", project.description
assert_equal true, project.is_public?
get "admin/projects"
diff --git a/redmine/test/test_helper.rb b/redmine/test/test_helper.rb
index edc7c5c4e..3d9de8554 100644
--- a/redmine/test/test_helper.rb
+++ b/redmine/test/test_helper.rb
@@ -45,11 +45,11 @@ class Test::Unit::TestCase
def log_user(login, password)
get "/account/login"
- assert_equal nil, session[:user]
+ assert_equal nil, session[:user_id]
assert_response :success
assert_template "account/login"
post "/account/login", :login => login, :password => password
assert_redirected_to "account/my_page"
- assert_equal login, session[:user].login
+ assert_equal login, User.find(session[:user_id]).login
end
end
diff --git a/redmine/test/unit/member_test.rb b/redmine/test/unit/member_test.rb
new file mode 100644
index 000000000..079782306
--- /dev/null
+++ b/redmine/test/unit/member_test.rb
@@ -0,0 +1,51 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+require File.dirname(__FILE__) + '/../test_helper'
+
+class MemberTest < Test::Unit::TestCase
+ fixtures :users, :projects, :roles, :members
+
+ def setup
+ @jsmith = Member.find(1)
+ end
+
+ def test_create
+ member = Member.new(:project_id => 1, :user_id => 4, :role_id => 1)
+ assert member.save
+ end
+
+ def test_update
+ assert_equal "eCookbook", @jsmith.project.name
+ assert_equal "Manager", @jsmith.role.name
+ assert_equal "jsmith", @jsmith.user.login
+
+ @jsmith.role = Role.find(2)
+ assert @jsmith.save
+ end
+
+ def test_validate
+ member = Member.new(:project_id => 1, :user_id => 2, :role_id =>2)
+ # same use can't have more than one role for a project
+ assert !member.save
+ end
+
+ def test_destroy
+ @jsmith.destroy
+ assert_raise(ActiveRecord::RecordNotFound) { Member.find(@jsmith.id) }
+ end
+end
diff --git a/redmine/test/unit/project_test.rb b/redmine/test/unit/project_test.rb
index 9bafe9c92..9c8f0c97e 100644
--- a/redmine/test/unit/project_test.rb
+++ b/redmine/test/unit/project_test.rb
@@ -21,57 +21,59 @@ class ProjectTest < Test::Unit::TestCase
fixtures :projects
def setup
- @project = projects(:ecookbook)
+ @ecookbook = Project.find(1)
+ @ecookbook_sub1 = Project.find(3)
end
def test_truth
- assert_kind_of Project, @project
- assert_equal "eCookbook", @project.name
+ assert_kind_of Project, @ecookbook
+ assert_equal "eCookbook", @ecookbook.name
end
def test_update
- assert_equal "eCookbook", @project.name
- @project.name = "eCook"
- assert @project.save, @project.errors.full_messages.join("; ")
- @project.reload
- assert_equal "eCook", @project.name
+ assert_equal "eCookbook", @ecookbook.name
+ @ecookbook.name = "eCook"
+ assert @ecookbook.save, @ecookbook.errors.full_messages.join("; ")
+ @ecookbook.reload
+ assert_equal "eCook", @ecookbook.name
end
def test_validate
- @project.name = ""
- assert !@project.save
- assert_equal 1, @project.errors.count
- assert_equal "can't be blank", @project.errors.on(:name)
+ @ecookbook.name = ""
+ assert !@ecookbook.save
+ assert_equal 1, @ecookbook.errors.count
+ assert_equal l(:activerecord_error_blank), @ecookbook.errors.on(:name)
end
def test_public_projects
public_projects = Project.find(:all, :conditions => ["is_public=?", true])
- assert_equal 2, public_projects.length
+ assert_equal 3, public_projects.length
assert_equal true, public_projects[0].is_public?
end
def test_destroy
- @project.destroy
- assert_raise(ActiveRecord::RecordNotFound) { Project.find(@project.id) }
+ @ecookbook.destroy
+ assert_raise(ActiveRecord::RecordNotFound) { Project.find(@ecookbook.id) }
end
def test_subproject_ok
sub = Project.find(2)
- sub.parent = Project.find(1)
+ sub.parent = @ecookbook
assert sub.save
- assert_equal 1, sub.parent.id
- assert_equal 2, Project.find(1).projects_count
+ assert_equal @ecookbook.id, sub.parent.id
+ @ecookbook.reload
+ assert_equal 3, @ecookbook.projects_count
end
def test_subproject_invalid
sub = Project.find(2)
- sub.parent = projects(:tracker)
+ sub.parent = @ecookbook_sub1
assert !sub.save
end
def test_subproject_invalid_2
- sub = Project.find(1)
- sub.parent = projects(:onlinestore)
+ sub = @ecookbook
+ sub.parent = Project.find(2)
assert !sub.save
end
end
diff --git a/redmine/test/unit/token_test.rb b/redmine/test/unit/token_test.rb
new file mode 100644
index 000000000..1c3820e99
--- /dev/null
+++ b/redmine/test/unit/token_test.rb
@@ -0,0 +1,10 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class TokenTest < Test::Unit::TestCase
+ fixtures :tokens
+
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end
diff --git a/redmine/test/unit/user_test.rb b/redmine/test/unit/user_test.rb
index df255ae8e..211e6554c 100644
--- a/redmine/test/unit/user_test.rb
+++ b/redmine/test/unit/user_test.rb
@@ -20,24 +20,46 @@ require File.dirname(__FILE__) + '/../test_helper'
class UserTest < Test::Unit::TestCase
fixtures :users
- def test_truth
- assert_kind_of User, users(:paulochon)
+ def setup
+ @admin = User.find(1)
+ @jsmith = User.find(2)
end
+ def test_truth
+ assert_kind_of User, @jsmith
+ end
+
+ def test_create
+ user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
+
+ user.login = "jsmith"
+ user.password, user.password_confirmation = "password", "password"
+ # login uniqueness
+ assert !user.save
+ assert_equal 1, user.errors.count
+
+ user.login = "newuser"
+ user.password, user.password_confirmation = "passwd", "password"
+ # password confirmation
+ assert !user.save
+ assert_equal 1, user.errors.count
+
+ user.password, user.password_confirmation = "password", "password"
+ assert user.save
+ end
+
def test_update
- user = User.find(1)
- assert_equal "admin", user.login
- user.login = "john"
- assert user.save, user.errors.full_messages.join("; ")
- user.reload
- assert_equal "john", user.login
+ assert_equal "admin", @admin.login
+ @admin.login = "john"
+ assert @admin.save, @admin.errors.full_messages.join("; ")
+ @admin.reload
+ assert_equal "john", @admin.login
end
def test_validate
- user = User.find(1)
- user.login = ""
- assert !user.save
- assert_equal 2, user.errors.count
+ @admin.login = ""
+ assert !@admin.save
+ assert_equal 2, @admin.errors.count
end
def test_password
@@ -54,11 +76,13 @@ class UserTest < Test::Unit::TestCase
end
def test_lock
- user = User.find(1)
- user.locked = true
- assert user.save
+ user = User.try_to_login("jsmith", "jsmith")
+ assert_equal @jsmith, user
- user = User.try_to_login("admin", "admin")
+ @jsmith.status = User::STATUS_LOCKED
+ assert @jsmith.save
+
+ user = User.try_to_login("jsmith", "jsmith")
assert_equal nil, user
end
end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/CHANGELOG b/redmine/vendor/plugins/gloc-1.1.0/CHANGELOG
new file mode 100644
index 000000000..6392d7cbe
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/CHANGELOG
@@ -0,0 +1,19 @@
+== Version 1.1 (28 May 2006)
+
+* The charset for each and/or all languages can now be easily configured.
+* Added a ActionController filter that auto-detects the client language.
+* The rake task "sort" now merges lines that match 100%, and warns if duplicate keys are found.
+* Rule support. Create flexible rules to handle issues such as pluralization.
+* Massive speed and stability improvements to development mode.
+* Added Russian strings. (Thanks to Evgeny Lineytsev)
+* Complete RDoc documentation.
+* Improved helpers.
+* GLoc now configurable via get_config and set_config
+* Added an option to tell GLoc to output various verbose information.
+* More useful functions such as set_language_if_valid, similar_language
+* GLoc's entire internal state can now be backed up and restored.
+
+
+== Version 1.0 (17 April 2006)
+
+* Initial public release.
diff --git a/redmine/vendor/plugins/gloc-1.1.0/MIT-LICENSE b/redmine/vendor/plugins/gloc-1.1.0/MIT-LICENSE
new file mode 100644
index 000000000..081774a65
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/MIT-LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2005-2006 David Barri
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/README b/redmine/vendor/plugins/gloc-1.1.0/README
new file mode 100644
index 000000000..66f8e5e9f
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/README
@@ -0,0 +1,208 @@
+= About
+
+=== Preface
+I originally started designing this on weekends and after work in 2005. We started to become very interested in Rails at work and I wanted to get some experience with ruby with before we started using it full-time. I didn't have very many ideas for anything interesting to create so, because we write a lot of multilingual webapps at my company, I decided to write a localization library. That way if my little hobby project developed into something decent, I could at least put it to good use.
+And here we are in 2006, my little hobby project has come a long way and become quite a useful piece of software. Not only do I use it in production sites I write at work, but I also prefer it to other existing alternatives. Therefore I have decided to make it publicly available, and I hope that other developers will find it useful too.
+
+=== About
+GLoc is a localization library. It doesn't aim to do everything l10n-related that you can imagine, but what it does, it does very well. It was originally designed as a Rails plugin, but can also be used for plain ruby projects. Here are a list of its main features:
+* Lightweight and efficient.
+* Uses file-based string bundles. Strings can also be set directly.
+* Intelligent, cascading language configuration.
+* Create flexible rules to handle issues such as pluralization.
+* Includes a ActionController filter that auto-detects the client language.
+* Works perfectly with Rails Engines and allows strings to be overridden just as easily as controllers, models, etc.
+* Automatically localizes Rails functions such as distance_in_minutes, select_month etc
+* Supports different charsets. You can even specify the encoding to use for each language seperately.
+* Special Rails mods/helpers.
+
+=== What does GLoc mean?
+If you're wondering about the name "GLoc", I'm sure you're not alone.
+This project was originally just called "Localization" which was a bit too common, so when I decided to release it I decided to call it "Golly's Localization Library" instead (Golly is my nickname), and that was long and boring so I then abbreviated that to "GLoc". What a fun story!!
+
+=== Localization helpers
+This also includes a few helpers for common situations such as displaying localized date, time, "yes" or "no", etc.
+
+=== Rails Localization
+At the moment, unless you manually remove the <tt>require 'gloc-rails-text'</tt> line from init.rb, this plugin overrides certain Rails functions to provide multilingual versions. This automatically localizes functions such as select_date(), distance_of_time_in_words() and more...
+The strings can be found in lang/*.yml.
+NOTE: This is not complete. Timezones and countries are not currently localized.
+
+
+
+
+= Usage
+
+=== Quickstart
+
+Windows users will need to first install iconv. http://wiki.rubyonrails.com/rails/pages/iconv
+
+* Create a dir "#{RAILS_ROOT}/lang"
+* Create a file "#{RAILS_ROOT}/lang/en.yml" and write your strings. The format is "key: string". Save it as UTF-8. If you save it in a different encoding, add a key called file_charset (eg. "file_charset: iso-2022-jp")
+* Put the following in config/environment.rb and change the values as you see fit. The following example is for an app that uses English and Japanese, with Japanese being the default.
+ GLoc.set_config :default_language => :ja
+ GLoc.clear_strings_except :en, :ja
+ GLoc.set_kcode
+ GLoc.load_localized_strings
+* Add 'include GLoc' to all classes that will use localization. This is added to most Rails classes automatically.
+* Optionally, you can set the language for models and controllers by simply inserting <tt>set_language :en</tt> in classes and/or methods.
+* To use localized strings, replace text such as <tt>"Welcome"</tt> with <tt>l(:welcome_string_key)</tt>, and <tt>"Hello #{name}."</tt> with <tt>l(:hello_string_key, name)</tt>. (Of course the strings will need to exist in your string bundle.)
+
+There is more functionality provided by this plugin, that is not demonstrated above. Please read the API summary for details.
+
+=== API summary
+
+The following methods are added as both class methods and instance methods to modules/classes that include GLoc. They are also available as class methods of GLoc.
+ current_language # Returns the current language
+ l(symbol, *arguments) # Returns a localized string
+ ll(lang, symbol, *arguments) # Returns a localized string in a specific language
+ ltry(possible_key) # Returns a localized string if passed a Symbol, else returns the same argument passed
+ lwr(symbol, *arguments) # Uses the default rule to return a localized string.
+ lwr_(rule, symbol, *arguments) # Uses a specified rule to return a localized string.
+ l_has_string?(symbol) # Checks if a localized string exists
+ set_language(language) # Sets the language for the current class or class instance
+ set_language_if_valid(lang) # Sets the current language if the language passed is a valid language
+
+The GLoc module also defines the following class methods:
+ add_localized_strings(lang, symbol_hash, override=true) # Adds a hash of localized strings
+ backup_state(clear=false) # Creates a backup of GLoc's internal state and optionally clears everything too
+ clear_strings(*languages) # Removes localized strings from memory
+ clear_strings_except(*languages) # Removes localized strings from memory except for those of certain specified languages
+ get_charset(lang) # Returns the charset used to store localized strings in memory
+ get_config(key) # Returns a GLoc configuration value (see below)
+ load_localized_strings(dir=nil, override=true) # Loads localized strings from all YML files in a given directory
+ restore_state(state) # Restores a backup of GLoc's internal state
+ set_charset(new_charset, *langs) # Sets the charset used to internally store localized strings
+ set_config(hash) # Sets GLoc configuration values (see below)
+ set_kcode(charset=nil) # Sets the $KCODE global variable
+ similar_language(language) # Tries to find a valid language that is similar to the argument passed
+ valid_languages # Returns an array of (currently) valid languages (ie. languages for which localized data exists)
+ valid_language?(language) # Checks whether any localized strings are in memory for a given language
+
+GLoc uses the following configuration items. They can be accessed via <tt>get_config</tt> and <tt>set_config</tt>.
+ :default_cookie_name
+ :default_language
+ :default_param_name
+ :raise_string_not_found_errors
+ :verbose
+
+The GLoc module is automatically included in the following classes:
+ ActionController::Base
+ ActionMailer::Base
+ ActionView::Base
+ ActionView::Helpers::InstanceTag
+ ActiveRecord::Base
+ ActiveRecord::Errors
+ ApplicationHelper
+ Test::Unit::TestCase
+
+The GLoc module also defines the following controller filters:
+ autodetect_language_filter
+
+GLoc also makes the following change to Rails:
+* Views for ActionMailer are now #{view_name}_#{language}.rb rather than just #{view_name}.rb
+* All ActiveRecord validation class methods now accept a localized string key (symbol) as a :message value.
+* ActiveRecord::Errors.add now accepts symbols as valid message values. At runtime these symbols are converted to localized strings using the current_language of the base record.
+* ActiveRecord::Errors.add now accepts arrays as arguments so that printf-style strings can be generated at runtime. This also applies to the validates_* class methods.
+ Eg. validates_xxxxxx_of :name, :message => ['Your name must be at least %d characters.', MIN_LEN]
+ Eg. validates_xxxxxx_of :name, :message => [:user_error_validation_name_too_short, MIN_LEN]
+* Instances of ActiveView inherit their current_language from the controller (or mailer) creating them.
+
+This plugin also adds the following rake tasks:
+ * gloc:sort - Sorts the keys in the lang ymls (also accepts a DIR argument)
+
+=== Cascading language configuration
+
+The language can be set at three levels:
+ 1. The default # GLoc.get_config :default_language
+ 2. Class level # class A; set_language :de; end
+ 3. Instance level # b= B.new; b.set_language :zh
+
+Instance level has the highest priority and the default has the lowest.
+
+Because GLoc is included at class level too, it becomes easy to associate languages with contexts.
+For example:
+ class Student
+ set_language :en
+ def say_hello
+ puts "We say #{l :hello} but our teachers say #{Teacher.l :hello}"
+ end
+ end
+
+=== Rules
+
+There are often situations when depending on the value of one or more variables, the surrounding text
+changes. The most common case of this is pluralization. Rather than hardcode these rules, they are
+completely definable by the user so that the user can eaasily accomodate for more complicated grammatical
+rules such as those found in Russian and Polish (or so I hear). To define a rule, simply include a string
+in the string bundle whose key begins with "_gloc_rule_" and then write ruby code as the value. The ruby
+code will be converted to a Proc when the string bundle is first read, and should return a prefix that will
+be appended to the string key at runtime to point to a new string. Make sense? Probably not... Please look
+at the following example and I am sure it will all make sense.
+
+Simple example (string bundle / en.yml)
+ _gloc_rule_default: ' |n| n==1 ? "_single" : "_plural" '
+ man_count_plural: There are %d men.
+ man_count_single: There is 1 man.
+
+Simple example (code)
+ lwr(:man_count, 1) # => There is 1 man.
+ lwr(:man_count, 8) # => There are 8 men.
+
+To use rules other than the default simply call lwr_ instead of lwr, and specify the rule.
+
+Example #2 (string bundle / en.yml)
+ _gloc_rule_default: ' |n| n==1 ? "_single" : "_plural" '
+ _gloc_rule_custom: ' |n| return "_none" if n==0; return "_heaps" if n>100; n==1 ? "_single" : "_plural" '
+ man_count_none: There are no men.
+ man_count_heaps: There are heaps of men!!
+ man_count_plural: There are %d men.
+ man_count_single: There is 1 man.
+
+Example #2 (code)
+ lwr_(:custom, :man_count, 0) # => There are no men.
+ lwr_(:custom, :man_count, 1) # => There is 1 man.
+ lwr_(:custom, :man_count, 8) # => There are 8 men.
+ lwr_(:custom, :man_count, 150) # => There are heaps of men!!
+
+
+=== Helpers
+
+GLoc includes the following helpers:
+ l_age(age) # Returns a localized version of an age. eg "3 years old"
+ l_date(date) # Returns a date in a localized format
+ l_datetime(date) # Returns a date+time in a localized format
+ l_datetime_short(date) # Returns a date+time in a localized short format.
+ l_lang_name(l,dl=nil) # Returns the name of a language (you must supply your own strings)
+ l_strftime(date,fmt) # Formats a date/time in a localized format.
+ l_time(date) # Returns a time in a localized format
+ l_YesNo(value) # Returns localized string of "Yes" or "No" depending on the arg
+ l_yesno(value) # Returns localized string of "yes" or "no" depending on the arg
+
+=== Rails localization
+
+Not all of Rails is covered but the following functions are:
+ distance_of_time_in_words
+ select_day
+ select_month
+ select_year
+ add_options
+
+
+
+
+= FAQ
+
+==== How do I use it in engines?
+Simply put this in your init_engine.rb
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+That way your engines strings will be loaded when the engine is started. Just simply make sure that you load your application strings after you start your engines to safely override any engine strings.
+
+==== Why am I getting an Iconv::IllegalSequence error when calling GLoc.set_charset?
+By default GLoc loads all of its default strings at startup. For example, calling <tt>set_charset 'iso-2022-jp'</tt> will cause this error because Russian strings are loaded by default, and the Russian strings use characters that cannot be expressed in the ISO-2022-JP charset.
+Before calling <tt>set_charset</tt> you should call <tt>clear_strings_except</tt> to remove strings from any languages that you will not be using.
+Alternatively, you can simply specify the language(s) as follows, <tt>set_charset 'iso-2022-jp', :ja</tt>.
+
+==== How do I make GLoc ignore StringNotFoundErrors?
+Disable it as follows:
+ GLoc.set_config :raise_string_not_found_errors => false
diff --git a/redmine/vendor/plugins/gloc-1.1.0/Rakefile b/redmine/vendor/plugins/gloc-1.1.0/Rakefile
new file mode 100644
index 000000000..a5b8fe762
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/Rakefile
@@ -0,0 +1,15 @@
+Dir.glob("#{File.dirname(__FILE__)}/tasks/*.rake").each {|f| load f}
+
+task :default => 'gloc:sort'
+
+# RDoc task
+require 'rake/rdoctask'
+Rake::RDocTask.new() { |rdoc|
+ rdoc.rdoc_dir = 'doc'
+ rdoc.title = "GLoc Localization Library Documentation"
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README', 'CHANGELOG')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+ rdoc.rdoc_files.exclude('lib/gloc-dev.rb')
+ rdoc.rdoc_files.exclude('lib/gloc-config.rb')
+}
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionController/Filters/ClassMethods.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionController/Filters/ClassMethods.html
new file mode 100644
index 000000000..fba33b5b5
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionController/Filters/ClassMethods.html
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: ActionController::Filters::ClassMethods</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActionController::Filters::ClassMethods</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000001">autodetect_language_filter</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000001" class="method-detail">
+ <a name="M000001"></a>
+
+ <div class="method-heading">
+ <a href="#M000001" class="method-signature">
+ <span class="method-name">autodetect_language_filter</span><span class="method-args">(*args)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This filter attempts to auto-detect the clients desired language. It first
+checks the params, then a cookie and then the HTTP_ACCEPT_LANGUAGE request
+header. If a language is found to match or be similar to a currently valid
+language, then it sets the current_language of the controller.
+</p>
+<pre>
+ class ExampleController &lt; ApplicationController
+ set_language :en
+ autodetect_language_filter :except =&gt; 'monkey', :on_no_lang =&gt; :lang_not_autodetected_callback
+ autodetect_language_filter :only =&gt; 'monkey', :check_cookie =&gt; 'monkey_lang', :check_accept_header =&gt; false
+ ...
+ def lang_not_autodetected_callback
+ redirect_to somewhere
+ end
+ end
+</pre>
+<p>
+The <tt>args</tt> for this filter are exactly the same the arguments of
+<tt>before_filter</tt> with the following exceptions:
+</p>
+<ul>
+<li><tt>:check_params</tt> &#8212; If false, then params will not be checked
+for a language. If a String, then this will value will be used as the name
+of the param.
+
+</li>
+<li><tt>:check_cookie</tt> &#8212; If false, then the cookie will not be
+checked for a language. If a String, then this will value will be used as
+the name of the cookie.
+
+</li>
+<li><tt>:check_accept_header</tt> &#8212; If false, then HTTP_ACCEPT_LANGUAGE
+will not be checked for a language.
+
+</li>
+<li><tt>:on_set_lang</tt> &#8212; You can specify the name of a callback
+function to be called when the language is successfully detected and set.
+The param must be a Symbol or a String which is the name of the function.
+The callback function must accept one argument (the language) and must be
+instance level.
+
+</li>
+<li><tt>:on_no_lang</tt> &#8212; You can specify the name of a callback
+function to be called when the language couldn&#8217;t be detected
+automatically. The param must be a Symbol or a String which is the name of
+the function. The callback function must be instance level.
+
+</li>
+</ul>
+<p>
+You override the default names of the param or cookie by calling <tt><a
+href="../../GLoc.html#M000014">GLoc.set_config</a> :default_param_name
+=&gt; &#8216;new_param_name&#8216;</tt> and <tt><a
+href="../../GLoc.html#M000014">GLoc.set_config</a> :default_cookie_name
+=&gt; &#8216;new_cookie_name&#8216;</tt>.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000001-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 43</span>
+43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">autodetect_language_filter</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
+44: <span class="ruby-identifier">options</span>= <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">:</span> {}
+45: <span class="ruby-identifier">x</span>= <span class="ruby-value str">'Proc.new { |c| l= nil;'</span>
+46: <span class="ruby-comment cmt"># :check_params</span>
+47: <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">v</span>= <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:check_params</span>)) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
+48: <span class="ruby-identifier">name</span>= <span class="ruby-identifier">v</span> <span class="ruby-value">? </span><span class="ruby-node">&quot;:#{v}&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'GLoc.get_config(:default_param_name)'</span>
+49: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;l ||= GLoc.similar_language(c.params[#{name}]);&quot;</span>
+50: <span class="ruby-keyword kw">end</span>
+51: <span class="ruby-comment cmt"># :check_cookie</span>
+52: <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">v</span>= <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:check_cookie</span>)) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
+53: <span class="ruby-identifier">name</span>= <span class="ruby-identifier">v</span> <span class="ruby-value">? </span><span class="ruby-node">&quot;:#{v}&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'GLoc.get_config(:default_cookie_name)'</span>
+54: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;l ||= GLoc.similar_language(c.send(:cookies)[#{name}]);&quot;</span>
+55: <span class="ruby-keyword kw">end</span>
+56: <span class="ruby-comment cmt"># :check_accept_header</span>
+57: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:check_accept_header</span>) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
+58: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">%&lt;
+59: unless l
+60: a= c.request.env['HTTP_ACCEPT_LANGUAGE'].split(/,|;/) rescue nil
+61: a.each {|x| l ||= GLoc.similar_language(x)} if a
+62: end; &gt;</span>
+63: <span class="ruby-keyword kw">end</span>
+64: <span class="ruby-comment cmt"># Set language</span>
+65: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'ret= true;'</span>
+66: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'if l; c.set_language(l); c.headers[\'Content-Language\']= l.to_s; '</span>
+67: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:on_set_lang</span>)
+68: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;ret= c.#{options.delete(:on_set_lang)}(l);&quot;</span>
+69: <span class="ruby-keyword kw">end</span>
+70: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:on_no_lang</span>)
+71: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;else; ret= c.#{options.delete(:on_no_lang)};&quot;</span>
+72: <span class="ruby-keyword kw">end</span>
+73: <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'end; ret }'</span>
+74:
+75: <span class="ruby-comment cmt"># Create filter</span>
+76: <span class="ruby-identifier">block</span>= <span class="ruby-identifier">eval</span> <span class="ruby-identifier">x</span>
+77: <span class="ruby-identifier">before_filter</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
+78: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionMailer/Base.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionMailer/Base.html
new file mode 100644
index 000000000..056b23d85
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionMailer/Base.html
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: ActionMailer::Base</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">ActionMailer::Base</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+In addition to including <a href="../GLoc.html">GLoc</a>,
+<tt>render_message</tt> is also overridden so that mail templates contain
+the current language at the end of the file. Eg. <tt>deliver_hello</tt>
+will render <tt>hello_en.rhtml</tt>.
+</p>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="../GLoc.html">GLoc</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+ <div id="aliases-list">
+ <h3 class="section-bar">External Aliases</h3>
+
+ <div class="name-list">
+ <table summary="aliases">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">render_message</td>
+ <td>-></td>
+ <td class="context-item-value">render_message_without_gloc</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html
new file mode 100644
index 000000000..00767055d
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: ActionView::Base</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">ActionView::Base</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+<tt>initialize</tt> is overridden so that new instances of this class
+inherit the current language of the controller.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000046">new</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="../GLoc.html">GLoc</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+ <div id="aliases-list">
+ <h3 class="section-bar">External Aliases</h3>
+
+ <div class="name-list">
+ <table summary="aliases">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">initialize</td>
+ <td>-></td>
+ <td class="context-item-value">initialize_without_gloc</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000046" class="method-detail">
+ <a name="M000046"></a>
+
+ <div class="method-heading">
+ <a href="#M000046" class="method-signature">
+ <span class="method-name">new</span><span class="method-args">(base_path = nil, assigns_for_first_render = {}, controller = nil)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000046-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 109</span>
+109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base_path</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">assigns_for_first_render</span> = {}, <span class="ruby-identifier">controller</span> = <span class="ruby-keyword kw">nil</span>)
+110: <span class="ruby-identifier">initialize_without_gloc</span>(<span class="ruby-identifier">base_path</span>, <span class="ruby-identifier">assigns_for_first_render</span>, <span class="ruby-identifier">controller</span>)
+111: <span class="ruby-identifier">set_language</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">current_language</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">nil?</span>
+112: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html
new file mode 100644
index 000000000..84ca8fae3
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: ActionView::Helpers::DateHelper</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActionView::Helpers::DateHelper</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/gloc-rails-text_rb.html">
+ lib/gloc-rails-text.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000041">distance_of_time_in_words</a>&nbsp;&nbsp;
+ <a href="#M000042">select_day</a>&nbsp;&nbsp;
+ <a href="#M000043">select_month</a>&nbsp;&nbsp;
+ <a href="#M000044">select_year</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+ <div id="constants-list">
+ <h3 class="section-bar">Constants</h3>
+
+ <div class="name-list">
+ <table summary="Constants">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOCALIZED_HELPERS</td>
+ <td>=</td>
+ <td class="context-item-value">true</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOCALIZED_MONTHNAMES</td>
+ <td>=</td>
+ <td class="context-item-value">{}</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOCALIZED_ABBR_MONTHNAMES</td>
+ <td>=</td>
+ <td class="context-item-value">{}</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000041" class="method-detail">
+ <a name="M000041"></a>
+
+ <div class="method-heading">
+ <a href="#M000041" class="method-signature">
+ <span class="method-name">distance_of_time_in_words</span><span class="method-args">(from_time, to_time = 0, include_seconds = false)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method uses <tt>current_language</tt> to return a localized string.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000041-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 16</span>
+16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword kw">false</span>)
+17: <span class="ruby-identifier">from_time</span> = <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
+18: <span class="ruby-identifier">to_time</span> = <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
+19: <span class="ruby-identifier">distance_in_minutes</span> = (((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>)<span class="ruby-operator">/</span><span class="ruby-value">60</span>).<span class="ruby-identifier">round</span>
+20: <span class="ruby-identifier">distance_in_seconds</span> = ((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>).<span class="ruby-identifier">round</span>
+21:
+22: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_minutes</span>
+23: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">1</span>
+24: <span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">distance_in_minutes</span><span class="ruby-operator">==</span><span class="ruby-value">0</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_less_than</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_single</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">include_seconds</span>
+25: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_seconds</span>
+26: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">5</span>)
+27: <span class="ruby-keyword kw">when</span> <span class="ruby-value">6</span><span class="ruby-operator">..</span><span class="ruby-value">10</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">10</span>)
+28: <span class="ruby-keyword kw">when</span> <span class="ruby-value">11</span><span class="ruby-operator">..</span><span class="ruby-value">20</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">20</span>)
+29: <span class="ruby-keyword kw">when</span> <span class="ruby-value">21</span><span class="ruby-operator">..</span><span class="ruby-value">40</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_half</span>)
+30: <span class="ruby-keyword kw">when</span> <span class="ruby-value">41</span><span class="ruby-operator">..</span><span class="ruby-value">59</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_less_than</span>)
+31: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute</span>)
+32: <span class="ruby-keyword kw">end</span>
+33:
+34: <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span><span class="ruby-operator">..</span><span class="ruby-value">45</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute</span>, <span class="ruby-identifier">distance_in_minutes</span>)
+35: <span class="ruby-keyword kw">when</span> <span class="ruby-value">46</span><span class="ruby-operator">..</span><span class="ruby-value">90</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_hour_about_single</span>)
+36: <span class="ruby-keyword kw">when</span> <span class="ruby-value">90</span><span class="ruby-operator">..</span><span class="ruby-value">1440</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_hour_about</span>, (<span class="ruby-identifier">distance_in_minutes</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">60.0</span>).<span class="ruby-identifier">round</span>)
+37: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1441</span><span class="ruby-operator">..</span><span class="ruby-value">2880</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_day</span>, <span class="ruby-value">1</span>)
+38: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_day</span>, (<span class="ruby-identifier">distance_in_minutes</span> <span class="ruby-operator">/</span> <span class="ruby-value">1440</span>).<span class="ruby-identifier">round</span>)
+39: <span class="ruby-keyword kw">end</span>
+40: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000042" class="method-detail">
+ <a name="M000042"></a>
+
+ <div class="method-heading">
+ <a href="#M000042" class="method-signature">
+ <span class="method-name">select_day</span><span class="method-args">(date, options = {})</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method has been modified so that a localized string can be appended to
+the day numbers.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000042-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 43</span>
+43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_day</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
+44: <span class="ruby-identifier">day_options</span> = []
+45: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_day_prefix</span>
+46:
+47: <span class="ruby-value">1</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-value">31</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">day</span><span class="ruby-operator">|</span>
+48: <span class="ruby-identifier">day_options</span> <span class="ruby-operator">&lt;&lt;</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">day</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">day</span>) <span class="ruby-operator">?</span>
+49: <span class="ruby-node">%(&lt;option value=&quot;#{day}&quot; selected=&quot;selected&quot;&gt;#{day}#{prefix}&lt;/option&gt;\n)</span> <span class="ruby-operator">:</span>
+50: <span class="ruby-node">%(&lt;option value=&quot;#{day}&quot;&gt;#{day}#{prefix}&lt;/option&gt;\n)</span>
+51: )
+52: <span class="ruby-keyword kw">end</span>
+53:
+54: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'day'</span>, <span class="ruby-identifier">day_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
+55: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000043" class="method-detail">
+ <a name="M000043"></a>
+
+ <div class="method-heading">
+ <a href="#M000043" class="method-signature">
+ <span class="method-name">select_month</span><span class="method-args">(date, options = {})</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method has been modified so that
+</p>
+<ul>
+<li>the month names are localized.
+
+</li>
+<li>it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>,
+<tt>:start_month</tt>, <tt>:end_month</tt>
+
+</li>
+<li>a localized string can be appended to the month numbers when the
+<tt>:use_month_numbers</tt> option is specified.
+
+</li>
+</ul>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000043-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 61</span>
+61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_month</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
+62: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">current_language</span>)
+63: <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] = [<span class="ruby-value str">''</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_select_month_names</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>)
+64: <span class="ruby-constant">LOCALIZED_ABBR_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] = [<span class="ruby-value str">''</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_select_month_names_abbr</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>)
+65: <span class="ruby-keyword kw">end</span>
+66:
+67: <span class="ruby-identifier">month_options</span> = []
+68: <span class="ruby-identifier">month_names</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:use_short_month</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">LOCALIZED_ABBR_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] <span class="ruby-operator">:</span> <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>]
+69:
+70: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:min_date</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:max_date</span>)
+71: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">year</span>
+72: <span class="ruby-identifier">start_month</span>, <span class="ruby-identifier">end_month</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">month</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">month</span>
+73: <span class="ruby-keyword kw">end</span>
+74: <span class="ruby-keyword kw">end</span>
+75: <span class="ruby-identifier">start_month</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:start_month</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">start_month</span>
+76: <span class="ruby-identifier">end_month</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:end_month</span>] <span class="ruby-operator">||</span> <span class="ruby-value">12</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">end_month</span>
+77: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_month_prefix</span>
+78:
+79: <span class="ruby-identifier">start_month</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">end_month</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">month_number</span><span class="ruby-operator">|</span>
+80: <span class="ruby-identifier">month_name</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:use_month_numbers</span>]
+81: <span class="ruby-node">&quot;#{month_number}#{prefix}&quot;</span>
+82: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:add_month_numbers</span>]
+83: <span class="ruby-identifier">month_number</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">' - '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">month_names</span>[<span class="ruby-identifier">month_number</span>]
+84: <span class="ruby-keyword kw">else</span>
+85: <span class="ruby-identifier">month_names</span>[<span class="ruby-identifier">month_number</span>]
+86: <span class="ruby-keyword kw">end</span>
+87:
+88: <span class="ruby-identifier">month_options</span> <span class="ruby-operator">&lt;&lt;</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">month</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">month_number</span>) <span class="ruby-operator">?</span>
+89: <span class="ruby-node">%(&lt;option value=&quot;#{month_number}&quot; selected=&quot;selected&quot;&gt;#{month_name}&lt;/option&gt;\n)</span> <span class="ruby-operator">:</span>
+90: <span class="ruby-node">%(&lt;option value=&quot;#{month_number}&quot;&gt;#{month_name}&lt;/option&gt;\n)</span>
+91: )
+92: <span class="ruby-keyword kw">end</span>
+93:
+94: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'month'</span>, <span class="ruby-identifier">month_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
+95: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000044" class="method-detail">
+ <a name="M000044"></a>
+
+ <div class="method-heading">
+ <a href="#M000044" class="method-signature">
+ <span class="method-name">select_year</span><span class="method-args">(date, options = {})</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method has been modified so that
+</p>
+<ul>
+<li>it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>
+
+</li>
+<li>a localized string can be appended to the years numbers.
+
+</li>
+</ul>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000044-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 100</span>
+100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_year</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
+101: <span class="ruby-identifier">year_options</span> = []
+102: <span class="ruby-identifier">y</span> = <span class="ruby-identifier">date</span> <span class="ruby-value">? </span>(<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> (<span class="ruby-identifier">y</span> = (<span class="ruby-identifier">date</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>.<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">year</span>) <span class="ruby-operator">:</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>.<span class="ruby-identifier">year</span>
+103:
+104: <span class="ruby-identifier">start_year</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:min_date</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:start_year</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">y</span><span class="ruby-operator">-</span><span class="ruby-value">5</span>)
+105: <span class="ruby-identifier">end_year</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:max_date</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:end_year</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>)
+106: <span class="ruby-identifier">step_val</span> = <span class="ruby-identifier">start_year</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">end_year</span> <span class="ruby-value">? </span><span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">-1</span>
+107: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_year_prefix</span>
+108:
+109: <span class="ruby-identifier">start_year</span>.<span class="ruby-identifier">step</span>(<span class="ruby-identifier">end_year</span>, <span class="ruby-identifier">step_val</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">year</span><span class="ruby-operator">|</span>
+110: <span class="ruby-identifier">year_options</span> <span class="ruby-operator">&lt;&lt;</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">year</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">year</span>) <span class="ruby-operator">?</span>
+111: <span class="ruby-node">%(&lt;option value=&quot;#{year}&quot; selected=&quot;selected&quot;&gt;#{year}#{prefix}&lt;/option&gt;\n)</span> <span class="ruby-operator">:</span>
+112: <span class="ruby-node">%(&lt;option value=&quot;#{year}&quot;&gt;#{year}#{prefix}&lt;/option&gt;\n)</span>
+113: )
+114: <span class="ruby-keyword kw">end</span>
+115:
+116: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'year'</span>, <span class="ruby-identifier">year_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
+117: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html
new file mode 100644
index 000000000..a236e0e5d
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: ActionView::Helpers::InstanceTag</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">ActionView::Helpers::InstanceTag</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/gloc-rails-text_rb.html">
+ lib/gloc-rails-text.rb
+ </a>
+ <br />
+ <a href="../../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+The private method <tt>add_options</tt> is overridden so that &quot;Please
+select&quot; is localized.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000045">current_language</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="../../GLoc.html">GLoc</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000045" class="method-detail">
+ <a name="M000045"></a>
+
+ <div class="method-heading">
+ <a href="#M000045" class="method-signature">
+ <span class="method-name">current_language</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Inherits the current language from the template object.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000045-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 119</span>
+119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
+120: <span class="ruby-ivar">@template_object</span>.<span class="ruby-identifier">current_language</span>
+121: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Errors.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Errors.html
new file mode 100644
index 000000000..9a16f608b
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Errors.html
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: ActiveRecord::Errors</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">ActiveRecord::Errors</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000039">add</a>&nbsp;&nbsp;
+ <a href="#M000040">current_language</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="../GLoc.html">GLoc</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+ <div id="aliases-list">
+ <h3 class="section-bar">External Aliases</h3>
+
+ <div class="name-list">
+ <table summary="aliases">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">add</td>
+ <td>-></td>
+ <td class="context-item-value">add_without_gloc</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000039" class="method-detail">
+ <a name="M000039"></a>
+
+ <div class="method-heading">
+ <a href="#M000039" class="method-signature">
+ <span class="method-name">add</span><span class="method-args">(attribute, msg= @@default_error_messages[:invalid])</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+The <a href="../GLoc.html">GLoc</a> version of this method provides two
+extra features
+</p>
+<ul>
+<li>If <tt>msg</tt> is a string, it will be considered a <a
+href="../GLoc.html">GLoc</a> string key.
+
+</li>
+<li>If <tt>msg</tt> is an array, the first element will be considered the
+string and the remaining elements will be considered arguments for the
+string. Eg. <tt>[&#8216;Hi %s.&#8217;,&#8217;John&#8217;]</tt>
+
+</li>
+</ul>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000039-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 141</span>
+141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">attribute</span>, <span class="ruby-identifier">msg</span>= <span class="ruby-ivar">@@default_error_messages</span>[<span class="ruby-identifier">:invalid</span>])
+142: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
+143: <span class="ruby-identifier">args</span>= <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">clone</span>
+144: <span class="ruby-identifier">msg</span>= <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
+145: <span class="ruby-identifier">args</span>= <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
+146: <span class="ruby-keyword kw">end</span>
+147: <span class="ruby-identifier">msg</span>= <span class="ruby-identifier">ltry</span>(<span class="ruby-identifier">msg</span>)
+148: <span class="ruby-identifier">msg</span>= <span class="ruby-identifier">msg</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">args</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">nil?</span>
+149: <span class="ruby-identifier">add_without_gloc</span>(<span class="ruby-identifier">attribute</span>, <span class="ruby-identifier">msg</span>)
+150: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000040" class="method-detail">
+ <a name="M000040"></a>
+
+ <div class="method-heading">
+ <a href="#M000040" class="method-signature">
+ <span class="method-name">current_language</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Inherits the current language from the base record.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000040-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 152</span>
+152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
+153: <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">current_language</span>
+154: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Validations/ClassMethods.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Validations/ClassMethods.html
new file mode 100644
index 000000000..145a74c2b
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Validations/ClassMethods.html
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: ActiveRecord::Validations::ClassMethods</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActiveRecord::Validations::ClassMethods</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000037">validates_length_of</a>&nbsp;&nbsp;
+ <a href="#M000038">validates_size_of</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000037" class="method-detail">
+ <a name="M000037"></a>
+
+ <div class="method-heading">
+ <a href="#M000037" class="method-signature">
+ <span class="method-name">validates_length_of</span><span class="method-args">(*attrs)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+The default Rails version of this function creates an error message and
+then passes it to <a href="../Errors.html">ActiveRecord.Errors</a>. The <a
+href="../../GLoc.html">GLoc</a> version of this method, sends an array to
+<a href="../Errors.html">ActiveRecord.Errors</a> that will be turned into a
+string by <a href="../Errors.html">ActiveRecord.Errors</a> which in turn
+allows for the message of this validation function to be a <a
+href="../../GLoc.html">GLoc</a> string key.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000037-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 164</span>
+164: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validates_length_of</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">attrs</span>)
+165: <span class="ruby-comment cmt"># Merge given options with defaults.</span>
+166: <span class="ruby-identifier">options</span> = {
+167: <span class="ruby-identifier">:too_long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span>.<span class="ruby-identifier">default_error_messages</span>[<span class="ruby-identifier">:too_long</span>],
+168: <span class="ruby-identifier">:too_short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span>.<span class="ruby-identifier">default_error_messages</span>[<span class="ruby-identifier">:too_short</span>],
+169: <span class="ruby-identifier">:wrong_length</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span>.<span class="ruby-identifier">default_error_messages</span>[<span class="ruby-identifier">:wrong_length</span>]
+170: }.<span class="ruby-identifier">merge</span>(<span class="ruby-constant">DEFAULT_VALIDATION_OPTIONS</span>)
+171: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">pop</span>.<span class="ruby-identifier">symbolize_keys</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
+172:
+173: <span class="ruby-comment cmt"># Ensure that one and only one range option is specified.</span>
+174: <span class="ruby-identifier">range_options</span> = <span class="ruby-constant">ALL_RANGE_OPTIONS</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">keys</span>
+175: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">range_options</span>.<span class="ruby-identifier">size</span>
+176: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
+177: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'</span>
+178: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
+179: <span class="ruby-comment cmt"># Valid number of options; do nothing.</span>
+180: <span class="ruby-keyword kw">else</span>
+181: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Too many range options specified. Choose only one.'</span>
+182: <span class="ruby-keyword kw">end</span>
+183:
+184: <span class="ruby-comment cmt"># Get range option and value.</span>
+185: <span class="ruby-identifier">option</span> = <span class="ruby-identifier">range_options</span>.<span class="ruby-identifier">first</span>
+186: <span class="ruby-identifier">option_value</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">range_options</span>.<span class="ruby-identifier">first</span>]
+187:
+188: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">option</span>
+189: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:within</span>, <span class="ruby-identifier">:in</span>
+190: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;:#{option} must be a Range&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Range</span>)
+191:
+192: <span class="ruby-identifier">too_short</span> = [<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:too_short</span>] , <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">begin</span>]
+193: <span class="ruby-identifier">too_long</span> = [<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:too_long</span>] , <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">end</span> ]
+194:
+195: <span class="ruby-identifier">validates_each</span>(<span class="ruby-identifier">attrs</span>, <span class="ruby-identifier">options</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">record</span>, <span class="ruby-identifier">attr</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
+196: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">//</span>).<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">begin</span>
+197: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">too_short</span>)
+198: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">//</span>).<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">end</span>
+199: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">too_long</span>)
+200: <span class="ruby-keyword kw">end</span>
+201: <span class="ruby-keyword kw">end</span>
+202: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:is</span>, <span class="ruby-identifier">:minimum</span>, <span class="ruby-identifier">:maximum</span>
+203: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;:#{option} must be a nonnegative Integer&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Integer</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">option_value</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">0</span>
+204:
+205: <span class="ruby-comment cmt"># Declare different validations per option.</span>
+206: <span class="ruby-identifier">validity_checks</span> = { <span class="ruby-identifier">:is</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;==&quot;</span>, <span class="ruby-identifier">:minimum</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&gt;=&quot;</span>, <span class="ruby-identifier">:maximum</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&lt;=&quot;</span> }
+207: <span class="ruby-identifier">message_options</span> = { <span class="ruby-identifier">:is</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:wrong_length</span>, <span class="ruby-identifier">:minimum</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:too_short</span>, <span class="ruby-identifier">:maximum</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:too_long</span> }
+208:
+209: <span class="ruby-identifier">message</span> = [(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:message</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">message_options</span>[<span class="ruby-identifier">option</span>]]) , <span class="ruby-identifier">option_value</span>]
+210:
+211: <span class="ruby-identifier">validates_each</span>(<span class="ruby-identifier">attrs</span>, <span class="ruby-identifier">options</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">record</span>, <span class="ruby-identifier">attr</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
+212: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">String</span>)
+213: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">message</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-operator">!</span><span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">//</span>).<span class="ruby-identifier">size</span>.<span class="ruby-identifier">method</span>(<span class="ruby-identifier">validity_checks</span>[<span class="ruby-identifier">option</span>])[<span class="ruby-identifier">option_value</span>]
+214: <span class="ruby-keyword kw">else</span>
+215: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">message</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-operator">!</span><span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">method</span>(<span class="ruby-identifier">validity_checks</span>[<span class="ruby-identifier">option</span>])[<span class="ruby-identifier">option_value</span>]
+216: <span class="ruby-keyword kw">end</span>
+217: <span class="ruby-keyword kw">end</span>
+218: <span class="ruby-keyword kw">end</span>
+219: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000038" class="method-detail">
+ <a name="M000038"></a>
+
+ <div class="method-heading">
+ <span class="method-name">validates_size_of</span><span class="method-args">(*attrs)</span>
+ </div>
+
+ <div class="method-description">
+ <p>
+Alias for <a href="ClassMethods.html#M000037">validates_length_of</a>
+</p>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc.html
new file mode 100644
index 000000000..8a25c7de8
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc.html
@@ -0,0 +1,774 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: GLoc</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">GLoc</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../files/lib/gloc-helpers_rb.html">
+ lib/gloc-helpers.rb
+ </a>
+ <br />
+ <a href="../files/lib/gloc-internal_rb.html">
+ lib/gloc-internal.rb
+ </a>
+ <br />
+ <a href="../files/lib/gloc-version_rb.html">
+ lib/gloc-version.rb
+ </a>
+ <br />
+ <a href="../files/lib/gloc_rb.html">
+ lib/gloc.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Copyright &#169; 2005-2006 David Barri
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000004">add_localized_strings</a>&nbsp;&nbsp;
+ <a href="#M000005">backup_state</a>&nbsp;&nbsp;
+ <a href="#M000006">clear_strings</a>&nbsp;&nbsp;
+ <a href="#M000007">clear_strings_except</a>&nbsp;&nbsp;
+ <a href="#M000002">current_language</a>&nbsp;&nbsp;
+ <a href="#M000003">current_language</a>&nbsp;&nbsp;
+ <a href="#M000008">get_charset</a>&nbsp;&nbsp;
+ <a href="#M000009">get_config</a>&nbsp;&nbsp;
+ <a href="#M000010">load_gloc_default_localized_strings</a>&nbsp;&nbsp;
+ <a href="#M000011">load_localized_strings</a>&nbsp;&nbsp;
+ <a href="#M000012">restore_state</a>&nbsp;&nbsp;
+ <a href="#M000013">set_charset</a>&nbsp;&nbsp;
+ <a href="#M000014">set_config</a>&nbsp;&nbsp;
+ <a href="#M000015">set_kcode</a>&nbsp;&nbsp;
+ <a href="#M000016">similar_language</a>&nbsp;&nbsp;
+ <a href="#M000018">valid_language?</a>&nbsp;&nbsp;
+ <a href="#M000017">valid_languages</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="GLoc/InstanceMethods.html">::GLoc::InstanceMethods</a></span>
+ <span class="include-name"><a href="GLoc/InstanceMethods.html">::GLoc::InstanceMethods</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Module <a href="GLoc/ClassMethods.html" class="link">GLoc::ClassMethods</a><br />
+Module <a href="GLoc/Helpers.html" class="link">GLoc::Helpers</a><br />
+Module <a href="GLoc/InstanceMethods.html" class="link">GLoc::InstanceMethods</a><br />
+
+ </div>
+
+ <div id="constants-list">
+ <h3 class="section-bar">Constants</h3>
+
+ <div class="name-list">
+ <table summary="Constants">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOCALIZED_STRINGS</td>
+ <td>=</td>
+ <td class="context-item-value">{}</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">RULES</td>
+ <td>=</td>
+ <td class="context-item-value">{}</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOWERCASE_LANGUAGES</td>
+ <td>=</td>
+ <td class="context-item-value">{}</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">UTF_8</td>
+ <td>=</td>
+ <td class="context-item-value">'utf-8'</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">SHIFT_JIS</td>
+ <td>=</td>
+ <td class="context-item-value">'sjis'</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">EUC_JP</td>
+ <td>=</td>
+ <td class="context-item-value">'euc-jp'</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <div id="aliases-list">
+ <h3 class="section-bar">External Aliases</h3>
+
+ <div class="name-list">
+ <table summary="aliases">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">clear_strings</td>
+ <td>-></td>
+ <td class="context-item-value">_clear_strings</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000004" class="method-detail">
+ <a name="M000004"></a>
+
+ <div class="method-heading">
+ <a href="#M000004" class="method-signature">
+ <span class="method-name">add_localized_strings</span><span class="method-args">(lang, symbol_hash, override=true, strings_charset=nil)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Adds a collection of localized strings to the in-memory string store.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000004-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 113</span>
+113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_localized_strings</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol_hash</span>, <span class="ruby-identifier">override</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">strings_charset</span>=<span class="ruby-keyword kw">nil</span>)
+114: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">&quot;Adding #{symbol_hash.size} #{lang} strings.&quot;</span>}
+115: <span class="ruby-identifier">_add_localized_strings</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol_hash</span>, <span class="ruby-identifier">override</span>, <span class="ruby-identifier">strings_charset</span>)
+116: <span class="ruby-identifier">_verbose_msg</span> <span class="ruby-identifier">:stats</span>
+117: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000005" class="method-detail">
+ <a name="M000005"></a>
+
+ <div class="method-heading">
+ <a href="#M000005" class="method-signature">
+ <span class="method-name">backup_state</span><span class="method-args">(clear=false)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Creates a backup of the internal state of <a href="GLoc.html">GLoc</a> (ie.
+strings, langs, rules, config) and optionally clears everything.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000005-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 121</span>
+121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backup_state</span>(<span class="ruby-identifier">clear</span>=<span class="ruby-keyword kw">false</span>)
+122: <span class="ruby-identifier">s</span>= <span class="ruby-identifier">_get_internal_state_vars</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">clone</span>}
+123: <span class="ruby-identifier">_get_internal_state_vars</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">clear</span>} <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">clear</span>
+124: <span class="ruby-identifier">s</span>
+125: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000006" class="method-detail">
+ <a name="M000006"></a>
+
+ <div class="method-heading">
+ <a href="#M000006" class="method-signature">
+ <span class="method-name">clear_strings</span><span class="method-args">(*languages)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Removes all localized strings from memory, either of a certain language (or
+languages), or entirely.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000006-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 129</span>
+129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_strings</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">languages</span>)
+130: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">languages</span>.<span class="ruby-identifier">empty?</span>
+131: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-value str">&quot;Clearing all strings&quot;</span>}
+132: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">clear</span>
+133: <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">clear</span>
+134: <span class="ruby-keyword kw">else</span>
+135: <span class="ruby-identifier">languages</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
+136: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">&quot;Clearing :#{l} strings&quot;</span>}
+137: <span class="ruby-identifier">l</span>= <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to_sym</span>
+138: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">l</span>
+139: <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">each_pair</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">k</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">l</span>}
+140: }
+141: <span class="ruby-keyword kw">end</span>
+142: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000007" class="method-detail">
+ <a name="M000007"></a>
+
+ <div class="method-heading">
+ <a href="#M000007" class="method-signature">
+ <span class="method-name">clear_strings_except</span><span class="method-args">(*languages)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Removes all localized strings from memory, except for those of certain
+specified languages.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000007-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 146</span>
+146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_strings_except</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">languages</span>)
+147: <span class="ruby-identifier">clear</span>= (<span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">languages</span>)
+148: <span class="ruby-identifier">_clear_strings</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">clear</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">clear</span>.<span class="ruby-identifier">empty?</span>
+149: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000003" class="method-detail">
+ <a name="M000003"></a>
+
+ <div class="method-heading">
+ <a href="#M000003" class="method-signature">
+ <span class="method-name">current_language</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the default language
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000003-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 108</span>
+108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
+109: <span class="ruby-constant">GLoc</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:default_language</span>]
+110: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000008" class="method-detail">
+ <a name="M000008"></a>
+
+ <div class="method-heading">
+ <a href="#M000008" class="method-signature">
+ <span class="method-name">get_charset</span><span class="method-args">(lang)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the charset used to store localized strings in memory.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000008-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 152</span>
+152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">lang</span>)
+153: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>][<span class="ruby-identifier">lang</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset</span>]
+154: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000009" class="method-detail">
+ <a name="M000009"></a>
+
+ <div class="method-heading">
+ <a href="#M000009" class="method-signature">
+ <span class="method-name">get_config</span><span class="method-args">(key)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a <a href="GLoc.html">GLoc</a> configuration value.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000009-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 157</span>
+157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_config</span>(<span class="ruby-identifier">key</span>)
+158: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">key</span>]
+159: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000010" class="method-detail">
+ <a name="M000010"></a>
+
+ <div class="method-heading">
+ <a href="#M000010" class="method-signature">
+ <span class="method-name">load_gloc_default_localized_strings</span><span class="method-args">(override=false)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Loads the localized strings that are included in the <a
+href="GLoc.html">GLoc</a> library.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000010-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 162</span>
+162: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_gloc_default_localized_strings</span>(<span class="ruby-identifier">override</span>=<span class="ruby-keyword kw">false</span>)
+163: <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">load_localized_strings</span> <span class="ruby-node">&quot;#{File.dirname(__FILE__)}/../lang&quot;</span>, <span class="ruby-identifier">override</span>
+164: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000011" class="method-detail">
+ <a name="M000011"></a>
+
+ <div class="method-heading">
+ <a href="#M000011" class="method-signature">
+ <span class="method-name">load_localized_strings</span><span class="method-args">(dir=nil, override=true)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Loads localized strings from all yml files in the specifed directory.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000011-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 167</span>
+167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_localized_strings</span>(<span class="ruby-identifier">dir</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">override</span>=<span class="ruby-keyword kw">true</span>)
+168: <span class="ruby-identifier">_charset_required</span>
+169: <span class="ruby-identifier">_get_lang_file_list</span>(<span class="ruby-identifier">dir</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
+170:
+171: <span class="ruby-comment cmt"># Load file</span>
+172: <span class="ruby-identifier">raw_hash</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>))
+173: <span class="ruby-identifier">raw_hash</span>={} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">raw_hash</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Hash</span>)
+174: <span class="ruby-identifier">filename</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/([^\/\\]+)\.ya?ml$/</span>
+175: <span class="ruby-identifier">lang</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">to_sym</span>
+176: <span class="ruby-identifier">file_charset</span> = <span class="ruby-identifier">raw_hash</span>[<span class="ruby-value str">'file_charset'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">UTF_8</span>
+177:
+178: <span class="ruby-comment cmt"># Convert string keys to symbols</span>
+179: <span class="ruby-identifier">dest_charset</span>= <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">lang</span>)
+180: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">&quot;Reading file #{filename} [charset: #{file_charset} --&gt; #{dest_charset}]&quot;</span>}
+181: <span class="ruby-identifier">symbol_hash</span> = {}
+182: <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dest_charset</span>, <span class="ruby-identifier">file_charset</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
+183: <span class="ruby-identifier">raw_hash</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
+184: <span class="ruby-identifier">symbol_hash</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">iconv</span>(<span class="ruby-identifier">value</span>)
+185: }
+186: <span class="ruby-keyword kw">end</span>
+187:
+188: <span class="ruby-comment cmt"># Add strings to repos</span>
+189: <span class="ruby-identifier">_add_localized_strings</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol_hash</span>, <span class="ruby-identifier">override</span>)
+190: }
+191: <span class="ruby-identifier">_verbose_msg</span> <span class="ruby-identifier">:stats</span>
+192: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000012" class="method-detail">
+ <a name="M000012"></a>
+
+ <div class="method-heading">
+ <a href="#M000012" class="method-signature">
+ <span class="method-name">restore_state</span><span class="method-args">(state)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Restores a backup of <a href="GLoc.html">GLoc</a>&#8217;s internal state
+that was made with <a href="GLoc.html#M000005">backup_state</a>.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000012-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 195</span>
+195: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_state</span>(<span class="ruby-identifier">state</span>)
+196: <span class="ruby-identifier">_get_internal_state_vars</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
+197: <span class="ruby-identifier">o</span>.<span class="ruby-identifier">clear</span>
+198: <span class="ruby-identifier">o</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:merge!</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">:merge!</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:concat</span>, <span class="ruby-identifier">state</span>.<span class="ruby-identifier">shift</span>
+199: <span class="ruby-keyword kw">end</span>
+200: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000013" class="method-detail">
+ <a name="M000013"></a>
+
+ <div class="method-heading">
+ <a href="#M000013" class="method-signature">
+ <span class="method-name">set_charset</span><span class="method-args">(new_charset, *langs)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Sets the charset used to internally store localized strings. You can set
+the charset to use for a specific language or languages, or if none are
+specified the charset for ALL localized strings will be set.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000013-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 205</span>
+205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_charset</span>(<span class="ruby-identifier">new_charset</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">langs</span>)
+206: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>] <span class="ruby-operator">||=</span> {}
+207:
+208: <span class="ruby-comment cmt"># Convert symbol shortcuts</span>
+209: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_charset</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
+210: <span class="ruby-identifier">new_charset</span>= <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">new_charset</span>
+211: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:utf8</span>, <span class="ruby-identifier">:utf_8</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">UTF_8</span>
+212: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:sjis</span>, <span class="ruby-identifier">:shift_jis</span>, <span class="ruby-identifier">:shiftjis</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">SHIFT_JIS</span>
+213: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:eucjp</span>, <span class="ruby-identifier">:euc_jp</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">EUC_JP</span>
+214: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">new_charset</span>.<span class="ruby-identifier">to_s</span>
+215: <span class="ruby-keyword kw">end</span>
+216: <span class="ruby-keyword kw">end</span>
+217:
+218: <span class="ruby-comment cmt"># Convert existing strings</span>
+219: (<span class="ruby-identifier">langs</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span><span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">langs</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lang</span><span class="ruby-operator">|</span>
+220: <span class="ruby-identifier">cur_charset</span>= <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">lang</span>)
+221: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cur_charset</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">new_charset</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">cur_charset</span>
+222: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">&quot;Converting :#{lang} strings from #{cur_charset} to #{new_charset}&quot;</span>}
+223: <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">new_charset</span>, <span class="ruby-identifier">cur_charset</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
+224: <span class="ruby-identifier">bundle</span>= <span class="ruby-constant">LOCALIZED_STRINGS</span>[<span class="ruby-identifier">lang</span>]
+225: <span class="ruby-identifier">bundle</span>.<span class="ruby-identifier">each_pair</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">bundle</span>[<span class="ruby-identifier">k</span>]= <span class="ruby-identifier">i</span>.<span class="ruby-identifier">iconv</span>(<span class="ruby-identifier">v</span>)}
+226: <span class="ruby-keyword kw">end</span>
+227: <span class="ruby-keyword kw">end</span>
+228: <span class="ruby-keyword kw">end</span>
+229:
+230: <span class="ruby-comment cmt"># Set new charset value</span>
+231: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">langs</span>.<span class="ruby-identifier">empty?</span>
+232: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">&quot;Setting GLoc charset for all languages to #{new_charset}&quot;</span>}
+233: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset</span>]= <span class="ruby-identifier">new_charset</span>
+234: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>].<span class="ruby-identifier">clear</span>
+235: <span class="ruby-keyword kw">else</span>
+236: <span class="ruby-identifier">langs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lang</span><span class="ruby-operator">|</span>
+237: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">&quot;Setting GLoc charset for :#{lang} strings to #{new_charset}&quot;</span>}
+238: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>][<span class="ruby-identifier">lang</span>]= <span class="ruby-identifier">new_charset</span>
+239: <span class="ruby-keyword kw">end</span>
+240: <span class="ruby-keyword kw">end</span>
+241: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000014" class="method-detail">
+ <a name="M000014"></a>
+
+ <div class="method-heading">
+ <a href="#M000014" class="method-signature">
+ <span class="method-name">set_config</span><span class="method-args">(hash)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Sets <a href="GLoc.html">GLoc</a> configuration values.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000014-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 244</span>
+244: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_config</span>(<span class="ruby-identifier">hash</span>)
+245: <span class="ruby-constant">CONFIG</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">hash</span>
+246: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000015" class="method-detail">
+ <a name="M000015"></a>
+
+ <div class="method-heading">
+ <a href="#M000015" class="method-signature">
+ <span class="method-name">set_kcode</span><span class="method-args">(charset=nil)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Sets the $KCODE global variable according to a specified charset, or else
+the current default charset for the default language.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000015-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 250</span>
+250: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_kcode</span>(<span class="ruby-identifier">charset</span>=<span class="ruby-keyword kw">nil</span>)
+251: <span class="ruby-identifier">_charset_required</span>
+252: <span class="ruby-identifier">charset</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">current_language</span>)
+253: <span class="ruby-identifier">$KCODE</span>= <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">charset</span>
+254: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">UTF_8</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">'u'</span>
+255: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">SHIFT_JIS</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">'s'</span>
+256: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">EUC_JP</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">'e'</span>
+257: <span class="ruby-keyword kw">else</span> <span class="ruby-value str">'n'</span>
+258: <span class="ruby-keyword kw">end</span>
+259: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">&quot;$KCODE set to #{$KCODE}&quot;</span>}
+260: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000016" class="method-detail">
+ <a name="M000016"></a>
+
+ <div class="method-heading">
+ <a href="#M000016" class="method-signature">
+ <span class="method-name">similar_language</span><span class="method-args">(lang)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Tries to find a valid language that is similar to the argument passed. Eg.
+:en, :en_au, :EN_US are all similar languages. Returns <tt>nil</tt> if no
+similar languages are found.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000016-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 265</span>
+265: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">similar_language</span>(<span class="ruby-identifier">lang</span>)
+266: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">nil?</span>
+267: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_language?</span>(<span class="ruby-identifier">lang</span>)
+268: <span class="ruby-comment cmt"># Check lowercase without dashes</span>
+269: <span class="ruby-identifier">lang</span>= <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'-'</span>,<span class="ruby-value str">'_'</span>)
+270: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>[<span class="ruby-identifier">lang</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">lang</span>)
+271: <span class="ruby-comment cmt"># Check without dialect</span>
+272: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^([a-z]+?)[^a-z].*/</span>
+273: <span class="ruby-identifier">lang</span>= <span class="ruby-identifier">$1</span>
+274: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>[<span class="ruby-identifier">lang</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">lang</span>)
+275: <span class="ruby-keyword kw">end</span>
+276: <span class="ruby-comment cmt"># Check other dialects</span>
+277: <span class="ruby-identifier">lang</span>= <span class="ruby-node">&quot;#{lang}_&quot;</span>
+278: <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">return</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>[<span class="ruby-identifier">k</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">starts_with?</span>(<span class="ruby-identifier">lang</span>)}
+279: <span class="ruby-comment cmt"># Nothing found</span>
+280: <span class="ruby-keyword kw">nil</span>
+281: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000018" class="method-detail">
+ <a name="M000018"></a>
+
+ <div class="method-heading">
+ <a href="#M000018" class="method-signature">
+ <span class="method-name">valid_language?</span><span class="method-args">(language)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns <tt>true</tt> if there are any localized strings for a specified
+language. Note that although <tt>set_langauge nil</tt> is perfectly valid,
+<tt>nil</tt> is not a valid language.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000018-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 290</span>
+290: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_language?</span>(<span class="ruby-identifier">language</span>)
+291: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">language</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">false</span>
+292: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000017" class="method-detail">
+ <a name="M000017"></a>
+
+ <div class="method-heading">
+ <a href="#M000017" class="method-signature">
+ <span class="method-name">valid_languages</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns an array of (currently) valid languages (ie. languages for which
+localized data exists).
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000017-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 284</span>
+284: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_languages</span>
+285: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">keys</span>
+286: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000002" class="method-detail">
+ <a name="M000002"></a>
+
+ <div class="method-heading">
+ <a href="#M000002" class="method-signature">
+ <span class="method-name">current_language</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the instance-level current language, or if not set, returns the
+class-level current language.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000002-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 77</span>
+77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
+78: <span class="ruby-ivar">@gloc_language</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">current_language</span>
+79: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/ClassMethods.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/ClassMethods.html
new file mode 100644
index 000000000..ba1a28ad0
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/ClassMethods.html
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: GLoc::ClassMethods</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">GLoc::ClassMethods</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/gloc_rb.html">
+ lib/gloc.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+All classes/modules that include <a href="../GLoc.html">GLoc</a> will also
+gain these class methods. Notice that the <a
+href="InstanceMethods.html">GLoc::InstanceMethods</a> module is also
+included.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000019">current_language</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="InstanceMethods.html">::GLoc::InstanceMethods</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000019" class="method-detail">
+ <a name="M000019"></a>
+
+ <div class="method-heading">
+ <a href="#M000019" class="method-signature">
+ <span class="method-name">current_language</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the current language, or if not set, returns the <a
+href="../GLoc.html">GLoc</a> current language.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000019-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 89</span>
+89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
+90: <span class="ruby-ivar">@gloc_language</span> <span class="ruby-operator">||</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">current_language</span>
+91: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html
new file mode 100644
index 000000000..f3fdf63e1
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: GLoc::Helpers</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">GLoc::Helpers</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/gloc-helpers_rb.html">
+ lib/gloc-helpers.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+These helper methods will be included in the <a
+href="InstanceMethods.html">InstanceMethods</a> module.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000026">l_YesNo</a>&nbsp;&nbsp;
+ <a href="#M000020">l_age</a>&nbsp;&nbsp;
+ <a href="#M000021">l_date</a>&nbsp;&nbsp;
+ <a href="#M000022">l_datetime</a>&nbsp;&nbsp;
+ <a href="#M000023">l_datetime_short</a>&nbsp;&nbsp;
+ <a href="#M000028">l_lang_name</a>&nbsp;&nbsp;
+ <a href="#M000024">l_strftime</a>&nbsp;&nbsp;
+ <a href="#M000025">l_time</a>&nbsp;&nbsp;
+ <a href="#M000027">l_yesno</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000026" class="method-detail">
+ <a name="M000026"></a>
+
+ <div class="method-heading">
+ <a href="#M000026" class="method-signature">
+ <span class="method-name">l_YesNo</span><span class="method-args">(value)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000026-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 12</span>
+12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_YesNo</span>(<span class="ruby-identifier">value</span>) <span class="ruby-identifier">l</span>(<span class="ruby-identifier">value</span> <span class="ruby-value">? </span><span class="ruby-operator">:</span><span class="ruby-identifier">general_text_Yes</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:general_text_No</span>) <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000020" class="method-detail">
+ <a name="M000020"></a>
+
+ <div class="method-heading">
+ <a href="#M000020" class="method-signature">
+ <span class="method-name">l_age</span><span class="method-args">(age)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000020-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 6</span>
+6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_age</span>(<span class="ruby-identifier">age</span>) <span class="ruby-identifier">lwr</span> <span class="ruby-operator">:</span><span class="ruby-identifier">general_fmt_age</span>, <span class="ruby-identifier">age</span> <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000021" class="method-detail">
+ <a name="M000021"></a>
+
+ <div class="method-heading">
+ <a href="#M000021" class="method-signature">
+ <span class="method-name">l_date</span><span class="method-args">(date)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000021-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 7</span>
+7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_date</span>(<span class="ruby-identifier">date</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">date</span>, <span class="ruby-identifier">:general_fmt_date</span> <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000022" class="method-detail">
+ <a name="M000022"></a>
+
+ <div class="method-heading">
+ <a href="#M000022" class="method-signature">
+ <span class="method-name">l_datetime</span><span class="method-args">(date)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000022-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 8</span>
+8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_datetime</span>(<span class="ruby-identifier">date</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">date</span>, <span class="ruby-identifier">:general_fmt_datetime</span> <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000023" class="method-detail">
+ <a name="M000023"></a>
+
+ <div class="method-heading">
+ <a href="#M000023" class="method-signature">
+ <span class="method-name">l_datetime_short</span><span class="method-args">(date)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000023-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 9</span>
+9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_datetime_short</span>(<span class="ruby-identifier">date</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">date</span>, <span class="ruby-identifier">:general_fmt_datetime_short</span> <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000028" class="method-detail">
+ <a name="M000028"></a>
+
+ <div class="method-heading">
+ <a href="#M000028" class="method-signature">
+ <span class="method-name">l_lang_name</span><span class="method-args">(lang, display_lang=nil)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000028-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 15</span>
+15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_lang_name</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">display_lang</span>=<span class="ruby-keyword kw">nil</span>)
+16: <span class="ruby-identifier">ll</span> <span class="ruby-identifier">display_lang</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">current_language</span>, <span class="ruby-node">&quot;general_lang_#{lang}&quot;</span>
+17: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000024" class="method-detail">
+ <a name="M000024"></a>
+
+ <div class="method-heading">
+ <a href="#M000024" class="method-signature">
+ <span class="method-name">l_strftime</span><span class="method-args">(date,fmt)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000024-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 10</span>
+10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_strftime</span>(<span class="ruby-identifier">date</span>,<span class="ruby-identifier">fmt</span>) <span class="ruby-identifier">date</span>.<span class="ruby-identifier">strftime</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">fmt</span>) <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000025" class="method-detail">
+ <a name="M000025"></a>
+
+ <div class="method-heading">
+ <a href="#M000025" class="method-signature">
+ <span class="method-name">l_time</span><span class="method-args">(time)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000025-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 11</span>
+11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_time</span>(<span class="ruby-identifier">time</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">time</span>, <span class="ruby-identifier">:general_fmt_time</span> <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000027" class="method-detail">
+ <a name="M000027"></a>
+
+ <div class="method-heading">
+ <a href="#M000027" class="method-signature">
+ <span class="method-name">l_yesno</span><span class="method-args">(value)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000027-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 13</span>
+13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_yesno</span>(<span class="ruby-identifier">value</span>) <span class="ruby-identifier">l</span>(<span class="ruby-identifier">value</span> <span class="ruby-value">? </span><span class="ruby-operator">:</span><span class="ruby-identifier">general_text_yes</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:general_text_no</span>) <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/InstanceMethods.html b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/InstanceMethods.html
new file mode 100644
index 000000000..4e15c9383
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/InstanceMethods.html
@@ -0,0 +1,364 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: GLoc::InstanceMethods</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">GLoc::InstanceMethods</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/gloc_rb.html">
+ lib/gloc.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+This module will be included in both instances and classes of <a
+href="../GLoc.html">GLoc</a> includees. It is also included as class
+methods in the <a href="../GLoc.html">GLoc</a> module itself.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000029">l</a>&nbsp;&nbsp;
+ <a href="#M000034">l_has_string?</a>&nbsp;&nbsp;
+ <a href="#M000030">ll</a>&nbsp;&nbsp;
+ <a href="#M000031">ltry</a>&nbsp;&nbsp;
+ <a href="#M000032">lwr</a>&nbsp;&nbsp;
+ <a href="#M000033">lwr_</a>&nbsp;&nbsp;
+ <a href="#M000035">set_language</a>&nbsp;&nbsp;
+ <a href="#M000036">set_language_if_valid</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="Helpers.html">Helpers</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000029" class="method-detail">
+ <a name="M000029"></a>
+
+ <div class="method-heading">
+ <a href="#M000029" class="method-signature">
+ <span class="method-name">l</span><span class="method-args">(symbol, *arguments)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a localized string.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000029-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 18</span>
+18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+19: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l</span>(<span class="ruby-identifier">symbol</span>,<span class="ruby-identifier">current_language</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+20: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000034" class="method-detail">
+ <a name="M000034"></a>
+
+ <div class="method-heading">
+ <a href="#M000034" class="method-signature">
+ <span class="method-name">l_has_string?</span><span class="method-args">(symbol)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns <tt>true</tt> if a localized string with the specified key exists.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000034-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 48</span>
+48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_has_string?</span>(<span class="ruby-identifier">symbol</span>)
+49: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l_has_string?</span>(<span class="ruby-identifier">symbol</span>,<span class="ruby-identifier">current_language</span>)
+50: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000030" class="method-detail">
+ <a name="M000030"></a>
+
+ <div class="method-heading">
+ <a href="#M000030" class="method-signature">
+ <span class="method-name">ll</span><span class="method-args">(lang, symbol, *arguments)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a localized string in a specified language. This does not effect
+<tt>current_language</tt>.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000030-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 24</span>
+24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ll</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+25: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l</span>(<span class="ruby-identifier">symbol</span>,<span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_sym</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+26: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000031" class="method-detail">
+ <a name="M000031"></a>
+
+ <div class="method-heading">
+ <a href="#M000031" class="method-signature">
+ <span class="method-name">ltry</span><span class="method-args">(possible_key)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a localized string if the argument is a Symbol, else just returns
+the argument.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000031-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 29</span>
+29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ltry</span>(<span class="ruby-identifier">possible_key</span>)
+30: <span class="ruby-identifier">possible_key</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">possible_key</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">possible_key</span>
+31: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000032" class="method-detail">
+ <a name="M000032"></a>
+
+ <div class="method-heading">
+ <a href="#M000032" class="method-signature">
+ <span class="method-name">lwr</span><span class="method-args">(symbol, *arguments)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Uses the default <a href="../GLoc.html">GLoc</a> rule to return a localized
+string. See lwr_() for more info.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000032-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 35</span>
+35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+36: <span class="ruby-identifier">lwr_</span>(<span class="ruby-identifier">:default</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+37: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000033" class="method-detail">
+ <a name="M000033"></a>
+
+ <div class="method-heading">
+ <a href="#M000033" class="method-signature">
+ <span class="method-name">lwr_</span><span class="method-args">(rule, symbol, *arguments)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Uses a <em>rule</em> to return a localized string. A rule is a function
+that uses specified arguments to return a localization key prefix. The
+prefix is appended to the localization key originally specified, to create
+a new key which is then used to lookup a localized string.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000033-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 43</span>
+43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lwr_</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+44: <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l</span>(<span class="ruby-node">&quot;#{symbol}#{GLoc::_l_rule(rule,current_language).call(*arguments)}&quot;</span>,<span class="ruby-identifier">current_language</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
+45: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000035" class="method-detail">
+ <a name="M000035"></a>
+
+ <div class="method-heading">
+ <a href="#M000035" class="method-signature">
+ <span class="method-name">set_language</span><span class="method-args">(language)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Sets the current language for this instance/class. Setting the language of
+a class effects all instances unless the instance has its own language
+defined.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000035-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 54</span>
+54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_language</span>(<span class="ruby-identifier">language</span>)
+55: <span class="ruby-ivar">@gloc_language</span>= <span class="ruby-identifier">language</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">language</span>.<span class="ruby-identifier">to_sym</span>
+56: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000036" class="method-detail">
+ <a name="M000036"></a>
+
+ <div class="method-heading">
+ <a href="#M000036" class="method-signature">
+ <span class="method-name">set_language_if_valid</span><span class="method-args">(language)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Sets the current language if the language passed is a valid language. If
+the language was valid, this method returns <tt>true</tt> else it will
+return <tt>false</tt>. Note that <tt>nil</tt> is not a valid language. See
+<a href="InstanceMethods.html#M000035">set_language</a>(language) for more
+info.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000036-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc.rb, line 62</span>
+62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_language_if_valid</span>(<span class="ruby-identifier">language</span>)
+63: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">valid_language?</span>(<span class="ruby-identifier">language</span>)
+64: <span class="ruby-identifier">set_language</span>(<span class="ruby-identifier">language</span>)
+65: <span class="ruby-keyword kw">true</span>
+66: <span class="ruby-keyword kw">else</span>
+67: <span class="ruby-keyword kw">false</span>
+68: <span class="ruby-keyword kw">end</span>
+69: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/created.rid b/redmine/vendor/plugins/gloc-1.1.0/doc/created.rid
new file mode 100644
index 000000000..eba9efa29
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/created.rid
@@ -0,0 +1 @@
+Sun May 28 15:21:13 E. Australia Standard Time 2006
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/CHANGELOG.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/CHANGELOG.html
new file mode 100644
index 000000000..aec36c5bf
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/CHANGELOG.html
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: CHANGELOG</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>CHANGELOG</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>CHANGELOG
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <h2>Version 1.1 (28 May 2006)</h2>
+<ul>
+<li>The charset for each and/or all languages can now be easily configured.
+
+</li>
+<li>Added a ActionController filter that auto-detects the client language.
+
+</li>
+<li>The rake task &quot;sort&quot; now merges lines that match 100%, and warns
+if duplicate keys are found.
+
+</li>
+<li>Rule support. Create flexible rules to handle issues such as pluralization.
+
+</li>
+<li>Massive speed and stability improvements to development mode.
+
+</li>
+<li>Added Russian strings. (Thanks to Evgeny Lineytsev)
+
+</li>
+<li>Complete RDoc documentation.
+
+</li>
+<li>Improved helpers.
+
+</li>
+<li><a href="../classes/GLoc.html">GLoc</a> now configurable via get_config and
+set_config
+
+</li>
+<li>Added an option to tell <a href="../classes/GLoc.html">GLoc</a> to output
+various verbose information.
+
+</li>
+<li>More useful functions such as set_language_if_valid, similar_language
+
+</li>
+<li><a href="../classes/GLoc.html">GLoc</a>&#8217;s entire internal state can
+now be backed up and restored.
+
+</li>
+</ul>
+<h2>Version 1.0 (17 April 2006)</h2>
+<ul>
+<li>Initial public release.
+
+</li>
+</ul>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/README.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/README.html
new file mode 100644
index 000000000..d078659d2
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/README.html
@@ -0,0 +1,480 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: README</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>README</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>README
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <h1>About</h1>
+<h3>Preface</h3>
+<p>
+I originally started designing this on weekends and after work in 2005. We
+started to become very interested in Rails at work and I wanted to get some
+experience with ruby with before we started using it full-time. I
+didn&#8217;t have very many ideas for anything interesting to create so,
+because we write a lot of multilingual webapps at my company, I decided to
+write a localization library. That way if my little hobby project developed
+into something decent, I could at least put it to good use. And here we are
+in 2006, my little hobby project has come a long way and become quite a
+useful piece of software. Not only do I use it in production sites I write
+at work, but I also prefer it to other existing alternatives. Therefore I
+have decided to make it publicly available, and I hope that other
+developers will find it useful too.
+</p>
+<h3>About</h3>
+<p>
+<a href="../classes/GLoc.html">GLoc</a> is a localization library. It
+doesn&#8217;t aim to do everything l10n-related that you can imagine, but
+what it does, it does very well. It was originally designed as a Rails
+plugin, but can also be used for plain ruby projects. Here are a list of
+its main features:
+</p>
+<ul>
+<li>Lightweight and efficient.
+
+</li>
+<li>Uses file-based string bundles. Strings can also be set directly.
+
+</li>
+<li>Intelligent, cascading language configuration.
+
+</li>
+<li>Create flexible rules to handle issues such as pluralization.
+
+</li>
+<li>Includes a ActionController filter that auto-detects the client language.
+
+</li>
+<li>Works perfectly with Rails Engines and allows strings to be overridden just
+as easily as controllers, models, etc.
+
+</li>
+<li>Automatically localizes Rails functions such as distance_in_minutes,
+select_month etc
+
+</li>
+<li>Supports different charsets. You can even specify the encoding to use for
+each language seperately.
+
+</li>
+<li>Special Rails mods/helpers.
+
+</li>
+</ul>
+<h3>What does <a href="../classes/GLoc.html">GLoc</a> mean?</h3>
+<p>
+If you&#8217;re wondering about the name &quot;<a
+href="../classes/GLoc.html">GLoc</a>&quot;, I&#8217;m sure you&#8217;re not
+alone. This project was originally just called &quot;Localization&quot;
+which was a bit too common, so when I decided to release it I decided to
+call it &quot;Golly&#8217;s Localization Library&quot; instead (Golly is my
+nickname), and that was long and boring so I then abbreviated that to
+&quot;<a href="../classes/GLoc.html">GLoc</a>&quot;. What a fun story!!
+</p>
+<h3>Localization helpers</h3>
+<p>
+This also includes a few helpers for common situations such as displaying
+localized date, time, &quot;yes&quot; or &quot;no&quot;, etc.
+</p>
+<h3>Rails Localization</h3>
+<p>
+At the moment, unless you manually remove the <tt>require
+&#8216;gloc-rails-text&#8217;</tt> line from init.rb, this plugin overrides
+certain Rails functions to provide multilingual versions. This
+automatically localizes functions such as select_date(),
+distance_of_time_in_words() and more&#8230; The strings can be found in
+lang/*.yml. NOTE: This is not complete. Timezones and countries are not
+currently localized.
+</p>
+<h1>Usage</h1>
+<h3>Quickstart</h3>
+<p>
+Windows users will need to first install iconv. <a
+href="http://wiki.rubyonrails.com/rails/pages/iconv">wiki.rubyonrails.com/rails/pages/iconv</a>
+</p>
+<ul>
+<li>Create a dir &quot;#{RAILS_ROOT}/lang&quot;
+
+</li>
+<li>Create a file &quot;#{RAILS_ROOT}/lang/en.yml&quot; and write your strings.
+The format is &quot;key: string&quot;. Save it as UTF-8. If you save it in
+a different encoding, add a key called file_charset (eg.
+&quot;file_charset: iso-2022-jp&quot;)
+
+</li>
+<li>Put the following in config/environment.rb and change the values as you see
+fit. The following example is for an app that uses English and Japanese,
+with Japanese being the default.
+
+<pre>
+ GLoc.set_config :default_language =&gt; :ja
+ GLoc.clear_strings_except :en, :ja
+ GLoc.set_kcode
+ GLoc.load_localized_strings
+</pre>
+</li>
+<li>Add &#8216;include <a href="../classes/GLoc.html">GLoc</a>&#8217; to all
+classes that will use localization. This is added to most Rails classes
+automatically.
+
+</li>
+<li>Optionally, you can set the language for models and controllers by simply
+inserting <tt>set_language :en</tt> in classes and/or methods.
+
+</li>
+<li>To use localized strings, replace text such as <tt>&quot;Welcome&quot;</tt>
+with <tt>l(:welcome_string_key)</tt>, and <tt>&quot;Hello
+#{name}.&quot;</tt> with <tt>l(:hello_string_key, name)</tt>. (Of course
+the strings will need to exist in your string bundle.)
+
+</li>
+</ul>
+<p>
+There is more functionality provided by this plugin, that is not
+demonstrated above. Please read the API summary for details.
+</p>
+<h3>API summary</h3>
+<p>
+The following methods are added as both class methods and instance methods
+to modules/classes that include <a href="../classes/GLoc.html">GLoc</a>.
+They are also available as class methods of <a
+href="../classes/GLoc.html">GLoc</a>.
+</p>
+<pre>
+ current_language # Returns the current language
+ l(symbol, *arguments) # Returns a localized string
+ ll(lang, symbol, *arguments) # Returns a localized string in a specific language
+ ltry(possible_key) # Returns a localized string if passed a Symbol, else returns the same argument passed
+ lwr(symbol, *arguments) # Uses the default rule to return a localized string.
+ lwr_(rule, symbol, *arguments) # Uses a specified rule to return a localized string.
+ l_has_string?(symbol) # Checks if a localized string exists
+ set_language(language) # Sets the language for the current class or class instance
+ set_language_if_valid(lang) # Sets the current language if the language passed is a valid language
+</pre>
+<p>
+The <a href="../classes/GLoc.html">GLoc</a> module also defines the
+following class methods:
+</p>
+<pre>
+ add_localized_strings(lang, symbol_hash, override=true) # Adds a hash of localized strings
+ backup_state(clear=false) # Creates a backup of GLoc's internal state and optionally clears everything too
+ clear_strings(*languages) # Removes localized strings from memory
+ clear_strings_except(*languages) # Removes localized strings from memory except for those of certain specified languages
+ get_charset(lang) # Returns the charset used to store localized strings in memory
+ get_config(key) # Returns a GLoc configuration value (see below)
+ load_localized_strings(dir=nil, override=true) # Loads localized strings from all YML files in a given directory
+ restore_state(state) # Restores a backup of GLoc's internal state
+ set_charset(new_charset, *langs) # Sets the charset used to internally store localized strings
+ set_config(hash) # Sets GLoc configuration values (see below)
+ set_kcode(charset=nil) # Sets the $KCODE global variable
+ similar_language(language) # Tries to find a valid language that is similar to the argument passed
+ valid_languages # Returns an array of (currently) valid languages (ie. languages for which localized data exists)
+ valid_language?(language) # Checks whether any localized strings are in memory for a given language
+</pre>
+<p>
+<a href="../classes/GLoc.html">GLoc</a> uses the following configuration
+items. They can be accessed via <tt>get_config</tt> and
+<tt>set_config</tt>.
+</p>
+<pre>
+ :default_cookie_name
+ :default_language
+ :default_param_name
+ :raise_string_not_found_errors
+ :verbose
+</pre>
+<p>
+The <a href="../classes/GLoc.html">GLoc</a> module is automatically
+included in the following classes:
+</p>
+<pre>
+ ActionController::Base
+ ActionMailer::Base
+ ActionView::Base
+ ActionView::Helpers::InstanceTag
+ ActiveRecord::Base
+ ActiveRecord::Errors
+ ApplicationHelper
+ Test::Unit::TestCase
+</pre>
+<p>
+The <a href="../classes/GLoc.html">GLoc</a> module also defines the
+following controller filters:
+</p>
+<pre>
+ autodetect_language_filter
+</pre>
+<p>
+<a href="../classes/GLoc.html">GLoc</a> also makes the following change to
+Rails:
+</p>
+<ul>
+<li>Views for ActionMailer are now #{view_name}_#{language}.rb rather than just
+#{view_name}.rb
+
+</li>
+<li>All ActiveRecord validation class methods now accept a localized string key
+(symbol) as a :message value.
+
+</li>
+<li><a
+href="../classes/ActiveRecord/Errors.html#M000039">ActiveRecord::Errors.add</a>
+now accepts symbols as valid message values. At runtime these symbols are
+converted to localized strings using the current_language of the base
+record.
+
+</li>
+<li><a
+href="../classes/ActiveRecord/Errors.html#M000039">ActiveRecord::Errors.add</a>
+now accepts arrays as arguments so that printf-style strings can be
+generated at runtime. This also applies to the validates_* class methods.
+
+<pre>
+ Eg. validates_xxxxxx_of :name, :message =&gt; ['Your name must be at least %d characters.', MIN_LEN]
+ Eg. validates_xxxxxx_of :name, :message =&gt; [:user_error_validation_name_too_short, MIN_LEN]
+</pre>
+</li>
+<li>Instances of ActiveView inherit their current_language from the controller
+(or mailer) creating them.
+
+</li>
+</ul>
+<p>
+This plugin also adds the following rake tasks:
+</p>
+<pre>
+ * gloc:sort - Sorts the keys in the lang ymls (also accepts a DIR argument)
+</pre>
+<h3>Cascading language configuration</h3>
+<p>
+The language can be set at three levels:
+</p>
+<pre>
+ 1. The default # GLoc.get_config :default_language
+ 2. Class level # class A; set_language :de; end
+ 3. Instance level # b= B.new; b.set_language :zh
+</pre>
+<p>
+Instance level has the highest priority and the default has the lowest.
+</p>
+<p>
+Because <a href="../classes/GLoc.html">GLoc</a> is included at class level
+too, it becomes easy to associate languages with contexts. For example:
+</p>
+<pre>
+ class Student
+ set_language :en
+ def say_hello
+ puts &quot;We say #{l :hello} but our teachers say #{Teacher.l :hello}&quot;
+ end
+ end
+</pre>
+<h3>Rules</h3>
+<p>
+There are often situations when depending on the value of one or more
+variables, the surrounding text changes. The most common case of this is
+pluralization. Rather than hardcode these rules, they are completely
+definable by the user so that the user can eaasily accomodate for more
+complicated grammatical rules such as those found in Russian and Polish (or
+so I hear). To define a rule, simply include a string in the string bundle
+whose key begins with &quot;<em>gloc_rule</em>&quot; and then write ruby
+code as the value. The ruby code will be converted to a Proc when the
+string bundle is first read, and should return a prefix that will be
+appended to the string key at runtime to point to a new string. Make sense?
+Probably not&#8230; Please look at the following example and I am sure it
+will all make sense.
+</p>
+<p>
+Simple example (string bundle / en.yml)
+</p>
+<pre>
+ _gloc_rule_default: ' |n| n==1 ? &quot;_single&quot; : &quot;_plural&quot; '
+ man_count_plural: There are %d men.
+ man_count_single: There is 1 man.
+</pre>
+<p>
+Simple example (code)
+</p>
+<pre>
+ lwr(:man_count, 1) # =&gt; There is 1 man.
+ lwr(:man_count, 8) # =&gt; There are 8 men.
+</pre>
+<p>
+To use rules other than the default simply call lwr_ instead of lwr, and
+specify the rule.
+</p>
+<p>
+Example 2 (string bundle / en.yml)
+</p>
+<pre>
+ _gloc_rule_default: ' |n| n==1 ? &quot;_single&quot; : &quot;_plural&quot; '
+ _gloc_rule_custom: ' |n| return &quot;_none&quot; if n==0; return &quot;_heaps&quot; if n&gt;100; n==1 ? &quot;_single&quot; : &quot;_plural&quot; '
+ man_count_none: There are no men.
+ man_count_heaps: There are heaps of men!!
+ man_count_plural: There are %d men.
+ man_count_single: There is 1 man.
+</pre>
+<p>
+Example 2 (code)
+</p>
+<pre>
+ lwr_(:custom, :man_count, 0) # =&gt; There are no men.
+ lwr_(:custom, :man_count, 1) # =&gt; There is 1 man.
+ lwr_(:custom, :man_count, 8) # =&gt; There are 8 men.
+ lwr_(:custom, :man_count, 150) # =&gt; There are heaps of men!!
+</pre>
+<h3>Helpers</h3>
+<p>
+<a href="../classes/GLoc.html">GLoc</a> includes the following helpers:
+</p>
+<pre>
+ l_age(age) # Returns a localized version of an age. eg &quot;3 years old&quot;
+ l_date(date) # Returns a date in a localized format
+ l_datetime(date) # Returns a date+time in a localized format
+ l_datetime_short(date) # Returns a date+time in a localized short format.
+ l_lang_name(l,dl=nil) # Returns the name of a language (you must supply your own strings)
+ l_strftime(date,fmt) # Formats a date/time in a localized format.
+ l_time(date) # Returns a time in a localized format
+ l_YesNo(value) # Returns localized string of &quot;Yes&quot; or &quot;No&quot; depending on the arg
+ l_yesno(value) # Returns localized string of &quot;yes&quot; or &quot;no&quot; depending on the arg
+</pre>
+<h3>Rails localization</h3>
+<p>
+Not all of Rails is covered but the following functions are:
+</p>
+<pre>
+ distance_of_time_in_words
+ select_day
+ select_month
+ select_year
+ add_options
+</pre>
+<h1>FAQ</h1>
+<h4>How do I use it in engines?</h4>
+<p>
+Simply put this in your init_engine.rb
+</p>
+<pre>
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+</pre>
+<p>
+That way your engines strings will be loaded when the engine is started.
+Just simply make sure that you load your application strings after you
+start your engines to safely override any engine strings.
+</p>
+<h4>Why am I getting an Iconv::IllegalSequence error when calling <a href="../classes/GLoc.html#M000013">GLoc.set_charset</a>?</h4>
+<p>
+By default <a href="../classes/GLoc.html">GLoc</a> loads all of its default
+strings at startup. For example, calling <tt>set_charset
+&#8216;iso-2022-jp&#8217;</tt> will cause this error because Russian
+strings are loaded by default, and the Russian strings use characters that
+cannot be expressed in the ISO-2022-JP charset. Before calling
+<tt>set_charset</tt> you should call <tt>clear_strings_except</tt> to
+remove strings from any languages that you will not be using.
+Alternatively, you can simply specify the language(s) as follows,
+<tt>set_charset &#8216;iso-2022-jp&#8217;, :ja</tt>.
+</p>
+<h4>How do I make <a href="../classes/GLoc.html">GLoc</a> ignore StringNotFoundErrors?</h4>
+<p>
+Disable it as follows:
+</p>
+<pre>
+ GLoc.set_config :raise_string_not_found_errors =&gt; false
+</pre>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-helpers_rb.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-helpers_rb.html
new file mode 100644
index 000000000..394b79d70
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-helpers_rb.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: gloc-helpers.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>gloc-helpers.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/gloc-helpers.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Copyright &#169; 2005-2006 David Barri
+</p>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-internal_rb.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-internal_rb.html
new file mode 100644
index 000000000..6d09fec7b
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-internal_rb.html
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: gloc-internal.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>gloc-internal.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/gloc-internal.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Copyright &#169; 2005-2006 David Barri
+</p>
+
+ </div>
+
+ <div id="requires-list">
+ <h3 class="section-bar">Required files</h3>
+
+ <div class="name-list">
+ iconv&nbsp;&nbsp;
+ gloc-version&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails-text_rb.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails-text_rb.html
new file mode 100644
index 000000000..52a387218
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails-text_rb.html
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: gloc-rails-text.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>gloc-rails-text.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/gloc-rails-text.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Copyright &#169; 2005-2006 David Barri
+</p>
+
+ </div>
+
+ <div id="requires-list">
+ <h3 class="section-bar">Required files</h3>
+
+ <div class="name-list">
+ date&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails_rb.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails_rb.html
new file mode 100644
index 000000000..3ae73b87b
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-rails_rb.html
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: gloc-rails.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>gloc-rails.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/gloc-rails.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Copyright &#169; 2005-2006 David Barri
+</p>
+
+ </div>
+
+ <div id="requires-list">
+ <h3 class="section-bar">Required files</h3>
+
+ <div class="name-list">
+ gloc&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-ruby_rb.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-ruby_rb.html
new file mode 100644
index 000000000..4b29e9d94
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-ruby_rb.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: gloc-ruby.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>gloc-ruby.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/gloc-ruby.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Copyright &#169; 2005-2006 David Barri
+</p>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-version_rb.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-version_rb.html
new file mode 100644
index 000000000..17f93aa43
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc-version_rb.html
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: gloc-version.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>gloc-version.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/gloc-version.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc_rb.html b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc_rb.html
new file mode 100644
index 000000000..9e68a89cd
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/files/lib/gloc_rb.html
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>File: gloc.rb</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="fileHeader">
+ <h1>gloc.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>lib/gloc.rb
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>Sun May 28 15:19:38 E. Australia Standard Time 2006</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Copyright &#169; 2005-2006 David Barri
+</p>
+
+ </div>
+
+ <div id="requires-list">
+ <h3 class="section-bar">Required files</h3>
+
+ <div class="name-list">
+ yaml&nbsp;&nbsp;
+ gloc-internal&nbsp;&nbsp;
+ gloc-helpers&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/fr_class_index.html b/redmine/vendor/plugins/gloc-1.1.0/doc/fr_class_index.html
new file mode 100644
index 000000000..08e0418f3
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/fr_class_index.html
@@ -0,0 +1,37 @@
+
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--
+
+ Classes
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Classes</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div id="index">
+ <h1 class="section-bar">Classes</h1>
+ <div id="index-entries">
+ <a href="classes/ActionController/Filters/ClassMethods.html">ActionController::Filters::ClassMethods</a><br />
+ <a href="classes/ActionMailer/Base.html">ActionMailer::Base</a><br />
+ <a href="classes/ActionView/Base.html">ActionView::Base</a><br />
+ <a href="classes/ActionView/Helpers/DateHelper.html">ActionView::Helpers::DateHelper</a><br />
+ <a href="classes/ActionView/Helpers/InstanceTag.html">ActionView::Helpers::InstanceTag</a><br />
+ <a href="classes/ActiveRecord/Errors.html">ActiveRecord::Errors</a><br />
+ <a href="classes/ActiveRecord/Validations/ClassMethods.html">ActiveRecord::Validations::ClassMethods</a><br />
+ <a href="classes/GLoc.html">GLoc</a><br />
+ <a href="classes/GLoc/ClassMethods.html">GLoc::ClassMethods</a><br />
+ <a href="classes/GLoc/Helpers.html">GLoc::Helpers</a><br />
+ <a href="classes/GLoc/InstanceMethods.html">GLoc::InstanceMethods</a><br />
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/fr_file_index.html b/redmine/vendor/plugins/gloc-1.1.0/doc/fr_file_index.html
new file mode 100644
index 000000000..839e378d3
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/fr_file_index.html
@@ -0,0 +1,35 @@
+
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--
+
+ Files
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Files</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div id="index">
+ <h1 class="section-bar">Files</h1>
+ <div id="index-entries">
+ <a href="files/CHANGELOG.html">CHANGELOG</a><br />
+ <a href="files/README.html">README</a><br />
+ <a href="files/lib/gloc-helpers_rb.html">lib/gloc-helpers.rb</a><br />
+ <a href="files/lib/gloc-internal_rb.html">lib/gloc-internal.rb</a><br />
+ <a href="files/lib/gloc-rails-text_rb.html">lib/gloc-rails-text.rb</a><br />
+ <a href="files/lib/gloc-rails_rb.html">lib/gloc-rails.rb</a><br />
+ <a href="files/lib/gloc-ruby_rb.html">lib/gloc-ruby.rb</a><br />
+ <a href="files/lib/gloc-version_rb.html">lib/gloc-version.rb</a><br />
+ <a href="files/lib/gloc_rb.html">lib/gloc.rb</a><br />
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/fr_method_index.html b/redmine/vendor/plugins/gloc-1.1.0/doc/fr_method_index.html
new file mode 100644
index 000000000..325ed3589
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/fr_method_index.html
@@ -0,0 +1,72 @@
+
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--
+
+ Methods
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Methods</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div id="index">
+ <h1 class="section-bar">Methods</h1>
+ <div id="index-entries">
+ <a href="classes/ActiveRecord/Errors.html#M000039">add (ActiveRecord::Errors)</a><br />
+ <a href="classes/GLoc.html#M000004">add_localized_strings (GLoc)</a><br />
+ <a href="classes/ActionController/Filters/ClassMethods.html#M000001">autodetect_language_filter (ActionController::Filters::ClassMethods)</a><br />
+ <a href="classes/GLoc.html#M000005">backup_state (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000006">clear_strings (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000007">clear_strings_except (GLoc)</a><br />
+ <a href="classes/GLoc/ClassMethods.html#M000019">current_language (GLoc::ClassMethods)</a><br />
+ <a href="classes/GLoc.html#M000003">current_language (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000002">current_language (GLoc)</a><br />
+ <a href="classes/ActionView/Helpers/InstanceTag.html#M000045">current_language (ActionView::Helpers::InstanceTag)</a><br />
+ <a href="classes/ActiveRecord/Errors.html#M000040">current_language (ActiveRecord::Errors)</a><br />
+ <a href="classes/ActionView/Helpers/DateHelper.html#M000041">distance_of_time_in_words (ActionView::Helpers::DateHelper)</a><br />
+ <a href="classes/GLoc.html#M000008">get_charset (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000009">get_config (GLoc)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000029">l (GLoc::InstanceMethods)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000026">l_YesNo (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000020">l_age (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000021">l_date (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000022">l_datetime (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000023">l_datetime_short (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000034">l_has_string? (GLoc::InstanceMethods)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000028">l_lang_name (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000024">l_strftime (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000025">l_time (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/Helpers.html#M000027">l_yesno (GLoc::Helpers)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000030">ll (GLoc::InstanceMethods)</a><br />
+ <a href="classes/GLoc.html#M000010">load_gloc_default_localized_strings (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000011">load_localized_strings (GLoc)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000031">ltry (GLoc::InstanceMethods)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000032">lwr (GLoc::InstanceMethods)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000033">lwr_ (GLoc::InstanceMethods)</a><br />
+ <a href="classes/ActionView/Base.html#M000046">new (ActionView::Base)</a><br />
+ <a href="classes/GLoc.html#M000012">restore_state (GLoc)</a><br />
+ <a href="classes/ActionView/Helpers/DateHelper.html#M000042">select_day (ActionView::Helpers::DateHelper)</a><br />
+ <a href="classes/ActionView/Helpers/DateHelper.html#M000043">select_month (ActionView::Helpers::DateHelper)</a><br />
+ <a href="classes/ActionView/Helpers/DateHelper.html#M000044">select_year (ActionView::Helpers::DateHelper)</a><br />
+ <a href="classes/GLoc.html#M000013">set_charset (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000014">set_config (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000015">set_kcode (GLoc)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000035">set_language (GLoc::InstanceMethods)</a><br />
+ <a href="classes/GLoc/InstanceMethods.html#M000036">set_language_if_valid (GLoc::InstanceMethods)</a><br />
+ <a href="classes/GLoc.html#M000016">similar_language (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000018">valid_language? (GLoc)</a><br />
+ <a href="classes/GLoc.html#M000017">valid_languages (GLoc)</a><br />
+ <a href="classes/ActiveRecord/Validations/ClassMethods.html#M000037">validates_length_of (ActiveRecord::Validations::ClassMethods)</a><br />
+ <a href="classes/ActiveRecord/Validations/ClassMethods.html#M000038">validates_size_of (ActiveRecord::Validations::ClassMethods)</a><br />
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/index.html b/redmine/vendor/plugins/gloc-1.1.0/doc/index.html
new file mode 100644
index 000000000..f29103142
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/index.html
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+
+<!--
+
+ GLoc Localization Library Documentation
+
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>GLoc Localization Library Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+</head>
+<frameset rows="20%, 80%">
+ <frameset cols="25%,35%,45%">
+ <frame src="fr_file_index.html" title="Files" name="Files" />
+ <frame src="fr_class_index.html" name="Classes" />
+ <frame src="fr_method_index.html" name="Methods" />
+ </frameset>
+ <frame src="files/README.html" name="docwin" />
+</frameset>
+</html> \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/doc/rdoc-style.css b/redmine/vendor/plugins/gloc-1.1.0/doc/rdoc-style.css
new file mode 100644
index 000000000..fbf7326af
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/doc/rdoc-style.css
@@ -0,0 +1,208 @@
+
+body {
+ font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size: 90%;
+ margin: 0;
+ margin-left: 40px;
+ padding: 0;
+ background: white;
+}
+
+h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
+h1 { font-size: 150%; }
+h2,h3,h4 { margin-top: 1em; }
+
+a { background: #eef; color: #039; text-decoration: none; }
+a:hover { background: #039; color: #eef; }
+
+/* Override the base stylesheet's Anchor inside a table cell */
+td > a {
+ background: transparent;
+ color: #039;
+ text-decoration: none;
+}
+
+/* and inside a section title */
+.section-title > a {
+ background: transparent;
+ color: #eee;
+ text-decoration: none;
+}
+
+/* === Structural elements =================================== */
+
+div#index {
+ margin: 0;
+ margin-left: -40px;
+ padding: 0;
+ font-size: 90%;
+}
+
+
+div#index a {
+ margin-left: 0.7em;
+}
+
+div#index .section-bar {
+ margin-left: 0px;
+ padding-left: 0.7em;
+ background: #ccc;
+ font-size: small;
+}
+
+
+div#classHeader, div#fileHeader {
+ width: auto;
+ color: white;
+ padding: 0.5em 1.5em 0.5em 1.5em;
+ margin: 0;
+ margin-left: -40px;
+ border-bottom: 3px solid #006;
+}
+
+div#classHeader a, div#fileHeader a {
+ background: inherit;
+ color: white;
+}
+
+div#classHeader td, div#fileHeader td {
+ background: inherit;
+ color: white;
+}
+
+
+div#fileHeader {
+ background: #057;
+}
+
+div#classHeader {
+ background: #048;
+}
+
+
+.class-name-in-header {
+ font-size: 180%;
+ font-weight: bold;
+}
+
+
+div#bodyContent {
+ padding: 0 1.5em 0 1.5em;
+}
+
+div#description {
+ padding: 0.5em 1.5em;
+ background: #efefef;
+ border: 1px dotted #999;
+}
+
+div#description h1,h2,h3,h4,h5,h6 {
+ color: #125;;
+ background: transparent;
+}
+
+div#validator-badges {
+ text-align: center;
+}
+div#validator-badges img { border: 0; }
+
+div#copyright {
+ color: #333;
+ background: #efefef;
+ font: 0.75em sans-serif;
+ margin-top: 5em;
+ margin-bottom: 0;
+ padding: 0.5em 2em;
+}
+
+
+/* === Classes =================================== */
+
+table.header-table {
+ color: white;
+ font-size: small;
+}
+
+.type-note {
+ font-size: small;
+ color: #DEDEDE;
+}
+
+.xxsection-bar {
+ background: #eee;
+ color: #333;
+ padding: 3px;
+}
+
+.section-bar {
+ color: #333;
+ border-bottom: 1px solid #999;
+ margin-left: -20px;
+}
+
+
+.section-title {
+ background: #79a;
+ color: #eee;
+ padding: 3px;
+ margin-top: 2em;
+ margin-left: -30px;
+ border: 1px solid #999;
+}
+
+.top-aligned-row { vertical-align: top }
+.bottom-aligned-row { vertical-align: bottom }
+
+/* --- Context section classes ----------------------- */
+
+.context-row { }
+.context-item-name { font-family: monospace; font-weight: bold; color: black; }
+.context-item-value { font-size: small; color: #448; }
+.context-item-desc { color: #333; padding-left: 2em; }
+
+/* --- Method classes -------------------------- */
+.method-detail {
+ background: #efefef;
+ padding: 0;
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+ border: 1px dotted #ccc;
+}
+.method-heading {
+ color: black;
+ background: #ccc;
+ border-bottom: 1px solid #666;
+ padding: 0.2em 0.5em 0 0.5em;
+}
+.method-signature { color: black; background: inherit; }
+.method-name { font-weight: bold; }
+.method-args { font-style: italic; }
+.method-description { padding: 0 0.5em 0 0.5em; }
+
+/* --- Source code sections -------------------- */
+
+a.source-toggle { font-size: 90%; }
+div.method-source-code {
+ background: #262626;
+ color: #ffdead;
+ margin: 1em;
+ padding: 0.5em;
+ border: 1px dashed #999;
+ overflow: hidden;
+}
+
+div.method-source-code pre { color: #ffdead; overflow: hidden; }
+
+/* --- Ruby keyword styles --------------------- */
+
+.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
+
+.ruby-constant { color: #7fffd4; background: transparent; }
+.ruby-keyword { color: #00ffff; background: transparent; }
+.ruby-ivar { color: #eedd82; background: transparent; }
+.ruby-operator { color: #00ffee; background: transparent; }
+.ruby-identifier { color: #ffdead; background: transparent; }
+.ruby-node { color: #ffa07a; background: transparent; }
+.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
+.ruby-regexp { color: #ffa07a; background: transparent; }
+.ruby-value { color: #7fffd4; background: transparent; } \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/init.rb b/redmine/vendor/plugins/gloc-1.1.0/init.rb
new file mode 100644
index 000000000..9d99acd61
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/init.rb
@@ -0,0 +1,11 @@
+# Copyright (c) 2005-2006 David Barri
+
+require 'gloc'
+require 'gloc-ruby'
+require 'gloc-rails'
+require 'gloc-rails-text'
+require 'gloc-config'
+
+require 'gloc-dev' if ENV['RAILS_ENV'] == 'development'
+
+GLoc.load_gloc_default_localized_strings
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-config.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-config.rb
new file mode 100644
index 000000000..e85b041f5
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-config.rb
@@ -0,0 +1,16 @@
+# Copyright (c) 2005-2006 David Barri
+
+module GLoc
+
+ private
+
+ CONFIG= {} unless const_defined?(:CONFIG)
+ unless CONFIG.frozen?
+ CONFIG[:default_language] ||= :en
+ CONFIG[:default_param_name] ||= 'lang'
+ CONFIG[:default_cookie_name] ||= 'lang'
+ CONFIG[:raise_string_not_found_errors]= true unless CONFIG.has_key?(:raise_string_not_found_errors)
+ CONFIG[:verbose] ||= false
+ end
+
+end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-dev.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-dev.rb
new file mode 100644
index 000000000..cb12b4cb3
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-dev.rb
@@ -0,0 +1,97 @@
+# Copyright (c) 2005-2006 David Barri
+
+puts "GLoc v#{GLoc::VERSION} running in development mode. Strings can be modified at runtime."
+
+module GLoc
+ class << self
+
+ alias :actual_add_localized_strings :add_localized_strings
+ def add_localized_strings(lang, symbol_hash, override=true, strings_charset=nil)
+ _verbose_msg {"dev::add_localized_strings #{lang}, [#{symbol_hash.size}], #{override}, #{strings_charset ? strings_charset : 'nil'}"}
+ STATE.push [:hash, lang, {}.merge(symbol_hash), override, strings_charset]
+ _force_refresh
+ end
+
+ alias :actual_load_localized_strings :load_localized_strings
+ def load_localized_strings(dir=nil, override=true)
+ _verbose_msg {"dev::load_localized_strings #{dir ? dir : 'nil'}, #{override}"}
+ STATE.push [:dir, dir, override]
+ _get_lang_file_list(dir).each {|filename| FILES[filename]= nil}
+ end
+
+ alias :actual_clear_strings :clear_strings
+ def clear_strings(*languages)
+ _verbose_msg {"dev::clear_strings #{languages.map{|l|l.to_s}.join(', ')}"}
+ STATE.push [:clear, languages.clone]
+ _force_refresh
+ end
+
+ alias :actual_clear_strings_except :clear_strings_except
+ def clear_strings_except(*languages)
+ _verbose_msg {"dev::clear_strings_except #{languages.map{|l|l.to_s}.join(', ')}"}
+ STATE.push [:clear_except, languages.clone]
+ _force_refresh
+ end
+
+ # Replace methods
+ [:_l, :_l_rule, :_l_has_string?, :similar_language, :valid_languages, :valid_language?].each do |m|
+ class_eval <<-EOB
+ alias :actual_#{m} :#{m}
+ def #{m}(*args)
+ _assert_gloc_strings_up_to_date
+ actual_#{m}(*args)
+ end
+ EOB
+ end
+
+ #-------------------------------------------------------------------------
+ private
+
+ STATE= []
+ FILES= {}
+
+ def _assert_gloc_strings_up_to_date
+ changed= @@force_refresh
+
+ # Check if any lang files have changed
+ unless changed
+ FILES.each_pair {|f,mtime|
+ changed ||= (File.stat(f).mtime != mtime)
+ }
+ end
+
+ return unless changed
+ puts "GLoc reloading strings..."
+ @@force_refresh= false
+
+ # Update file timestamps
+ FILES.each_key {|f|
+ FILES[f]= File.stat(f).mtime
+ }
+
+ # Reload strings
+ actual_clear_strings
+ STATE.each {|s|
+ case s[0]
+ when :dir then actual_load_localized_strings s[1], s[2]
+ when :hash then actual_add_localized_strings s[1], s[2], s[3], s[4]
+ when :clear then actual_clear_strings(*s[1])
+ when :clear_except then actual_clear_strings_except(*s[1])
+ else raise "Invalid state id: '#{s[0]}'"
+ end
+ }
+ _verbose_msg :stats
+ end
+
+ @@force_refresh= false
+ def _force_refresh
+ @@force_refresh= true
+ end
+
+ alias :super_get_internal_state_vars :_get_internal_state_vars
+ def _get_internal_state_vars
+ super_get_internal_state_vars + [ STATE, FILES ]
+ end
+
+ end
+end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-helpers.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-helpers.rb
new file mode 100644
index 000000000..f2ceb8e3d
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-helpers.rb
@@ -0,0 +1,20 @@
+# Copyright (c) 2005-2006 David Barri
+
+module GLoc
+ # These helper methods will be included in the InstanceMethods module.
+ module Helpers
+ def l_age(age) lwr :general_fmt_age, age end
+ def l_date(date) l_strftime date, :general_fmt_date end
+ def l_datetime(date) l_strftime date, :general_fmt_datetime end
+ def l_datetime_short(date) l_strftime date, :general_fmt_datetime_short end
+ def l_strftime(date,fmt) date.strftime l(fmt) end
+ def l_time(time) l_strftime time, :general_fmt_time end
+ def l_YesNo(value) l(value ? :general_text_Yes : :general_text_No) end
+ def l_yesno(value) l(value ? :general_text_yes : :general_text_no) end
+
+ def l_lang_name(lang, display_lang=nil)
+ ll display_lang || current_language, "general_lang_#{lang}"
+ end
+
+ end
+end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-internal.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-internal.rb
new file mode 100644
index 000000000..f16e90555
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-internal.rb
@@ -0,0 +1,134 @@
+# Copyright (c) 2005-2006 David Barri
+
+require 'iconv'
+require 'gloc-version'
+
+module GLoc
+ class GLocError < StandardError #:nodoc:
+ end
+ class InvalidArgumentsError < GLocError #:nodoc:
+ end
+ class InvalidKeyError < GLocError #:nodoc:
+ end
+ class RuleNotFoundError < GLocError #:nodoc:
+ end
+ class StringNotFoundError < GLocError #:nodoc:
+ end
+
+ class << self
+ private
+
+ def _add_localized_data(lang, symbol_hash, override, target) #:nodoc:
+ lang= lang.to_sym
+ if override
+ target[lang] ||= {}
+ target[lang].merge!(symbol_hash)
+ else
+ symbol_hash.merge!(target[lang]) if target[lang]
+ target[lang]= symbol_hash
+ end
+ end
+
+ def _add_localized_strings(lang, symbol_hash, override=true, strings_charset=nil) #:nodoc:
+ _charset_required
+
+ # Convert all incoming strings to the gloc charset
+ if strings_charset
+ Iconv.open(get_charset(lang), strings_charset) do |i|
+ symbol_hash.each_pair {|k,v| symbol_hash[k]= i.iconv(v)}
+ end
+ end
+
+ # Convert rules
+ rules= {}
+ old_kcode= $KCODE
+ begin
+ $KCODE= 'u'
+ Iconv.open(UTF_8, get_charset(lang)) do |i|
+ symbol_hash.each {|k,v|
+ if /^_gloc_rule_(.+)$/ =~ k.to_s
+ v= i.iconv(v) if v
+ v= '""' if v.nil?
+ rules[$1.to_sym]= eval "Proc.new do #{v} end"
+ end
+ }
+ end
+ ensure
+ $KCODE= old_kcode
+ end
+ rules.keys.each {|k| symbol_hash.delete "_gloc_rule_#{k}".to_sym}
+
+ # Add new localized data
+ LOWERCASE_LANGUAGES[lang.to_s.downcase]= lang
+ _add_localized_data(lang, symbol_hash, override, LOCALIZED_STRINGS)
+ _add_localized_data(lang, rules, override, RULES)
+ end
+
+ def _charset_required #:nodoc:
+ set_charset UTF_8 unless CONFIG[:internal_charset]
+ end
+
+ def _get_internal_state_vars
+ [ CONFIG, LOCALIZED_STRINGS, RULES, LOWERCASE_LANGUAGES ]
+ end
+
+ def _get_lang_file_list(dir) #:nodoc:
+ dir= File.join(RAILS_ROOT,'lang') if dir.nil?
+ Dir[File.join(dir,'*.{yaml,yml}')]
+ end
+
+ def _l(symbol, language, *arguments) #:nodoc:
+ symbol= symbol.to_sym if symbol.is_a?(String)
+ raise InvalidKeyError.new("Symbol or String expected as key.") unless symbol.kind_of?(Symbol)
+
+ translation= LOCALIZED_STRINGS[language][symbol] rescue nil
+ if translation.nil?
+ raise StringNotFoundError.new("There is no key called '#{symbol}' in the #{language} strings.") if CONFIG[:raise_string_not_found_errors]
+ translation= symbol.to_s
+ end
+
+ begin
+ return translation % arguments
+ rescue => e
+ raise InvalidArgumentsError.new("Translation value #{translation.inspect} with arguments #{arguments.inspect} caused error '#{e.message}'")
+ end
+ end
+
+ def _l_has_string?(symbol,lang) #:nodoc:
+ symbol= symbol.to_sym if symbol.is_a?(String)
+ LOCALIZED_STRINGS[lang].has_key?(symbol.to_sym) rescue false
+ end
+
+ def _l_rule(symbol,lang) #:nodoc:
+ symbol= symbol.to_sym if symbol.is_a?(String)
+ raise InvalidKeyError.new("Symbol or String expected as key.") unless symbol.kind_of?(Symbol)
+
+ r= RULES[lang][symbol] rescue nil
+ raise RuleNotFoundError.new("There is no rule called '#{symbol}' in the #{lang} rules.") if r.nil?
+ r
+ end
+
+ def _verbose_msg(type=nil)
+ return unless CONFIG[:verbose]
+ x= case type
+ when :stats
+ x= valid_languages.map{|l| ":#{l}(#{LOCALIZED_STRINGS[l].size}/#{RULES[l].size})"}.sort.join(', ')
+ "Current stats -- #{x}"
+ else
+ yield
+ end
+ puts "[GLoc] #{x}"
+ end
+
+ public :_l, :_l_has_string?, :_l_rule
+ end
+
+ private
+
+ unless const_defined?(:LOCALIZED_STRINGS)
+ LOCALIZED_STRINGS= {}
+ RULES= {}
+ LOWERCASE_LANGUAGES= {}
+ end
+
+end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb
new file mode 100644
index 000000000..abbb7a190
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb
@@ -0,0 +1,137 @@
+# Copyright (c) 2005-2006 David Barri
+
+require 'date'
+
+module ActionView #:nodoc:
+ module Helpers #:nodoc:
+ module DateHelper
+
+ unless const_defined?(:LOCALIZED_HELPERS)
+ LOCALIZED_HELPERS= true
+ LOCALIZED_MONTHNAMES = {}
+ LOCALIZED_ABBR_MONTHNAMES = {}
+ end
+
+ # This method uses <tt>current_language</tt> to return a localized string.
+ def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false)
+ from_time = from_time.to_time if from_time.respond_to?(:to_time)
+ to_time = to_time.to_time if to_time.respond_to?(:to_time)
+ distance_in_minutes = (((to_time - from_time).abs)/60).round
+ distance_in_seconds = ((to_time - from_time).abs).round
+
+ case distance_in_minutes
+ when 0..1
+ return (distance_in_minutes==0) ? l(:actionview_datehelper_time_in_words_minute_less_than) : l(:actionview_datehelper_time_in_words_minute_single) unless include_seconds
+ case distance_in_seconds
+ when 0..5 then lwr(:actionview_datehelper_time_in_words_second_less_than, 5)
+ when 6..10 then lwr(:actionview_datehelper_time_in_words_second_less_than, 10)
+ when 11..20 then lwr(:actionview_datehelper_time_in_words_second_less_than, 20)
+ when 21..40 then l(:actionview_datehelper_time_in_words_minute_half)
+ when 41..59 then l(:actionview_datehelper_time_in_words_minute_less_than)
+ else l(:actionview_datehelper_time_in_words_minute)
+ end
+
+ when 2..45 then lwr(:actionview_datehelper_time_in_words_minute, distance_in_minutes)
+ when 46..90 then l(:actionview_datehelper_time_in_words_hour_about_single)
+ when 90..1440 then lwr(:actionview_datehelper_time_in_words_hour_about, (distance_in_minutes.to_f / 60.0).round)
+ when 1441..2880 then lwr(:actionview_datehelper_time_in_words_day, 1)
+ else lwr(:actionview_datehelper_time_in_words_day, (distance_in_minutes / 1440).round)
+ end
+ end
+
+ # This method has been modified so that a localized string can be appended to the day numbers.
+ def select_day(date, options = {})
+ day_options = []
+ prefix = l :actionview_datehelper_select_day_prefix
+
+ 1.upto(31) do |day|
+ day_options << ((date && (date.kind_of?(Fixnum) ? date : date.day) == day) ?
+ %(<option value="#{day}" selected="selected">#{day}#{prefix}</option>\n) :
+ %(<option value="#{day}">#{day}#{prefix}</option>\n)
+ )
+ end
+
+ select_html(options[:field_name] || 'day', day_options, options[:prefix], options[:include_blank], options[:discard_type], options[:disabled])
+ end
+
+ # This method has been modified so that
+ # * the month names are localized.
+ # * it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>, <tt>:start_month</tt>, <tt>:end_month</tt>
+ # * a localized string can be appended to the month numbers when the <tt>:use_month_numbers</tt> option is specified.
+ def select_month(date, options = {})
+ unless LOCALIZED_MONTHNAMES.has_key?(current_language)
+ LOCALIZED_MONTHNAMES[current_language] = [''] + l(:actionview_datehelper_select_month_names).split(',')
+ LOCALIZED_ABBR_MONTHNAMES[current_language] = [''] + l(:actionview_datehelper_select_month_names_abbr).split(',')
+ end
+
+ month_options = []
+ month_names = options[:use_short_month] ? LOCALIZED_ABBR_MONTHNAMES[current_language] : LOCALIZED_MONTHNAMES[current_language]
+
+ if options.has_key?(:min_date) && options.has_key?(:max_date)
+ if options[:min_date].year == options[:max_date].year
+ start_month, end_month = options[:min_date].month, options[:max_date].month
+ end
+ end
+ start_month = (options[:start_month] || 1) unless start_month
+ end_month = (options[:end_month] || 12) unless end_month
+ prefix = l :actionview_datehelper_select_month_prefix
+
+ start_month.upto(end_month) do |month_number|
+ month_name = if options[:use_month_numbers]
+ "#{month_number}#{prefix}"
+ elsif options[:add_month_numbers]
+ month_number.to_s + ' - ' + month_names[month_number]
+ else
+ month_names[month_number]
+ end
+
+ month_options << ((date && (date.kind_of?(Fixnum) ? date : date.month) == month_number) ?
+ %(<option value="#{month_number}" selected="selected">#{month_name}</option>\n) :
+ %(<option value="#{month_number}">#{month_name}</option>\n)
+ )
+ end
+
+ select_html(options[:field_name] || 'month', month_options, options[:prefix], options[:include_blank], options[:discard_type], options[:disabled])
+ end
+
+ # This method has been modified so that
+ # * it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>
+ # * a localized string can be appended to the years numbers.
+ def select_year(date, options = {})
+ year_options = []
+ y = date ? (date.kind_of?(Fixnum) ? (y = (date == 0) ? Date.today.year : date) : date.year) : Date.today.year
+
+ start_year = options.has_key?(:min_date) ? options[:min_date].year : (options[:start_year] || y-5)
+ end_year = options.has_key?(:max_date) ? options[:max_date].year : (options[:end_year] || y+5)
+ step_val = start_year < end_year ? 1 : -1
+ prefix = l :actionview_datehelper_select_year_prefix
+
+ start_year.step(end_year, step_val) do |year|
+ year_options << ((date && (date.kind_of?(Fixnum) ? date : date.year) == year) ?
+ %(<option value="#{year}" selected="selected">#{year}#{prefix}</option>\n) :
+ %(<option value="#{year}">#{year}#{prefix}</option>\n)
+ )
+ end
+
+ select_html(options[:field_name] || 'year', year_options, options[:prefix], options[:include_blank], options[:discard_type], options[:disabled])
+ end
+
+ end
+
+ # The private method <tt>add_options</tt> is overridden so that "Please select" is localized.
+ class InstanceTag
+ private
+
+ def add_options(option_tags, options, value = nil)
+ option_tags = "<option value=\"\"></option>\n" + option_tags if options[:include_blank]
+
+ if value.blank? && options[:prompt]
+ ("<option value=\"\">#{options[:prompt].kind_of?(String) ? options[:prompt] : l(:actionview_instancetag_blank_option)}</option>\n") + option_tags
+ else
+ option_tags
+ end
+ end
+
+ end
+ end
+end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb
new file mode 100644
index 000000000..0a35b90ab
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb
@@ -0,0 +1,230 @@
+# Copyright (c) 2005-2006 David Barri
+
+require 'gloc'
+
+module ActionController #:nodoc:
+ class Base #:nodoc:
+ include GLoc
+ end
+ module Filters #:nodoc:
+ module ClassMethods
+
+ # This filter attempts to auto-detect the clients desired language.
+ # It first checks the params, then a cookie and then the HTTP_ACCEPT_LANGUAGE
+ # request header. If a language is found to match or be similar to a currently
+ # valid language, then it sets the current_language of the controller.
+ #
+ # class ExampleController < ApplicationController
+ # set_language :en
+ # autodetect_language_filter :except => 'monkey', :on_no_lang => :lang_not_autodetected_callback
+ # autodetect_language_filter :only => 'monkey', :check_cookie => 'monkey_lang', :check_accept_header => false
+ # ...
+ # def lang_not_autodetected_callback
+ # redirect_to somewhere
+ # end
+ # end
+ #
+ # The <tt>args</tt> for this filter are exactly the same the arguments of
+ # <tt>before_filter</tt> with the following exceptions:
+ # * <tt>:check_params</tt> -- If false, then params will not be checked for a language.
+ # If a String, then this will value will be used as the name of the param.
+ # * <tt>:check_cookie</tt> -- If false, then the cookie will not be checked for a language.
+ # If a String, then this will value will be used as the name of the cookie.
+ # * <tt>:check_accept_header</tt> -- If false, then HTTP_ACCEPT_LANGUAGE will not be checked for a language.
+ # * <tt>:on_set_lang</tt> -- You can specify the name of a callback function to be called when the language
+ # is successfully detected and set. The param must be a Symbol or a String which is the name of the function.
+ # The callback function must accept one argument (the language) and must be instance level.
+ # * <tt>:on_no_lang</tt> -- You can specify the name of a callback function to be called when the language
+ # couldn't be detected automatically. The param must be a Symbol or a String which is the name of the function.
+ # The callback function must be instance level.
+ #
+ # You override the default names of the param or cookie by calling <tt>GLoc.set_config :default_param_name => 'new_param_name'</tt>
+ # and <tt>GLoc.set_config :default_cookie_name => 'new_cookie_name'</tt>.
+ def autodetect_language_filter(*args)
+ options= args.last.is_a?(Hash) ? args.last : {}
+ x= 'Proc.new { |c| l= nil;'
+ # :check_params
+ unless (v= options.delete(:check_params)) == false
+ name= v ? ":#{v}" : 'GLoc.get_config(:default_param_name)'
+ x << "l ||= GLoc.similar_language(c.params[#{name}]);"
+ end
+ # :check_cookie
+ unless (v= options.delete(:check_cookie)) == false
+ name= v ? ":#{v}" : 'GLoc.get_config(:default_cookie_name)'
+ x << "l ||= GLoc.similar_language(c.send(:cookies)[#{name}]);"
+ end
+ # :check_accept_header
+ unless options.delete(:check_accept_header) == false
+ x << %<
+ unless l
+ a= c.request.env['HTTP_ACCEPT_LANGUAGE'].split(/,|;/) rescue nil
+ a.each {|x| l ||= GLoc.similar_language(x)} if a
+ end; >
+ end
+ # Set language
+ x << 'ret= true;'
+ x << 'if l; c.set_language(l); c.headers[\'Content-Language\']= l.to_s; '
+ if options.has_key?(:on_set_lang)
+ x << "ret= c.#{options.delete(:on_set_lang)}(l);"
+ end
+ if options.has_key?(:on_no_lang)
+ x << "else; ret= c.#{options.delete(:on_no_lang)};"
+ end
+ x << 'end; ret }'
+
+ # Create filter
+ block= eval x
+ before_filter(*args, &block)
+ end
+
+ end
+ end
+end
+
+# ==============================================================================
+
+module ActionMailer #:nodoc:
+ # In addition to including GLoc, <tt>render_message</tt> is also overridden so
+ # that mail templates contain the current language at the end of the file.
+ # Eg. <tt>deliver_hello</tt> will render <tt>hello_en.rhtml</tt>.
+ class Base
+ include GLoc
+ private
+ alias :render_message_without_gloc :render_message
+ def render_message(method_name, body)
+ render_message_without_gloc("#{method_name}_#{current_language}", body)
+ end
+ end
+end
+
+# ==============================================================================
+
+module ActionView #:nodoc:
+ # <tt>initialize</tt> is overridden so that new instances of this class inherit
+ # the current language of the controller.
+ class Base
+ include GLoc
+
+ alias :initialize_without_gloc :initialize
+ def initialize(base_path = nil, assigns_for_first_render = {}, controller = nil)
+ initialize_without_gloc(base_path, assigns_for_first_render, controller)
+ set_language controller.current_language unless controller.nil?
+ end
+ end
+
+ module Helpers #:nodoc:
+ class InstanceTag
+ include GLoc
+ # Inherits the current language from the template object.
+ def current_language
+ @template_object.current_language
+ end
+ end
+ end
+end
+
+# ==============================================================================
+
+module ActiveRecord #:nodoc:
+ class Base #:nodoc:
+ include GLoc
+ end
+
+ class Errors
+ include GLoc
+ alias :add_without_gloc :add
+ # The GLoc version of this method provides two extra features
+ # * If <tt>msg</tt> is a string, it will be considered a GLoc string key.
+ # * If <tt>msg</tt> is an array, the first element will be considered
+ # the string and the remaining elements will be considered arguments for the
+ # string. Eg. <tt>['Hi %s.','John']</tt>
+ def add(attribute, msg= @@default_error_messages[:invalid])
+ if msg.is_a?(Array)
+ args= msg.clone
+ msg= args.shift
+ args= nil if args.empty?
+ end
+ msg= ltry(msg)
+ msg= msg % args unless args.nil?
+ add_without_gloc(attribute, msg)
+ end
+ # Inherits the current language from the base record.
+ def current_language
+ @base.current_language
+ end
+ end
+
+ module Validations #:nodoc:
+ module ClassMethods
+ # The default Rails version of this function creates an error message and then
+ # passes it to ActiveRecord.Errors.
+ # The GLoc version of this method, sends an array to ActiveRecord.Errors that will
+ # be turned into a string by ActiveRecord.Errors which in turn allows for the message
+ # of this validation function to be a GLoc string key.
+ def validates_length_of(*attrs)
+ # Merge given options with defaults.
+ options = {
+ :too_long => ActiveRecord::Errors.default_error_messages[:too_long],
+ :too_short => ActiveRecord::Errors.default_error_messages[:too_short],
+ :wrong_length => ActiveRecord::Errors.default_error_messages[:wrong_length]
+ }.merge(DEFAULT_VALIDATION_OPTIONS)
+ options.update(attrs.pop.symbolize_keys) if attrs.last.is_a?(Hash)
+
+ # Ensure that one and only one range option is specified.
+ range_options = ALL_RANGE_OPTIONS & options.keys
+ case range_options.size
+ when 0
+ raise ArgumentError, 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
+ when 1
+ # Valid number of options; do nothing.
+ else
+ raise ArgumentError, 'Too many range options specified. Choose only one.'
+ end
+
+ # Get range option and value.
+ option = range_options.first
+ option_value = options[range_options.first]
+
+ case option
+ when :within, :in
+ raise ArgumentError, ":#{option} must be a Range" unless option_value.is_a?(Range)
+
+ too_short = [options[:too_short] , option_value.begin]
+ too_long = [options[:too_long] , option_value.end ]
+
+ validates_each(attrs, options) do |record, attr, value|
+ if value.nil? or value.split(//).size < option_value.begin
+ record.errors.add(attr, too_short)
+ elsif value.split(//).size > option_value.end
+ record.errors.add(attr, too_long)
+ end
+ end
+ when :is, :minimum, :maximum
+ raise ArgumentError, ":#{option} must be a nonnegative Integer" unless option_value.is_a?(Integer) and option_value >= 0
+
+ # Declare different validations per option.
+ validity_checks = { :is => "==", :minimum => ">=", :maximum => "<=" }
+ message_options = { :is => :wrong_length, :minimum => :too_short, :maximum => :too_long }
+
+ message = [(options[:message] || options[message_options[option]]) , option_value]
+
+ validates_each(attrs, options) do |record, attr, value|
+ if value.kind_of?(String)
+ record.errors.add(attr, message) unless !value.nil? and value.split(//).size.method(validity_checks[option])[option_value]
+ else
+ record.errors.add(attr, message) unless !value.nil? and value.size.method(validity_checks[option])[option_value]
+ end
+ end
+ end
+ end
+
+ alias_method :validates_size_of, :validates_length_of
+ end
+ end
+end
+
+# ==============================================================================
+
+module ApplicationHelper #:nodoc:
+ include GLoc
+end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-ruby.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-ruby.rb
new file mode 100644
index 000000000..f96ab6cf9
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-ruby.rb
@@ -0,0 +1,7 @@
+# Copyright (c) 2005-2006 David Barri
+
+module Test # :nodoc:
+ module Unit # :nodoc:
+ class TestCase # :nodoc:
+ include GLoc
+end; end; end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-version.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-version.rb
new file mode 100644
index 000000000..91afcf482
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc-version.rb
@@ -0,0 +1,12 @@
+module GLoc
+ module VERSION #:nodoc:
+ MAJOR = 1
+ MINOR = 1
+ TINY = nil
+
+ STRING= [MAJOR, MINOR, TINY].delete_if{|x|x.nil?}.join('.')
+ def self.to_s; STRING end
+ end
+end
+
+puts "NOTICE: You are using a dev version of GLoc." if GLoc::VERSION::TINY == 'DEV' \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/lib/gloc.rb b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc.rb
new file mode 100644
index 000000000..bcad0ed9b
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/lib/gloc.rb
@@ -0,0 +1,294 @@
+# Copyright (c) 2005-2006 David Barri
+
+require 'yaml'
+require 'gloc-internal'
+require 'gloc-helpers'
+
+module GLoc
+ UTF_8= 'utf-8'
+ SHIFT_JIS= 'sjis'
+ EUC_JP= 'euc-jp'
+
+ # This module will be included in both instances and classes of GLoc includees.
+ # It is also included as class methods in the GLoc module itself.
+ module InstanceMethods
+ include Helpers
+
+ # Returns a localized string.
+ def l(symbol, *arguments)
+ return GLoc._l(symbol,current_language,*arguments)
+ end
+
+ # Returns a localized string in a specified language.
+ # This does not effect <tt>current_language</tt>.
+ def ll(lang, symbol, *arguments)
+ return GLoc._l(symbol,lang.to_sym,*arguments)
+ end
+
+ # Returns a localized string if the argument is a Symbol, else just returns the argument.
+ def ltry(possible_key)
+ possible_key.is_a?(Symbol) ? l(possible_key) : possible_key
+ end
+
+ # Uses the default GLoc rule to return a localized string.
+ # See lwr_() for more info.
+ def lwr(symbol, *arguments)
+ lwr_(:default, symbol, *arguments)
+ end
+
+ # Uses a <em>rule</em> to return a localized string.
+ # A rule is a function that uses specified arguments to return a localization key prefix.
+ # The prefix is appended to the localization key originally specified, to create a new key which
+ # is then used to lookup a localized string.
+ def lwr_(rule, symbol, *arguments)
+ GLoc._l("#{symbol}#{GLoc::_l_rule(rule,current_language).call(*arguments)}",current_language,*arguments)
+ end
+
+ # Returns <tt>true</tt> if a localized string with the specified key exists.
+ def l_has_string?(symbol)
+ return GLoc._l_has_string?(symbol,current_language)
+ end
+
+ # Sets the current language for this instance/class.
+ # Setting the language of a class effects all instances unless the instance has its own language defined.
+ def set_language(language)
+ @gloc_language= language.nil? ? nil : language.to_sym
+ end
+
+ # Sets the current language if the language passed is a valid language.
+ # If the language was valid, this method returns <tt>true</tt> else it will return <tt>false</tt>.
+ # Note that <tt>nil</tt> is not a valid language.
+ # See set_language(language) for more info.
+ def set_language_if_valid(language)
+ if GLoc.valid_language?(language)
+ set_language(language)
+ true
+ else
+ false
+ end
+ end
+ end
+
+ #---------------------------------------------------------------------------
+ # Instance
+
+ include ::GLoc::InstanceMethods
+ # Returns the instance-level current language, or if not set, returns the class-level current language.
+ def current_language
+ @gloc_language || self.class.current_language
+ end
+
+ #---------------------------------------------------------------------------
+ # Class
+
+ # All classes/modules that include GLoc will also gain these class methods.
+ # Notice that the GLoc::InstanceMethods module is also included.
+ module ClassMethods
+ include ::GLoc::InstanceMethods
+ # Returns the current language, or if not set, returns the GLoc current language.
+ def current_language
+ @gloc_language || GLoc.current_language
+ end
+ end
+
+ def self.included(target) #:nodoc:
+ super
+ class << target
+ include ::GLoc::ClassMethods
+ end
+ end
+
+ #---------------------------------------------------------------------------
+ # GLoc module
+
+ class << self
+ include ::GLoc::InstanceMethods
+
+ # Returns the default language
+ def current_language
+ GLoc::CONFIG[:default_language]
+ end
+
+ # Adds a collection of localized strings to the in-memory string store.
+ def add_localized_strings(lang, symbol_hash, override=true, strings_charset=nil)
+ _verbose_msg {"Adding #{symbol_hash.size} #{lang} strings."}
+ _add_localized_strings(lang, symbol_hash, override, strings_charset)
+ _verbose_msg :stats
+ end
+
+ # Creates a backup of the internal state of GLoc (ie. strings, langs, rules, config)
+ # and optionally clears everything.
+ def backup_state(clear=false)
+ s= _get_internal_state_vars.map{|o| o.clone}
+ _get_internal_state_vars.each{|o| o.clear} if clear
+ s
+ end
+
+ # Removes all localized strings from memory, either of a certain language (or languages),
+ # or entirely.
+ def clear_strings(*languages)
+ if languages.empty?
+ _verbose_msg {"Clearing all strings"}
+ LOCALIZED_STRINGS.clear
+ LOWERCASE_LANGUAGES.clear
+ else
+ languages.each {|l|
+ _verbose_msg {"Clearing :#{l} strings"}
+ l= l.to_sym
+ LOCALIZED_STRINGS.delete l
+ LOWERCASE_LANGUAGES.each_pair {|k,v| LOWERCASE_LANGUAGES.delete k if v == l}
+ }
+ end
+ end
+ alias :_clear_strings :clear_strings
+
+ # Removes all localized strings from memory, except for those of certain specified languages.
+ def clear_strings_except(*languages)
+ clear= (LOCALIZED_STRINGS.keys - languages)
+ _clear_strings(*clear) unless clear.empty?
+ end
+
+ # Returns the charset used to store localized strings in memory.
+ def get_charset(lang)
+ CONFIG[:internal_charset_per_lang][lang] || CONFIG[:internal_charset]
+ end
+
+ # Returns a GLoc configuration value.
+ def get_config(key)
+ CONFIG[key]
+ end
+
+ # Loads the localized strings that are included in the GLoc library.
+ def load_gloc_default_localized_strings(override=false)
+ GLoc.load_localized_strings "#{File.dirname(__FILE__)}/../lang", override
+ end
+
+ # Loads localized strings from all yml files in the specifed directory.
+ def load_localized_strings(dir=nil, override=true)
+ _charset_required
+ _get_lang_file_list(dir).each {|filename|
+
+ # Load file
+ raw_hash = YAML::load(File.read(filename))
+ raw_hash={} unless raw_hash.kind_of?(Hash)
+ filename =~ /([^\/\\]+)\.ya?ml$/
+ lang = $1.to_sym
+ file_charset = raw_hash['file_charset'] || UTF_8
+
+ # Convert string keys to symbols
+ dest_charset= get_charset(lang)
+ _verbose_msg {"Reading file #{filename} [charset: #{file_charset} --> #{dest_charset}]"}
+ symbol_hash = {}
+ Iconv.open(dest_charset, file_charset) do |i|
+ raw_hash.each {|key, value|
+ symbol_hash[key.to_sym] = i.iconv(value)
+ }
+ end
+
+ # Add strings to repos
+ _add_localized_strings(lang, symbol_hash, override)
+ }
+ _verbose_msg :stats
+ end
+
+ # Restores a backup of GLoc's internal state that was made with backup_state.
+ def restore_state(state)
+ _get_internal_state_vars.each do |o|
+ o.clear
+ o.send o.respond_to?(:merge!) ? :merge! : :concat, state.shift
+ end
+ end
+
+ # Sets the charset used to internally store localized strings.
+ # You can set the charset to use for a specific language or languages,
+ # or if none are specified the charset for ALL localized strings will be set.
+ def set_charset(new_charset, *langs)
+ CONFIG[:internal_charset_per_lang] ||= {}
+
+ # Convert symbol shortcuts
+ if new_charset.is_a?(Symbol)
+ new_charset= case new_charset
+ when :utf8, :utf_8 then UTF_8
+ when :sjis, :shift_jis, :shiftjis then SHIFT_JIS
+ when :eucjp, :euc_jp then EUC_JP
+ else new_charset.to_s
+ end
+ end
+
+ # Convert existing strings
+ (langs.empty? ? LOCALIZED_STRINGS.keys : langs).each do |lang|
+ cur_charset= get_charset(lang)
+ if cur_charset && new_charset != cur_charset
+ _verbose_msg {"Converting :#{lang} strings from #{cur_charset} to #{new_charset}"}
+ Iconv.open(new_charset, cur_charset) do |i|
+ bundle= LOCALIZED_STRINGS[lang]
+ bundle.each_pair {|k,v| bundle[k]= i.iconv(v)}
+ end
+ end
+ end
+
+ # Set new charset value
+ if langs.empty?
+ _verbose_msg {"Setting GLoc charset for all languages to #{new_charset}"}
+ CONFIG[:internal_charset]= new_charset
+ CONFIG[:internal_charset_per_lang].clear
+ else
+ langs.each do |lang|
+ _verbose_msg {"Setting GLoc charset for :#{lang} strings to #{new_charset}"}
+ CONFIG[:internal_charset_per_lang][lang]= new_charset
+ end
+ end
+ end
+
+ # Sets GLoc configuration values.
+ def set_config(hash)
+ CONFIG.merge! hash
+ end
+
+ # Sets the $KCODE global variable according to a specified charset, or else the
+ # current default charset for the default language.
+ def set_kcode(charset=nil)
+ _charset_required
+ charset ||= get_charset(current_language)
+ $KCODE= case charset
+ when UTF_8 then 'u'
+ when SHIFT_JIS then 's'
+ when EUC_JP then 'e'
+ else 'n'
+ end
+ _verbose_msg {"$KCODE set to #{$KCODE}"}
+ end
+
+ # Tries to find a valid language that is similar to the argument passed.
+ # Eg. :en, :en_au, :EN_US are all similar languages.
+ # Returns <tt>nil</tt> if no similar languages are found.
+ def similar_language(lang)
+ return nil if lang.nil?
+ return lang.to_sym if valid_language?(lang)
+ # Check lowercase without dashes
+ lang= lang.to_s.downcase.gsub('-','_')
+ return LOWERCASE_LANGUAGES[lang] if LOWERCASE_LANGUAGES.has_key?(lang)
+ # Check without dialect
+ if lang.to_s =~ /^([a-z]+?)[^a-z].*/
+ lang= $1
+ return LOWERCASE_LANGUAGES[lang] if LOWERCASE_LANGUAGES.has_key?(lang)
+ end
+ # Check other dialects
+ lang= "#{lang}_"
+ LOWERCASE_LANGUAGES.keys.each {|k| return LOWERCASE_LANGUAGES[k] if k.starts_with?(lang)}
+ # Nothing found
+ nil
+ end
+
+ # Returns an array of (currently) valid languages (ie. languages for which localized data exists).
+ def valid_languages
+ LOCALIZED_STRINGS.keys
+ end
+
+ # Returns <tt>true</tt> if there are any localized strings for a specified language.
+ # Note that although <tt>set_langauge nil</tt> is perfectly valid, <tt>nil</tt> is not a valid language.
+ def valid_language?(language)
+ LOCALIZED_STRINGS.has_key? language.to_sym rescue false
+ end
+ end
+end
diff --git a/redmine/vendor/plugins/gloc-1.1.0/tasks/gloc.rake b/redmine/vendor/plugins/gloc-1.1.0/tasks/gloc.rake
new file mode 100644
index 000000000..8da73779e
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/tasks/gloc.rake
@@ -0,0 +1,30 @@
+namespace :gloc do
+ desc 'Sorts the keys in the lang ymls'
+ task :sort do
+ dir = ENV['DIR'] || '{.,vendor/plugins/*}/lang'
+ puts "Processing directory #{dir}"
+ files = Dir.glob(File.join(dir,'*.{yaml,yml}'))
+ puts 'No files found.' if files.empty?
+ files.each {|file|
+ puts "Sorting file: #{file}"
+ header = []
+ content = IO.readlines(file)
+ content.each {|line| line.gsub!(/[\s\r\n\t]+$/,'')}
+ content.delete_if {|line| line==''}
+ tmp= []
+ content.each {|x| tmp << x unless tmp.include?(x)}
+ content= tmp
+ header << content.shift if !content.empty? && content[0] =~ /^file_charset:/
+ content.sort!
+ filebak = "#{file}.bak"
+ File.rename file, filebak
+ File.open(file, 'w') {|fout| fout << header.join("\n") << content.join("\n") << "\n"}
+ File.delete filebak
+ # Report duplicates
+ count= {}
+ content.map {|x| x.gsub(/:.+$/, '') }.each {|x| count[x] ||= 0; count[x] += 1}
+ count.delete_if {|k,v|v==1}
+ puts count.keys.sort.map{|x|" WARNING: Duplicate key '#{x}' (#{count[x]} occurances)"}.join("\n") unless count.empty?
+ }
+ end
+end \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/gloc_rails_test.rb b/redmine/vendor/plugins/gloc-1.1.0/test/gloc_rails_test.rb
new file mode 100644
index 000000000..4cb232904
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/gloc_rails_test.rb
@@ -0,0 +1,118 @@
+# Copyright (c) 2005-2006 David Barri
+
+$LOAD_PATH.push File.join(File.dirname(__FILE__),'..','lib')
+require "#{File.dirname(__FILE__)}/../../../../test/test_helper"
+require "#{File.dirname(__FILE__)}/../init"
+
+class GLocRailsTestController < ActionController::Base
+ autodetect_language_filter :only => :auto, :on_set_lang => :called_when_set, :on_no_lang => :called_when_bad
+ autodetect_language_filter :only => :auto2, :check_accept_header => false, :check_params => 'xx'
+ autodetect_language_filter :only => :auto3, :check_cookie => false
+ autodetect_language_filter :only => :auto4, :check_cookie => 'qwe', :check_params => false
+ def rescue_action(e) raise e end
+ def auto; render :text => 'auto'; end
+ def auto2; render :text => 'auto'; end
+ def auto3; render :text => 'auto'; end
+ def auto4; render :text => 'auto'; end
+ attr_accessor :callback_set, :callback_bad
+ def called_when_set(l) @callback_set ||= 0; @callback_set += 1 end
+ def called_when_bad; @callback_bad ||= 0; @callback_bad += 1 end
+end
+
+class GLocRailsTest < Test::Unit::TestCase
+
+ def setup
+ @lstrings = GLoc::LOCALIZED_STRINGS.clone
+ @old_config= GLoc::CONFIG.clone
+ begin_new_request
+ end
+
+ def teardown
+ GLoc.clear_strings
+ GLoc::LOCALIZED_STRINGS.merge! @lstrings
+ GLoc::CONFIG.merge! @old_config
+ end
+
+ def begin_new_request
+ @controller = GLocRailsTestController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ end
+
+ def test_autodetect_language
+ GLoc::CONFIG[:default_language]= :def
+ GLoc::CONFIG[:default_param_name] = 'plang'
+ GLoc::CONFIG[:default_cookie_name] = 'clang'
+ GLoc.clear_strings
+ GLoc.add_localized_strings :en, :a => 'a'
+ GLoc.add_localized_strings :en_au, :a => 'a'
+ GLoc.add_localized_strings :en_US, :a => 'a'
+ GLoc.add_localized_strings :Ja, :a => 'a'
+ GLoc.add_localized_strings :ZH_HK, :a => 'a'
+
+ # default
+ subtest_autodetect_language :def, nil, nil, nil
+ subtest_autodetect_language :def, 'its', 'all', 'bullshit,man;q=zxc'
+ # simple
+ subtest_autodetect_language :en_au, 'en_au', nil, nil
+ subtest_autodetect_language :en_US, nil, 'en_us', nil
+ subtest_autodetect_language :Ja, nil, nil, 'ja'
+ # priority
+ subtest_autodetect_language :Ja, 'ja', 'en_us', 'qwe_ja,zh,monkey_en;q=0.5'
+ subtest_autodetect_language :en_US, 'why', 'en_us', 'qwe_ja,zh,monkey_en;q=0.5'
+ subtest_autodetect_language :Ja, nil, nil, 'qwe_en,JA,zh,monkey_en;q=0.5'
+ # dashes to underscores in accept string
+ subtest_autodetect_language :en_au, 'monkey', nil, 'de,EN-Au'
+ # remove dialect
+ subtest_autodetect_language :en, nil, 'en-bullshit', nil
+ subtest_autodetect_language :en, 'monkey', nil, 'de,EN-NZ,ja'
+ # different dialect
+ subtest_autodetect_language :ZH_HK, 'zh', nil, 'de,EN-NZ,ja'
+ subtest_autodetect_language :ZH_HK, 'monkey', 'zh', 'de,EN-NZ,ja'
+
+ # Check param/cookie names use defaults
+ GLoc::CONFIG[:default_param_name] = 'p_lang'
+ GLoc::CONFIG[:default_cookie_name] = 'c_lang'
+ # :check_params
+ subtest_autodetect_language :def, 'en_au', nil, nil
+ subtest_autodetect_language :en_au, {:p_lang => 'en_au'}, nil, nil
+ # :check_cookie
+ subtest_autodetect_language :def, nil, 'en_us', nil
+ subtest_autodetect_language :en_US, nil, {:c_lang => 'en_us'}, nil
+ GLoc::CONFIG[:default_param_name] = 'plang'
+ GLoc::CONFIG[:default_cookie_name] = 'clang'
+
+ # autodetect_language_filter :only => :auto2, :check_accept_header => false, :check_params => 'xx'
+ subtest_autodetect_language :def, 'ja', nil, 'en_US', :auto2
+ subtest_autodetect_language :Ja, {:xx => 'ja'}, nil, 'en_US', :auto2
+ subtest_autodetect_language :en_au, 'ja', 'en_au', 'en_US', :auto2
+
+ # autodetect_language_filter :only => :auto3, :check_cookie => false
+ subtest_autodetect_language :Ja, 'ja', 'en_us', 'qwe_ja,zh,monkey_en;q=0.5', :auto3
+ subtest_autodetect_language :ZH_HK, 'hehe', 'en_us', 'qwe_ja,zh,monkey_en;q=0.5', :auto3
+
+ # autodetect_language_filter :only => :auto4, :check_cookie => 'qwe', :check_params => false
+ subtest_autodetect_language :def, 'ja', 'en_us', nil, :auto4
+ subtest_autodetect_language :ZH_HK, 'ja', 'en_us', 'qwe_ja,zh,monkey_en;q=0.5', :auto4
+ subtest_autodetect_language :en_US, 'ja', {:qwe => 'en_us'}, 'ja', :auto4
+ end
+
+ def subtest_autodetect_language(expected,params,cookie,accept, action=:auto)
+ begin_new_request
+ params= {'plang' => params} if params.is_a?(String)
+ params ||= {}
+ if cookie
+ cookie={'clang' => cookie} unless cookie.is_a?(Hash)
+ cookie.each_pair {|k,v| @request.cookies[k.to_s]= CGI::Cookie.new(k.to_s,v)}
+ end
+ @request.env['HTTP_ACCEPT_LANGUAGE']= accept
+ get action, params
+ assert_equal expected, @controller.current_language
+ if action == :auto
+ s,b = expected != :def ? [1,nil] : [nil,1]
+ assert_equal s, @controller.callback_set
+ assert_equal b, @controller.callback_bad
+ end
+ end
+
+end \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/gloc_test.rb b/redmine/vendor/plugins/gloc-1.1.0/test/gloc_test.rb
new file mode 100644
index 000000000..a39d5c41c
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/gloc_test.rb
@@ -0,0 +1,433 @@
+# Copyright (c) 2005-2006 David Barri
+
+$LOAD_PATH.push File.join(File.dirname(__FILE__),'..','lib')
+require 'gloc'
+require 'gloc-ruby'
+require 'gloc-config'
+require 'gloc-rails-text'
+require File.join(File.dirname(__FILE__),'lib','rails-time_ext') unless 3.respond_to?(:days)
+require File.join(File.dirname(__FILE__),'lib','rails-string_ext') unless ''.respond_to?(:starts_with?)
+#require 'gloc-dev'
+
+class LClass; include GLoc; end
+class LClass2 < LClass; end
+class LClass_en < LClass2; set_language :en; end
+class LClass_ja < LClass2; set_language :ja; end
+# class LClass_forced_au < LClass; set_language :en; force_language :en_AU; set_language :ja; end
+
+class GLocTest < Test::Unit::TestCase
+ include GLoc
+ include ActionView::Helpers::DateHelper
+
+ def setup
+ @l1 = LClass.new
+ @l2 = LClass.new
+ @l3 = LClass.new
+ @l1.set_language :ja
+ @l2.set_language :en
+ @l3.set_language 'en_AU'
+ @gloc_state= GLoc.backup_state true
+ GLoc::CONFIG.merge!({
+ :default_param_name => 'lang',
+ :default_cookie_name => 'lang',
+ :default_language => :ja,
+ :raise_string_not_found_errors => true,
+ :verbose => false,
+ })
+ end
+
+ def teardown
+ GLoc.restore_state @gloc_state
+ end
+
+ #---------------------------------------------------------------------------
+
+ def test_basic
+ assert_localized_value [nil, @l1, @l2, @l3], nil, :in_both_langs
+
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+
+ assert_localized_value [nil, @l1], 'enにもjaにもある', :in_both_langs
+ assert_localized_value [nil, @l1], '日本語のみ', :ja_only
+ assert_localized_value [nil, @l1], nil, :en_only
+
+ assert_localized_value @l2, 'This is in en+ja', :in_both_langs
+ assert_localized_value @l2, nil, :ja_only
+ assert_localized_value @l2, 'English only', :en_only
+
+ assert_localized_value @l3, "Thiz in en 'n' ja", :in_both_langs
+ assert_localized_value @l3, nil, :ja_only
+ assert_localized_value @l3, 'Aussie English only bro', :en_only
+
+ @l3.set_language :en
+ assert_localized_value @l3, 'This is in en+ja', :in_both_langs
+ assert_localized_value @l3, nil, :ja_only
+ assert_localized_value @l3, 'English only', :en_only
+
+ assert_localized_value nil, 'enにもjaにもある', :in_both_langs
+ assert_localized_value nil, '日本語のみ', :ja_only
+ assert_localized_value nil, nil, :en_only
+ end
+
+ def test_load_twice_with_override
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang2')
+
+ assert_localized_value [nil, @l1], '更新された', :in_both_langs
+ assert_localized_value [nil, @l1], '日本語のみ', :ja_only
+ assert_localized_value [nil, @l1], nil, :en_only
+ assert_localized_value [nil, @l1], nil, :new_en
+ assert_localized_value [nil, @l1], '新たな日本語ストリング', :new_ja
+
+ assert_localized_value @l2, 'This is in en+ja', :in_both_langs
+ assert_localized_value @l2, nil, :ja_only
+ assert_localized_value @l2, 'overriden dude', :en_only
+ assert_localized_value @l2, 'This is a new English string', :new_en
+ assert_localized_value @l2, nil, :new_ja
+
+ assert_localized_value @l3, "Thiz in en 'n' ja", :in_both_langs
+ assert_localized_value @l3, nil, :ja_only
+ assert_localized_value @l3, 'Aussie English only bro', :en_only
+ end
+
+ def test_load_twice_without_override
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang2'), false
+
+ assert_localized_value [nil, @l1], 'enにもjaにもある', :in_both_langs
+ assert_localized_value [nil, @l1], '日本語のみ', :ja_only
+ assert_localized_value [nil, @l1], nil, :en_only
+ assert_localized_value [nil, @l1], nil, :new_en
+ assert_localized_value [nil, @l1], '新たな日本語ストリング', :new_ja
+
+ assert_localized_value @l2, 'This is in en+ja', :in_both_langs
+ assert_localized_value @l2, nil, :ja_only
+ assert_localized_value @l2, 'English only', :en_only
+ assert_localized_value @l2, 'This is a new English string', :new_en
+ assert_localized_value @l2, nil, :new_ja
+
+ assert_localized_value @l3, "Thiz in en 'n' ja", :in_both_langs
+ assert_localized_value @l3, nil, :ja_only
+ assert_localized_value @l3, 'Aussie English only bro', :en_only
+ end
+
+ def test_add_localized_strings
+ assert_localized_value nil, nil, :add
+ assert_localized_value nil, nil, :ja_only
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+ assert_localized_value nil, nil, :add
+ assert_localized_value nil, '日本語のみ', :ja_only
+ GLoc.add_localized_strings 'en', {:ja_only => 'bullshit'}, true
+ GLoc.add_localized_strings 'en', {:ja_only => 'bullshit'}, false
+ assert_localized_value nil, nil, :add
+ assert_localized_value nil, '日本語のみ', :ja_only
+ GLoc.add_localized_strings 'ja', {:ja_only => 'bullshit', :add => '123'}, false
+ assert_localized_value nil, '123', :add
+ assert_localized_value nil, '日本語のみ', :ja_only
+ GLoc.add_localized_strings 'ja', {:ja_only => 'bullshit', :add => '234'}
+ assert_localized_value nil, '234', :add
+ assert_localized_value nil, 'bullshit', :ja_only
+ end
+
+ def test_class_set_language
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+
+ @l1 = LClass_ja.new
+ @l2 = LClass_en.new
+ @l3 = LClass_en.new
+
+ assert_localized_value @l1, 'enにもjaにもある', :in_both_langs
+ assert_localized_value @l2, 'This is in en+ja', :in_both_langs
+ assert_localized_value @l3, 'This is in en+ja', :in_both_langs
+
+ @l3.set_language 'en_AU'
+
+ assert_localized_value @l1, 'enにもjaにもある', :in_both_langs
+ assert_localized_value @l2, 'This is in en+ja', :in_both_langs
+ assert_localized_value @l3, "Thiz in en 'n' ja", :in_both_langs
+ end
+
+ def test_ll
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+
+ assert_equal 'enにもjaにもある', ll('ja',:in_both_langs)
+ assert_equal 'enにもjaにもある', GLoc::ll('ja',:in_both_langs)
+ assert_equal 'enにもjaにもある', LClass_en.ll('ja',:in_both_langs)
+ assert_equal 'enにもjaにもある', LClass_ja.ll('ja',:in_both_langs)
+
+ assert_equal 'This is in en+ja', ll('en',:in_both_langs)
+ assert_equal 'This is in en+ja', GLoc::ll('en',:in_both_langs)
+ assert_equal 'This is in en+ja', LClass_en.ll('en',:in_both_langs)
+ assert_equal 'This is in en+ja', LClass_ja.ll('en',:in_both_langs)
+ end
+
+ def test_lsym
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'lang')
+ assert_equal 'enにもjaにもある', LClass_ja.ltry(:in_both_langs)
+ assert_equal 'hello', LClass_ja.ltry('hello')
+ assert_equal nil, LClass_ja.ltry(nil)
+ end
+
+# def test_forced
+# assert_equal :en_AU, LClass_forced_au.current_language
+# a= LClass_forced_au.new
+# a.set_language :ja
+# assert_equal :en_AU, a.current_language
+# a.force_language :ja
+# assert_equal :ja, a.current_language
+# assert_equal :en_AU, LClass_forced_au.current_language
+# end
+
+ def test_pluralization
+ GLoc.add_localized_strings :en, :_gloc_rule_default => %[|n| case n; when 0 then '_none'; when 1 then '_single'; else '_many'; end], :a_single => '%d man', :a_many => '%d men', :a_none => 'No men'
+ GLoc.add_localized_strings :en, :_gloc_rule_asd => %[|n| n<10 ? '_few' : '_heaps'], :a_few => 'a few men (%d)', :a_heaps=> 'soo many men'
+ set_language :en
+
+ assert_equal 'No men', lwr(:a, 0)
+ assert_equal '1 man', lwr(:a, 1)
+ assert_equal '3 men', lwr(:a, 3)
+ assert_equal '20 men', lwr(:a, 20)
+
+ assert_equal 'a few men (0)', lwr_(:asd, :a, 0)
+ assert_equal 'a few men (1)', lwr_(:asd, :a, 1)
+ assert_equal 'a few men (3)', lwr_(:asd, :a, 3)
+ assert_equal 'soo many men', lwr_(:asd, :a, 12)
+ assert_equal 'soo many men', lwr_(:asd, :a, 20)
+
+ end
+
+ def test_distance_in_words
+ load_default_strings
+ [
+ [20.seconds, 'less than a minute', '1分以内', 'меньше минуты'],
+ [80.seconds, '1 minute', '1分', '1 минуту'],
+ [3.seconds, 'less than 5 seconds', '5秒以内', 'менее 5 секунд', true],
+ [9.seconds, 'less than 10 seconds', '10秒以内', 'менее 10 секунд', true],
+ [16.seconds, 'less than 20 seconds', '20秒以内', 'менее 20 секунд', true],
+ [35.seconds, 'half a minute', '約30秒', 'полминуты', true],
+ [50.seconds, 'less than a minute', '1分以内', 'меньше минуты', true],
+ [1.1.minutes, '1 minute', '1分', '1 минуту'],
+ [2.1.minutes, '2 minutes', '2分', '2 минуты'],
+ [4.1.minutes, '4 minutes', '4分', '4 минуты'],
+ [5.1.minutes, '5 minutes', '5分', '5 минут'],
+ [1.1.hours, 'about an hour', '約1時間', 'около часа'],
+ [3.1.hours, 'about 3 hours', '約3時間', 'около 3 часов'],
+ [9.1.hours, 'about 9 hours', '約9時間', 'около 9 часов'],
+ [1.1.days, '1 day', '1日間', '1 день'],
+ [2.1.days, '2 days', '2日間', '2 дня'],
+ [4.days, '4 days', '4日間', '4 дня'],
+ [6.days, '6 days', '6日間', '6 дней'],
+ [11.days, '11 days', '11日間', '11 дней'],
+ [12.days, '12 days', '12日間', '12 дней'],
+ [15.days, '15 days', '15日間', '15 дней'],
+ [20.days, '20 days', '20日間', '20 дней'],
+ [21.days, '21 days', '21日間', '21 день'],
+ [22.days, '22 days', '22日間', '22 дня'],
+ [25.days, '25 days', '25日間', '25 дней'],
+ ].each do |a|
+ t, en, ja, ru = a
+ inc_sec= (a.size == 5) ? a[-1] : false
+ set_language :en
+ assert_equal en, distance_of_time_in_words(t,0,inc_sec)
+ set_language :ja
+ assert_equal ja, distance_of_time_in_words(t,0,inc_sec)
+ set_language :ru
+ assert_equal ru, distance_of_time_in_words(t,0,inc_sec)
+ end
+ end
+
+ def test_age
+ load_default_strings
+ [
+ [1, '1 yr', '1歳', '1 год'],
+ [22, '22 yrs', '22歳', '22 года'],
+ [27, '27 yrs', '27歳', '27 лет'],
+ ].each do |a, en, ja, ru|
+ set_language :en
+ assert_equal en, l_age(a)
+ set_language :ja
+ assert_equal ja, l_age(a)
+ set_language :ru
+ assert_equal ru, l_age(a)
+ end
+ end
+
+ def test_yesno
+ load_default_strings
+ set_language :en
+ assert_equal 'yes', l_yesno(true)
+ assert_equal 'no', l_yesno(false)
+ assert_equal 'Yes', l_YesNo(true)
+ assert_equal 'No', l_YesNo(false)
+ end
+
+ def test_all_languages_have_values_for_helpers
+ load_default_strings
+ t= Time.local(2000, 9, 15, 11, 23, 57)
+ GLoc.valid_languages.each {|l|
+ set_language l
+ 0.upto(120) {|n| l_age(n)}
+ l_date(t)
+ l_datetime(t)
+ l_datetime_short(t)
+ l_time(t)
+ [true,false].each{|v| l_YesNo(v); l_yesno(v) }
+ }
+ end
+
+ def test_similar_languages
+ GLoc.add_localized_strings :en, :a => 'a'
+ GLoc.add_localized_strings :en_AU, :a => 'a'
+ GLoc.add_localized_strings :ja, :a => 'a'
+ GLoc.add_localized_strings :zh_tw, :a => 'a'
+
+ assert_equal :en, GLoc.similar_language(:en)
+ assert_equal :en, GLoc.similar_language('en')
+ assert_equal :ja, GLoc.similar_language(:ja)
+ assert_equal :ja, GLoc.similar_language('ja')
+ # lowercase + dashes to underscores
+ assert_equal :en, GLoc.similar_language('EN')
+ assert_equal :en, GLoc.similar_language(:EN)
+ assert_equal :en_AU, GLoc.similar_language(:EN_Au)
+ assert_equal :en_AU, GLoc.similar_language('eN-Au')
+ # remove dialect
+ assert_equal :ja, GLoc.similar_language(:ja_Au)
+ assert_equal :ja, GLoc.similar_language('JA-ASDF')
+ assert_equal :ja, GLoc.similar_language('jA_ASD_ZXC')
+ # different dialect
+ assert_equal :zh_tw, GLoc.similar_language('ZH')
+ assert_equal :zh_tw, GLoc.similar_language('ZH_HK')
+ assert_equal :zh_tw, GLoc.similar_language('ZH-BUL')
+ # non matching
+ assert_equal nil, GLoc.similar_language('WW')
+ assert_equal nil, GLoc.similar_language('WW_AU')
+ assert_equal nil, GLoc.similar_language('WW-AU')
+ assert_equal nil, GLoc.similar_language('eZ_en')
+ assert_equal nil, GLoc.similar_language('AU-ZH')
+ end
+
+ def test_clear_strings_and_similar_langs
+ GLoc.add_localized_strings :en, :a => 'a'
+ GLoc.add_localized_strings :en_AU, :a => 'a'
+ GLoc.add_localized_strings :ja, :a => 'a'
+ GLoc.add_localized_strings :zh_tw, :a => 'a'
+ GLoc.clear_strings :en, :ja
+ assert_equal nil, GLoc.similar_language('ja')
+ assert_equal :en_AU, GLoc.similar_language('en')
+ assert_equal :zh_tw, GLoc.similar_language('ZH_HK')
+ GLoc.clear_strings
+ assert_equal nil, GLoc.similar_language('ZH_HK')
+ end
+
+ def test_lang_name
+ GLoc.add_localized_strings :en, :general_lang_en => 'English', :general_lang_ja => 'Japanese'
+ GLoc.add_localized_strings :ja, :general_lang_en => '英語', :general_lang_ja => '日本語'
+ set_language :en
+ assert_equal 'Japanese', l_lang_name(:ja)
+ assert_equal 'English', l_lang_name('en')
+ set_language :ja
+ assert_equal '日本語', l_lang_name('ja')
+ assert_equal '英語', l_lang_name(:en)
+ end
+
+ def test_charset_change_all
+ load_default_strings
+ GLoc.add_localized_strings :ja2, :a => 'a'
+ GLoc.valid_languages # Force refresh if in dev mode
+ GLoc.class_eval 'LOCALIZED_STRINGS[:ja2]= LOCALIZED_STRINGS[:ja].clone'
+
+ [:ja, :ja2].each do |l|
+ set_language l
+ assert_equal 'はい', l_yesno(true)
+ assert_equal "E381AFE38184", l_yesno(true).unpack('H*')[0].upcase
+ end
+
+ GLoc.set_charset 'sjis'
+ assert_equal 'sjis', GLoc.get_charset(:ja)
+ assert_equal 'sjis', GLoc.get_charset(:ja2)
+
+ [:ja, :ja2].each do |l|
+ set_language l
+ assert_equal "82CD82A2", l_yesno(true).unpack('H*')[0].upcase
+ end
+ end
+
+ def test_charset_change_single
+ load_default_strings
+ GLoc.add_localized_strings :ja2, :a => 'a'
+ GLoc.add_localized_strings :ja3, :a => 'a'
+ GLoc.valid_languages # Force refresh if in dev mode
+ GLoc.class_eval 'LOCALIZED_STRINGS[:ja2]= LOCALIZED_STRINGS[:ja].clone'
+ GLoc.class_eval 'LOCALIZED_STRINGS[:ja3]= LOCALIZED_STRINGS[:ja].clone'
+
+ [:ja, :ja2, :ja3].each do |l|
+ set_language l
+ assert_equal 'はい', l_yesno(true)
+ assert_equal "E381AFE38184", l_yesno(true).unpack('H*')[0].upcase
+ end
+
+ GLoc.set_charset 'sjis', :ja
+ assert_equal 'sjis', GLoc.get_charset(:ja)
+ assert_equal 'utf-8', GLoc.get_charset(:ja2)
+ assert_equal 'utf-8', GLoc.get_charset(:ja3)
+
+ set_language :ja
+ assert_equal "82CD82A2", l_yesno(true).unpack('H*')[0].upcase
+ set_language :ja2
+ assert_equal "E381AFE38184", l_yesno(true).unpack('H*')[0].upcase
+ set_language :ja3
+ assert_equal "E381AFE38184", l_yesno(true).unpack('H*')[0].upcase
+
+ GLoc.set_charset 'euc-jp', :ja, :ja3
+ assert_equal 'euc-jp', GLoc.get_charset(:ja)
+ assert_equal 'utf-8', GLoc.get_charset(:ja2)
+ assert_equal 'euc-jp', GLoc.get_charset(:ja3)
+
+ set_language :ja
+ assert_equal "A4CFA4A4", l_yesno(true).unpack('H*')[0].upcase
+ set_language :ja2
+ assert_equal "E381AFE38184", l_yesno(true).unpack('H*')[0].upcase
+ set_language :ja3
+ assert_equal "A4CFA4A4", l_yesno(true).unpack('H*')[0].upcase
+ end
+
+ def test_set_language_if_valid
+ GLoc.add_localized_strings :en, :a => 'a'
+ GLoc.add_localized_strings :zh_tw, :a => 'a'
+
+ assert set_language_if_valid('en')
+ assert_equal :en, current_language
+
+ assert set_language_if_valid('zh_tw')
+ assert_equal :zh_tw, current_language
+
+ assert !set_language_if_valid(nil)
+ assert_equal :zh_tw, current_language
+
+ assert !set_language_if_valid('ja')
+ assert_equal :zh_tw, current_language
+
+ assert set_language_if_valid(:en)
+ assert_equal :en, current_language
+ end
+
+ #===========================================================================
+ protected
+
+ def assert_localized_value(objects,expected,key)
+ objects = [objects] unless objects.kind_of?(Array)
+ objects.each {|object|
+ o = object || GLoc
+ assert_equal !expected.nil?, o.l_has_string?(key)
+ if expected.nil?
+ assert_raise(GLoc::StringNotFoundError) {o.l(key)}
+ else
+ assert_equal expected, o.l(key)
+ end
+ }
+ end
+
+ def load_default_strings
+ GLoc.load_localized_strings File.join(File.dirname(__FILE__),'..','lang')
+ end
+end \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/lang/en.yaml b/redmine/vendor/plugins/gloc-1.1.0/test/lang/en.yaml
new file mode 100644
index 000000000..325dc599e
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/lang/en.yaml
@@ -0,0 +1,2 @@
+in_both_langs: This is in en+ja
+en_only: English only \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/lang/en_AU.yaml b/redmine/vendor/plugins/gloc-1.1.0/test/lang/en_AU.yaml
new file mode 100644
index 000000000..307cc7859
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/lang/en_AU.yaml
@@ -0,0 +1,2 @@
+in_both_langs: Thiz in en 'n' ja
+en_only: Aussie English only bro \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/lang/ja.yml b/redmine/vendor/plugins/gloc-1.1.0/test/lang/ja.yml
new file mode 100644
index 000000000..64df03376
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/lang/ja.yml
@@ -0,0 +1,2 @@
+in_both_langs: enにもjaにもある
+ja_only: 日本語のみ \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/lang2/en.yml b/redmine/vendor/plugins/gloc-1.1.0/test/lang2/en.yml
new file mode 100644
index 000000000..e6467e7a0
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/lang2/en.yml
@@ -0,0 +1,2 @@
+en_only: overriden dude
+new_en: This is a new English string \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/lang2/ja.yaml b/redmine/vendor/plugins/gloc-1.1.0/test/lang2/ja.yaml
new file mode 100644
index 000000000..864b287d0
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/lang2/ja.yaml
@@ -0,0 +1,2 @@
+in_both_langs: 更新された
+new_ja: 新たな日本語ストリング \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-string_ext.rb b/redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-string_ext.rb
new file mode 100644
index 000000000..418d28db2
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-string_ext.rb
@@ -0,0 +1,23 @@
+module ActiveSupport #:nodoc:
+ module CoreExtensions #:nodoc:
+ module String #:nodoc:
+ # Additional string tests.
+ module StartsEndsWith
+ # Does the string start with the specified +prefix+?
+ def starts_with?(prefix)
+ prefix = prefix.to_s
+ self[0, prefix.length] == prefix
+ end
+
+ # Does the string end with the specified +suffix+?
+ def ends_with?(suffix)
+ suffix = suffix.to_s
+ self[-suffix.length, suffix.length] == suffix
+ end
+ end
+ end
+ end
+end
+class String
+ include ActiveSupport::CoreExtensions::String::StartsEndsWith
+end \ No newline at end of file
diff --git a/redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-time_ext.rb b/redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-time_ext.rb
new file mode 100644
index 000000000..d8771e4e6
--- /dev/null
+++ b/redmine/vendor/plugins/gloc-1.1.0/test/lib/rails-time_ext.rb
@@ -0,0 +1,76 @@
+module ActiveSupport #:nodoc:
+ module CoreExtensions #:nodoc:
+ module Numeric #:nodoc:
+ # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years.
+ #
+ # If you need precise date calculations that doesn't just treat months as 30 days, then have
+ # a look at Time#advance.
+ #
+ # Some of these methods are approximations, Ruby's core
+ # Date[http://stdlib.rubyonrails.org/libdoc/date/rdoc/index.html] and
+ # Time[http://stdlib.rubyonrails.org/libdoc/time/rdoc/index.html] should be used for precision
+ # date and time arithmetic
+ module Time
+ def seconds
+ self
+ end
+ alias :second :seconds
+
+ def minutes
+ self * 60
+ end
+ alias :minute :minutes
+
+ def hours
+ self * 60.minutes
+ end
+ alias :hour :hours
+
+ def days
+ self * 24.hours
+ end
+ alias :day :days
+
+ def weeks
+ self * 7.days
+ end
+ alias :week :weeks
+
+ def fortnights
+ self * 2.weeks
+ end
+ alias :fortnight :fortnights
+
+ def months
+ self * 30.days
+ end
+ alias :month :months
+
+ def years
+ (self * 365.25.days).to_i
+ end
+ alias :year :years
+
+ # Reads best without arguments: 10.minutes.ago
+ def ago(time = ::Time.now)
+ time - self
+ end
+
+ # Reads best with argument: 10.minutes.until(time)
+ alias :until :ago
+
+ # Reads best with argument: 10.minutes.since(time)
+ def since(time = ::Time.now)
+ time + self
+ end
+
+ # Reads best without arguments: 10.minutes.from_now
+ alias :from_now :since
+ end
+ end
+ end
+end
+
+class Numeric #:nodoc:
+ include ActiveSupport::CoreExtensions::Numeric::Time
+end
diff --git a/redmine/vendor/plugins/localization/lib/localization.rb b/redmine/vendor/plugins/localization/lib/localization.rb
index 5fe0b1ed6..d1756b109 100644
--- a/redmine/vendor/plugins/localization/lib/localization.rb
+++ b/redmine/vendor/plugins/localization/lib/localization.rb
@@ -12,7 +12,7 @@ module Localization
@@l10s = { :default => {} }
@@lang = :default
- @@langs = []
+ @@langs = {}
def self._(string_to_localize, *args)
translated = @@l10s[@@lang][string_to_localize] || string_to_localize
@@ -29,9 +29,9 @@ module Localization
def self.define(lang = :default, name = :default)
@@l10s[lang] ||= {}
- @@langs << [ name, lang ]
+ @@langs[lang] = [ name ]
yield @@l10s[lang]
- end
+ end
def self.load
Dir.glob("#{RAILS_ROOT}/lang/*.rb"){ |t| require t }