end
def darcs_field_tags(form, repository)
- content_tag('p', form.text_field(:url, :label => 'Path to repository',
+ content_tag('p', form.text_field(
+ :url, :label => l("field_path_to_repository"),
:size => 60, :required => true,
:disabled => (repository && !repository.new_record?))) +
content_tag('p', form.select(
def mercurial_field_tags(form, repository)
content_tag('p', form.text_field(
- :url, :label => 'Path to repository',
+ :url, :label => l("field_path_to_repository"),
:size => 60, :required => true,
:disabled => (repository && !repository.root_url.blank?)
) +
end
def git_field_tags(form, repository)
- content_tag('p', form.text_field(:url, :label => 'Path to repository',
+ content_tag('p', form.text_field(
+ :url, :label => l("field_path_to_repository"),
:size => 60, :required => true,
- :disabled => (repository && !repository.root_url.blank?)) +
- '<br />Bare and local repository (e.g. /gitrepo, c:\gitrepo)') +
+ :disabled => (repository && !repository.root_url.blank?)
+ ) +
+ '<br />Bare and local repository (e.g. /gitrepo, c:\gitrepo)') +
content_tag('p', form.select(
:path_encoding, [nil] + Setting::ENCODINGS,
:label => l("field_scm_path_encoding")
end
def bazaar_field_tags(form, repository)
- content_tag('p', form.text_field(:url, :label => 'Path to repository',
+ content_tag('p', form.text_field(
+ :url, :label => l("field_path_to_repository"),
:size => 60, :required => true,
:disabled => (repository && !repository.new_record?))) +
content_tag('p', form.select(
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