scm: filesystem: use i18n string at 'Root directory' setting.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5532 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-23 07:38:32 +00:00
parent 50cb5921b5
commit 25d6ed38b6
3 changed files with 8 additions and 5 deletions

View 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(

View 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

View 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