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

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

index 10e39c819f357228d27153a71436ce0d92068b23..f36a54cdd15a37fc7bc61efc4bd8f8238597d682 100644 (file)
@@ -236,10 +236,14 @@ module RepositoriesHelper
   end
 
   def cvs_field_tags(form, repository)
-    content_tag('p', form.text_field(:root_url,
-                     :label => 'CVSROOT', :size => 60, :required => true,
+    content_tag('p', form.text_field(
+                     :root_url,
+                     :label => l("field_cvsroot"),
+                     :size => 60, :required => true,
                      :disabled => !repository.new_record?)) +
-    content_tag('p', form.text_field(:url, :label => 'Module',
+    content_tag('p', form.text_field(
+                     :url,
+                     :label => l("field_cvs_module"),
                      :size => 30, :required => true,
                      :disabled => !repository.new_record?)) +
     content_tag('p', form.select(
index 84f61760038ff8c3273c50368b73a2fb3089a5a3..5a138d6e0648d04ceccd3fdc78ac823bee3ee590 100644 (file)
@@ -21,12 +21,14 @@ require 'digest/sha1'
 class Repository::Cvs < Repository
   validates_presence_of :url, :root_url, :log_encoding
 
-  ATTRIBUTE_KEY_NAMES = {
-      "root_url"     => "CVSROOT",
-      "url"          => "Module",
-    }
   def self.human_attribute_name(attribute_key_name)
-    ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
+    attr_name = attribute_key_name
+    if attr_name == "root_url"
+      attr_name = "cvsroot"
+    elsif attr_name == "url"
+      attr_name = "cvs_module"
+    end
+    super(attr_name)
   end
 
   def self.scm_adapter_class
index 190d333f662d57d1e21693b47f9099a506fadf55..7ea23ec2feb937c386df0f1c41a2eba9373cb005 100644 (file)
@@ -313,6 +313,8 @@ en:
   field_scm_path_encoding: Path encoding
   field_path_to_repository: Path to repository
   field_root_directory: Root directory
+  field_cvsroot: CVSROOT
+  field_cvs_module: Module
 
   setting_app_title: Application title
   setting_app_subtitle: Application subtitle