scm: cvs: use i18n string at 'CVSROOT' and 'Module' setting.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5535 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-23 07:40:23 +00:00
parent fbde32341e
commit 7e77d5ddf9
3 changed files with 16 additions and 8 deletions

View File

@ -236,10 +236,14 @@ module RepositoriesHelper
end
def cvs_field_tags(form, repository)
content_tag('p', form.text_field(:root_url,
:label => 'CVSROOT', :size => 60, :required => true,
content_tag('p', form.text_field(
:root_url,
:label => l("field_cvsroot"),
:size => 60, :required => true,
:disabled => !repository.new_record?)) +
content_tag('p', form.text_field(:url, :label => 'Module',
content_tag('p', form.text_field(
:url,
:label => l("field_cvs_module"),
:size => 30, :required => true,
:disabled => !repository.new_record?)) +
content_tag('p', form.select(

View File

@ -21,12 +21,14 @@ require 'digest/sha1'
class Repository::Cvs < Repository
validates_presence_of :url, :root_url, :log_encoding
ATTRIBUTE_KEY_NAMES = {
"root_url" => "CVSROOT",
"url" => "Module",
}
def self.human_attribute_name(attribute_key_name)
ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
attr_name = attribute_key_name
if attr_name == "root_url"
attr_name = "cvsroot"
elsif attr_name == "url"
attr_name = "cvs_module"
end
super(attr_name)
end
def self.scm_adapter_class

View File

@ -313,6 +313,8 @@ en:
field_scm_path_encoding: Path encoding
field_path_to_repository: Path to repository
field_root_directory: Root directory
field_cvsroot: CVSROOT
field_cvs_module: Module
setting_app_title: Application title
setting_app_subtitle: Application subtitle