Upgraded to Rails 2.3.4 (#3597)

* Ran the Rails upgrade
* Upgraded to Rails Engines 2.3.2
* Added a plugin to let Engines override application views.
* Converted tests to use the new classes:
** ActionController::TestCase for functional
** ActiveSupport::TestCase for units
* Converted ActiveRecord::Error message to a string.
* ActiveRecord grouping returns an ordered hash which doesn't have #sort!
* Updated the I18n storage_units format.
* Added some default initializers from a fresh rails app
* Changed the order of check_box_tags and hidden_field_tags.  The hidden tag
  needs to appear first in Rails 2.3, otherwise it will override any value in
  the check_box_tag.
* Removed the custom handler for when the cookie store is tampered with.
  Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not
  load the data from it when it's been tampered with (e.g. no user login).
* Fixed mail layouts, 2.3 has problems with implicit multipart emails that
  use layouts.  Also removed some custom Redmine mailer code.
* Fixed a bug that occurred in tests where the "required" span tag would be
  added to the :field_status translation.  This resulted in an email string of:

    <li>Status<span class="required"> *</span><span class="required"> *</span>

  Instead of:

    <li>Status: New</li>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2009-09-13 17:14:35 +00:00
parent fb349dc4ab
commit 7b0cb6aba8
263 changed files with 1636 additions and 440 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb
RAILS_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") unless defined?(RAILS_ROOT)
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
module Rails
class << self
@@ -44,6 +44,7 @@ module Rails
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
end
end
@@ -81,8 +82,8 @@ module Rails
end
def load_rubygems
min_version = '1.3.2'
require 'rubygems'
min_version = '1.3.1'
unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
+1 -1
View File
@@ -5,7 +5,7 @@
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
+1 -1
View File
@@ -33,7 +33,7 @@ module ActiveRecord
end
else
attr_name = @base.class.human_attribute_name(attr)
full_messages << attr_name + ' ' + message
full_messages << attr_name + ' ' + message.to_s
end
end
end
@@ -0,0 +1,7 @@
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
+10
View File
@@ -0,0 +1,10 @@
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
+16
View File
@@ -59,6 +59,22 @@ bg:
over_x_years:
one: "over 1 year"
other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: 'MB'
# Used in array.to_sentence.
support:
+10 -3
View File
@@ -83,9 +83,16 @@ bs:
format:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence.
support:
+16
View File
@@ -59,6 +59,22 @@ ca:
over_x_years:
one: "més d'un any"
other: "més de {{count}} anys"
number:
human:
format:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence.
support:
+16
View File
@@ -59,6 +59,22 @@ cs:
over_x_years:
one: "více než 1 rok"
other: "více než {{count}} roky"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
+10 -1
View File
@@ -85,7 +85,16 @@ da:
# separator:
delimiter: ""
precision: 1
storage_units: [Bytes, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
percentage:
format:
# separator:
+10
View File
@@ -83,6 +83,16 @@ de:
format:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
+16
View File
@@ -63,6 +63,22 @@ el:
one: "πάνω από 1 χρόνο"
other: "πάνω από {{count}} χρόνια"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
array:
+17
View File
@@ -59,6 +59,23 @@ en:
over_x_years:
one: "over 1 year"
other: "over {{count}} years"
number:
human:
format:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence.
support:
+10
View File
@@ -47,6 +47,16 @@ es:
# separator:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime:
+10 -1
View File
@@ -61,7 +61,16 @@ fi:
format:
delimiter: ""
precision: 1
storage_units: [Tavua, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "Tavua"
other: "Tavua"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
datetime:
distance_in_words:
+10 -1
View File
@@ -84,7 +84,16 @@ fr:
human:
format:
precision: 2
storage_units: [ Octet, ko, Mo, Go, To ]
storage_units:
format: "%n %u"
units:
byte:
one: "Octet"
other: "Octet"
kb: "ko"
mb: "Mo"
gb: "Go"
tb: "To"
support:
array:
+10
View File
@@ -33,6 +33,16 @@ gl:
# separator:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
date:
+11
View File
@@ -76,6 +76,17 @@ he:
unit: 'שח'
precision: 2
format: '%u %n'
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
+10 -1
View File
@@ -90,7 +90,16 @@
format:
delimiter: ""
precision: 1
storage_units: [bájt, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "bájt"
other: "bájt"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
+11
View File
@@ -74,6 +74,17 @@ it:
unit: '€'
precision: 2
format: '%n %u'
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
+10
View File
@@ -96,6 +96,16 @@ ja:
format:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
activerecord:
errors:
+10 -1
View File
@@ -116,7 +116,16 @@ ko:
# separator:
delimiter: ""
precision: 1
storage_units: [Bytes, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence.
support:
+10 -1
View File
@@ -28,7 +28,16 @@ lt:
format:
delimiter: ""
precision: 1
storage_units: [baitai, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "baitai"
other: "baitai"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
datetime:
distance_in_words:
+16
View File
@@ -59,6 +59,22 @@ nl:
over_x_years:
one: "over 1 jaar"
other: "over {{count}} jaren"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
+12
View File
@@ -67,6 +67,18 @@
format:
delimiter: ""
precision: 4
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
activerecord:
errors:
template:
+10 -1
View File
@@ -21,7 +21,16 @@ pl:
format:
delimiter: ""
precision: 1
storage_units: [B, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "B"
other: "B"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
date:
formats:
+10
View File
@@ -93,6 +93,16 @@ pt-BR:
format:
precision: 1
delimiter: '.'
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
sentence_connector: "e"
+10
View File
@@ -83,6 +83,16 @@ pt:
format:
precision: 1
delimiter: ''
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
activerecord:
errors:
+16
View File
@@ -57,6 +57,22 @@ ro:
over_x_years:
one: "peste un an"
other: "peste {{count}} ani"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
+16
View File
@@ -59,6 +59,22 @@ sk:
over_x_years:
one: "cez 1 rok"
other: "cez {{count}} roky/ov"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
+16
View File
@@ -59,6 +59,22 @@ sl:
over_x_years:
one: "over 1 year"
other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
+11
View File
@@ -81,6 +81,17 @@
unit: 'ДИН'
precision: 2
format: '%n %u'
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
+10 -1
View File
@@ -47,7 +47,16 @@ sv:
# separator:
delimiter: ""
# precision: 1
storage_units: [Byte, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime:
+16
View File
@@ -59,6 +59,22 @@ th:
over_x_years:
one: "over 1 year"
other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
+10
View File
@@ -92,6 +92,16 @@ tr:
delimiter: '.'
separator: ','
precision: 2
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
+16
View File
@@ -59,6 +59,22 @@ uk:
over_x_years:
one: "over 1 year"
other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence.
support:
+10 -1
View File
@@ -49,7 +49,16 @@ vi:
# separator:
delimiter: ""
precision: 1
storage_units: [Bytes, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime:
+2 -1
View File
@@ -86,8 +86,9 @@
precision: 1
# 儲存單位輸出格式.
# %u 是儲存單位, %n 是數值 (預設值: 2 MB)
storage_units:
format: "%n %u"
storage_units:
units:
byte:
one: "位元組 (B)"
other: "位元組 (B)"
+10 -1
View File
@@ -86,7 +86,16 @@ zh:
format:
delimiter: ""
precision: 1
storage_units: [Bytes, KB, MB, GB, TB]
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support:
array:
-5
View File
@@ -6,11 +6,6 @@ ActionController::Routing::Routes.draw do |map|
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
# Allow Redmine plugins to map routes and potentially override them
Rails.plugins.each do |plugin|
map.from_plugin plugin.name.to_sym
end
map.home '', :controller => 'welcome'
map.signin 'login', :controller => 'account', :action => 'login'