scm: use i18n string at commit log encoding setting (#1735).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5519 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA committed 2011-04-23 03:34:43 +00:00
1 parent d67e4ff2f4
commit bb929f4f75
5 files changed
+17 -9

No files matched your search

+8
View File
@@ -30,6 +30,14 @@ class Repository < ActiveRecord::Base
# Checks if the SCM is enabled when creating a repository
validate_on_create { |r| r.errors.add(:type, :invalid) unless Setting.enabled_scm.include?(r.class.name.demodulize) }
def self.human_attribute_name(attribute_key_name)
attr_name = attribute_key_name
if attr_name == "log_encoding"
attr_name = "commit_logs_encoding"
end
super(attr_name)
end
# Removes leading and trailing whitespace
def url=(arg)
write_attribute(:url, arg ? arg.to_s.strip : nil)
-1
View File
@@ -23,7 +23,6 @@ class Repository::Bazaar < Repository
ATTRIBUTE_KEY_NAMES = {
"url" => "Root directory",
"log_encoding" => "Commit messages encoding",
}
def self.human_attribute_name(attribute_key_name)
ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
-1
View File
@@ -24,7 +24,6 @@ class Repository::Cvs < Repository
ATTRIBUTE_KEY_NAMES = {
"root_url" => "CVSROOT",
"url" => "Module",
"log_encoding" => "Commit messages encoding",
}
def self.human_attribute_name(attribute_key_name)
ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
-1
View File
@@ -22,7 +22,6 @@ class Repository::Darcs < Repository
ATTRIBUTE_KEY_NAMES = {
"url" => "Root directory",
"log_encoding" => "Commit messages encoding",
}
def self.human_attribute_name(attribute_key_name)
ATTRIBUTE_KEY_NAMES[attribute_key_name] || super