Procházet zdrojové kódy

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
tags/1.2.0
Toshi MARUYAMA před 13 roky
rodič
revize
36eac0dc8d

+ 10
- 6
app/helpers/repositories_helper.rb Zobrazit soubor

@@ -198,7 +198,8 @@ module RepositoriesHelper
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(
@@ -208,7 +209,7 @@ module RepositoriesHelper

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?)
) +
@@ -221,10 +222,12 @@ module RepositoriesHelper
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")
@@ -250,7 +253,8 @@ module RepositoriesHelper
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(

+ 5
- 4
app/models/repository/bazaar.rb Zobrazit soubor

@@ -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

+ 5
- 4
app/models/repository/darcs.rb Zobrazit soubor

@@ -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

+ 5
- 4
app/models/repository/git.rb Zobrazit soubor

@@ -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

+ 5
- 4
app/models/repository/mercurial.rb Zobrazit soubor

@@ -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

+ 1
- 0
config/locales/en.yml Zobrazit soubor

@@ -311,6 +311,7 @@ en:
field_is_private: Private
field_commit_logs_encoding: Commit messages encoding
field_scm_path_encoding: Path encoding
field_path_to_repository: Path to repository

setting_app_title: Application title
setting_app_subtitle: Application subtitle

Načítá se…
Zrušit
Uložit