]> source.dussan.org Git - redmine.git/commitdiff
scm: filesystem: use i18n string at 'Root directory' setting.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 23 Apr 2011 07:38:32 +0000 (07:38 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 23 Apr 2011 07:38:32 +0000 (07:38 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5532 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/repositories_helper.rb
app/models/repository/filesystem.rb
config/locales/en.yml

index f260320de3f717506859c473d33e4cd4e0a55cec..10e39c819f357228d27153a71436ce0d92068b23 100644 (file)
@@ -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(
index acbf41c7ff2c73667d3341404ac4f33420b8fb15..a6148f26cff49e0622f9feb9386e5158aa677a25 100644 (file)
@@ -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
index f53a1c1f984004b12d9952477a3382a01eba83b1..190d333f662d57d1e21693b47f9099a506fadf55 100644 (file)
@@ -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