diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-23 07:37:03 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-23 07:37:03 +0000 |
commit | 36eac0dc8df80cf7e03e90ebda2090cc84360990 (patch) | |
tree | 4534823dd060e100795c7c270a5387153764efbc /app/models/repository | |
parent | 82d5de4b4e3e2dbce699bb80b08ef6349e3eb5cd (diff) | |
download | redmine-36eac0dc8df80cf7e03e90ebda2090cc84360990.tar.gz redmine-36eac0dc8df80cf7e03e90ebda2090cc84360990.zip |
scm: use i18n string at 'Path to repository' setting in Mercurial, Git, Bazaar and Darcs.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5529 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository')
-rw-r--r-- | app/models/repository/bazaar.rb | 9 | ||||
-rw-r--r-- | app/models/repository/darcs.rb | 9 | ||||
-rw-r--r-- | app/models/repository/git.rb | 9 | ||||
-rw-r--r-- | app/models/repository/mercurial.rb | 9 |
4 files changed, 20 insertions, 16 deletions
diff --git a/app/models/repository/bazaar.rb b/app/models/repository/bazaar.rb index a4c39b471..3248331af 100644 --- a/app/models/repository/bazaar.rb +++ b/app/models/repository/bazaar.rb @@ -21,11 +21,12 @@ class Repository::Bazaar < Repository attr_protected :root_url validates_presence_of :url, :log_encoding - ATTRIBUTE_KEY_NAMES = { - "url" => "Path to repository", - } def self.human_attribute_name(attribute_key_name) - ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + attr_name = attribute_key_name + if attr_name == "url" + attr_name = "path_to_repository" + end + super(attr_name) end def self.scm_adapter_class diff --git a/app/models/repository/darcs.rb b/app/models/repository/darcs.rb index f6f85e3a3..966be33a9 100644 --- a/app/models/repository/darcs.rb +++ b/app/models/repository/darcs.rb @@ -20,11 +20,12 @@ require 'redmine/scm/adapters/darcs_adapter' class Repository::Darcs < Repository validates_presence_of :url, :log_encoding - ATTRIBUTE_KEY_NAMES = { - "url" => "Path to repository", - } def self.human_attribute_name(attribute_key_name) - ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + attr_name = attribute_key_name + if attr_name == "url" + attr_name = "path_to_repository" + end + super(attr_name) end def self.scm_adapter_class diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 13621f653..43ee72bee 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -21,11 +21,12 @@ 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 + attr_name = attribute_key_name + if attr_name == "url" + attr_name = "path_to_repository" + end + super(attr_name) end def self.scm_adapter_class diff --git a/app/models/repository/mercurial.rb b/app/models/repository/mercurial.rb index 4cf484f96..4d32d6f51 100644 --- a/app/models/repository/mercurial.rb +++ b/app/models/repository/mercurial.rb @@ -26,11 +26,12 @@ class Repository::Mercurial < Repository FETCH_AT_ONCE = 100 # number of changesets to fetch at once - ATTRIBUTE_KEY_NAMES = { - "url" => "Path to repository", - } def self.human_attribute_name(attribute_key_name) - ATTRIBUTE_KEY_NAMES[attribute_key_name] || super + attr_name = attribute_key_name + if attr_name == "url" + attr_name = "path_to_repository" + end + super(attr_name) end def self.scm_adapter_class |