Permalink
Browse files

Fixed bug that caused stringified object name to reject the localize …

…method

because it is not a symbol.

Now the object name is cast into a symbol before being localized.
  • Loading branch information...
1 parent bfc1c2a commit 36f07a990f4c4d559f33cacd5c151c326ca698be @edgerunner edgerunner committed Jul 2, 2008
Showing with 2 additions and 2 deletions.
  1. +1 −1 lang/rails/tr.yml
  2. +1 −1 lib/rails/localized_action_view.rb
View
@@ -63,7 +63,7 @@ array_skip_last_comma: 'false'
# Active Record error messages:
active_record_helper_error_description: 'Aşağıdaki alanlarla ilgili sorunlar oluştu:'
-active_record_helper_header_message: "{error_count} hata bulundu"
+active_record_helper_header_message: "{error_count} hata yüzünden {failed_object} kaydedilemedi"
date_helper_month_names:
- # Leave that line
@@ -183,7 +183,7 @@ def error_messages_for(*params)
options[:object_name] ||= params.first
original_failed_object = options[:object_name].to_s.gsub('_', ' ')
- failed_object = options[:object_name].l(original_failed_object)
+ failed_object = options[:object_name].to_sym.l(original_failed_object)
original_header_message = "#{pluralize(count, 'error')} prohibited this #{original_failed_object} from being saved"
header_message = :active_record_helper_header_message.l_with_args({:error_count => count, :failed_object => failed_object }, original_header_message)

0 comments on commit 36f07a9

Please sign in to comment.