##// END OF EJS Templates
scm: use i18n string at 'Path to repository' setting in Mercurial, Git, Bazaar and Darcs....
Toshi MARUYAMA -
r5409:36eac0dc8df8
parent child
Show More
@@ -198,7 +198,8 module RepositoriesHelper
198 198 end
199 199
200 200 def darcs_field_tags(form, repository)
201 content_tag('p', form.text_field(:url, :label => 'Path to repository',
201 content_tag('p', form.text_field(
202 :url, :label => l("field_path_to_repository"),
202 203 :size => 60, :required => true,
203 204 :disabled => (repository && !repository.new_record?))) +
204 205 content_tag('p', form.select(
@@ -208,7 +209,7 module RepositoriesHelper
208 209
209 210 def mercurial_field_tags(form, repository)
210 211 content_tag('p', form.text_field(
211 :url, :label => 'Path to repository',
212 :url, :label => l("field_path_to_repository"),
212 213 :size => 60, :required => true,
213 214 :disabled => (repository && !repository.root_url.blank?)
214 215 ) +
@@ -221,10 +222,12 module RepositoriesHelper
221 222 end
222 223
223 224 def git_field_tags(form, repository)
224 content_tag('p', form.text_field(:url, :label => 'Path to repository',
225 content_tag('p', form.text_field(
226 :url, :label => l("field_path_to_repository"),
225 227 :size => 60, :required => true,
226 :disabled => (repository && !repository.root_url.blank?)) +
227 '<br />Bare and local repository (e.g. /gitrepo, c:\gitrepo)') +
228 :disabled => (repository && !repository.root_url.blank?)
229 ) +
230 '<br />Bare and local repository (e.g. /gitrepo, c:\gitrepo)') +
228 231 content_tag('p', form.select(
229 232 :path_encoding, [nil] + Setting::ENCODINGS,
230 233 :label => l("field_scm_path_encoding")
@@ -250,7 +253,8 module RepositoriesHelper
250 253 end
251 254
252 255 def bazaar_field_tags(form, repository)
253 content_tag('p', form.text_field(:url, :label => 'Path to repository',
256 content_tag('p', form.text_field(
257 :url, :label => l("field_path_to_repository"),
254 258 :size => 60, :required => true,
255 259 :disabled => (repository && !repository.new_record?))) +
256 260 content_tag('p', form.select(
@@ -21,11 +21,12 class Repository::Bazaar < Repository
21 21 attr_protected :root_url
22 22 validates_presence_of :url, :log_encoding
23 23
24 ATTRIBUTE_KEY_NAMES = {
25 "url" => "Path to repository",
26 }
27 24 def self.human_attribute_name(attribute_key_name)
28 ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
25 attr_name = attribute_key_name
26 if attr_name == "url"
27 attr_name = "path_to_repository"
28 end
29 super(attr_name)
29 30 end
30 31
31 32 def self.scm_adapter_class
@@ -20,11 +20,12 require 'redmine/scm/adapters/darcs_adapter'
20 20 class Repository::Darcs < Repository
21 21 validates_presence_of :url, :log_encoding
22 22
23 ATTRIBUTE_KEY_NAMES = {
24 "url" => "Path to repository",
25 }
26 23 def self.human_attribute_name(attribute_key_name)
27 ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
24 attr_name = attribute_key_name
25 if attr_name == "url"
26 attr_name = "path_to_repository"
27 end
28 super(attr_name)
28 29 end
29 30
30 31 def self.scm_adapter_class
@@ -21,11 +21,12 class Repository::Git < Repository
21 21 attr_protected :root_url
22 22 validates_presence_of :url
23 23
24 ATTRIBUTE_KEY_NAMES = {
25 "url" => "Path to repository",
26 }
27 24 def self.human_attribute_name(attribute_key_name)
28 ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
25 attr_name = attribute_key_name
26 if attr_name == "url"
27 attr_name = "path_to_repository"
28 end
29 super(attr_name)
29 30 end
30 31
31 32 def self.scm_adapter_class
@@ -26,11 +26,12 class Repository::Mercurial < Repository
26 26
27 27 FETCH_AT_ONCE = 100 # number of changesets to fetch at once
28 28
29 ATTRIBUTE_KEY_NAMES = {
30 "url" => "Path to repository",
31 }
32 29 def self.human_attribute_name(attribute_key_name)
33 ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
30 attr_name = attribute_key_name
31 if attr_name == "url"
32 attr_name = "path_to_repository"
33 end
34 super(attr_name)
34 35 end
35 36
36 37 def self.scm_adapter_class
@@ -311,6 +311,7 en:
311 311 field_is_private: Private
312 312 field_commit_logs_encoding: Commit messages encoding
313 313 field_scm_path_encoding: Path encoding
314 field_path_to_repository: Path to repository
314 315
315 316 setting_app_title: Application title
316 317 setting_app_subtitle: Application subtitle
General Comments 0
You need to be logged in to leave comments. Login now