diff --git a/app/models/repository/bazaar.rb b/app/models/repository/bazaar.rb index 9d7977e7e2..d68fabc9af 100644 --- a/app/models/repository/bazaar.rb +++ b/app/models/repository/bazaar.rb @@ -21,6 +21,13 @@ class Repository::Bazaar < Repository attr_protected :root_url validates_presence_of :url + ATTRIBUTE_KEY_NAMES = { + "url" => "Root directory", + } + def self.human_attribute_name(attribute_key_name) + ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + end + def self.scm_adapter_class Redmine::Scm::Adapters::BazaarAdapter end diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index 1c479d1bba..e3dfced690 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -21,6 +21,14 @@ require 'digest/sha1' class Repository::Cvs < Repository validates_presence_of :url, :root_url + ATTRIBUTE_KEY_NAMES = { + "url" => "CVSROOT", + "root_url" => "Module", + } + def self.human_attribute_name(attribute_key_name) + ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + end + def self.scm_adapter_class Redmine::Scm::Adapters::CvsAdapter end diff --git a/app/models/repository/darcs.rb b/app/models/repository/darcs.rb index dc3f0cee07..c6d7cafd01 100644 --- a/app/models/repository/darcs.rb +++ b/app/models/repository/darcs.rb @@ -20,6 +20,13 @@ require 'redmine/scm/adapters/darcs_adapter' class Repository::Darcs < Repository validates_presence_of :url + ATTRIBUTE_KEY_NAMES = { + "url" => "Root directory", + } + def self.human_attribute_name(attribute_key_name) + ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + end + def self.scm_adapter_class Redmine::Scm::Adapters::DarcsAdapter end diff --git a/app/models/repository/filesystem.rb b/app/models/repository/filesystem.rb index 4be6b52893..f06ad97c44 100644 --- a/app/models/repository/filesystem.rb +++ b/app/models/repository/filesystem.rb @@ -24,6 +24,13 @@ class Repository::Filesystem < Repository attr_protected :root_url validates_presence_of :url + ATTRIBUTE_KEY_NAMES = { + "url" => "Root directory", + } + def self.human_attribute_name(attribute_key_name) + ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + end + def self.scm_adapter_class Redmine::Scm::Adapters::FilesystemAdapter end diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 63faea6687..fb5c26a7e2 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -21,6 +21,13 @@ class Repository::Git < Repository attr_protected :root_url validates_presence_of :url + ATTRIBUTE_KEY_NAMES = { + "url" => "Path to repository", + } + def self.human_attribute_name(attribute_key_name) + ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + end + def self.scm_adapter_class Redmine::Scm::Adapters::GitAdapter end diff --git a/app/models/repository/mercurial.rb b/app/models/repository/mercurial.rb index 98575a56b7..021e60b0d5 100644 --- a/app/models/repository/mercurial.rb +++ b/app/models/repository/mercurial.rb @@ -26,6 +26,13 @@ class Repository::Mercurial < Repository FETCH_AT_ONCE = 100 # number of changesets to fetch at once + ATTRIBUTE_KEY_NAMES = { + "url" => "Root directory", + } + def self.human_attribute_name(attribute_key_name) + ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + end + def self.scm_adapter_class Redmine::Scm::Adapters::MercurialAdapter end