summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/repositories_helper.rb3
-rw-r--r--app/models/repository/filesystem.rb9
-rw-r--r--config/locales/en.yml1
3 files changed, 8 insertions, 5 deletions
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index f260320de..10e39c819 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -263,7 +263,8 @@ module RepositoriesHelper
end
def filesystem_field_tags(form, repository)
- content_tag('p', form.text_field(:url, :label => 'Root directory',
+ content_tag('p', form.text_field(
+ :url, :label => l("field_root_directory"),
:size => 60, :required => true,
:disabled => (repository && !repository.root_url.blank?))) +
content_tag('p', form.select(
diff --git a/app/models/repository/filesystem.rb b/app/models/repository/filesystem.rb
index acbf41c7f..a6148f26c 100644
--- a/app/models/repository/filesystem.rb
+++ b/app/models/repository/filesystem.rb
@@ -24,11 +24,12 @@ class Repository::Filesystem < Repository
attr_protected :root_url
validates_presence_of :url
- ATTRIBUTE_KEY_NAMES = {
- "url" => "Root directory",
- }
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 = "root_directory"
+ end
+ super(attr_name)
end
def self.scm_adapter_class
diff --git a/config/locales/en.yml b/config/locales/en.yml
index f53a1c1f9..190d333f6 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -312,6 +312,7 @@ en:
field_commit_logs_encoding: Commit messages encoding
field_scm_path_encoding: Path encoding
field_path_to_repository: Path to repository
+ field_root_directory: Root directory
setting_app_title: Application title
setting_app_subtitle: Application subtitle