diff options
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb | 8 | ||||
-rw-r--r-- | vendor/plugins/action_mailer_layouts/CHANGELOG | 21 | ||||
-rw-r--r-- | vendor/plugins/action_mailer_layouts/README | 35 | ||||
-rw-r--r-- | vendor/plugins/action_mailer_layouts/init.rb | 7 | ||||
-rw-r--r-- | vendor/plugins/action_mailer_layouts/plugin.rb | 48 |
5 files changed, 6 insertions, 113 deletions
diff --git a/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb b/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb index a6508b05d..3829e511b 100644 --- a/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb +++ b/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb @@ -22,8 +22,12 @@ module FastGettext #returns the plural forms or all singular translations that where found def plural(*msgids) translations = plural_translations(msgids) - return translations unless translations.empty? - msgids.map{|msgid| self[msgid] || msgid} #try to translate each id + return translations + # XXX: 20111004 - Temporary patch for release/0.4 until we upgrade the fast_gettext gem + # to 0.60. The code used to say 'unless translations.empty?', but that's wrong: + # we must return [] if not found - otherwise chained repositories won't work. + # Also removed: + # msgids.map{|msgid| self[msgid] || msgid} #try to translate each id end def pluralisation_rule diff --git a/vendor/plugins/action_mailer_layouts/CHANGELOG b/vendor/plugins/action_mailer_layouts/CHANGELOG deleted file mode 100644 index 0b3f47667..000000000 --- a/vendor/plugins/action_mailer_layouts/CHANGELOG +++ /dev/null @@ -1,21 +0,0 @@ -2008-06-03 -* Added support for Rails 2.0 and 2.1. Thanks to Scott Windsor. - -2008-02-08 -* Added support for *.<format>.erb layouts and templates. Thanks to Eric Wollensen. - -2007-12-20 -* Fixed a bug present when specifying the layout with a string (eg: layout 'subdir/layout_template') in a multipart mail, which caused the plugin to only render one part and not the other. Thanks to Andres Koetsier. - -2007-12-12 -* Now works with Rails 2.0. - -2007-11-27 -* Now supports helpers defined in the mailer class. Thanks to Marshall Roch. - -2007-24-07 -* Now requires actionmailer-1.3.3. - -2007-05-07 -* No longer have to specify a :layout. The layout name is now inferred from the mailer class name. Thanks to Peter Boctor. -* Helper methods are now available to action mailer layouts. Thanks to Peter Boctor.
\ No newline at end of file diff --git a/vendor/plugins/action_mailer_layouts/README b/vendor/plugins/action_mailer_layouts/README deleted file mode 100644 index 92b19a69d..000000000 --- a/vendor/plugins/action_mailer_layouts/README +++ /dev/null @@ -1,35 +0,0 @@ -== Action Mailer Layouts - -Original Homepage: http://cardboardrocket.com/pages/action_mailer_layouts -Original svn: http://svn.cardboardrocket.com/action_mailer_layouts - -A plugin to enable layouts for ActionMailer templates. - -Adds a new 'layout' property to the ActionMailer::Base class. Specify the name -of the layout you want to use. The plugin will look in app/views/layouts for your -layout. If no layout is specified, the plugin will look for a layout that matches -the name of your mailer class. - -For example: - -If your mailer class is called UserNotifier and you are rendering the activation.rhtml -template, then the plugin will attempt to load the user_notifier.rhtml layout. If you are -rendering the activation.text.html.rhtml template, the plugin will look for the -user_notifier.text.html.rhtml layout. In other words, the plugin attempts to load the -layout named after the your ActionMailer class. - -You can overload this behavior by setting the layout property of your mailer: - -class UserNotfier < ActionMailer::Base - def activation(user) - @recipients = user.email - @from = 'you@domain.com' - @sent_on = Time.now - @subject = 'Activate your account!' - @layout = :email - end -end - -This arrangement will cause the plugin to render the content in -views/user_notifier/activation.text.html.rhtml in the views/layouts/email.text.html.rhtml -layout.
\ No newline at end of file diff --git a/vendor/plugins/action_mailer_layouts/init.rb b/vendor/plugins/action_mailer_layouts/init.rb deleted file mode 100644 index 8289c4eb9..000000000 --- a/vendor/plugins/action_mailer_layouts/init.rb +++ /dev/null @@ -1,7 +0,0 @@ -begin - require File.join(File.dirname(__FILE__), 'plugin.rb') - ActionController::Base.logger.fatal '** Loaded layouts plugin for ActionMailer' -rescue Exception => e - puts e.inspect - ActionController::Base.logger.fatal e if ActionController::Base.logger -end
\ No newline at end of file diff --git a/vendor/plugins/action_mailer_layouts/plugin.rb b/vendor/plugins/action_mailer_layouts/plugin.rb deleted file mode 100644 index ef0cbc37c..000000000 --- a/vendor/plugins/action_mailer_layouts/plugin.rb +++ /dev/null @@ -1,48 +0,0 @@ -module ActionMailer - class Base - - # Specify the layout name - adv_attr_accessor :layout - - alias_method :render_message_without_layouts, :render_message - - def render_message(method_name, body) - layout = @layout ? @layout.to_s.clone : self.class.to_s.underscore - - filename = if method_name.respond_to?(:filename) - method_name.filename - else - method_name - end - - md = /([^\.]+)\.([^\.]+\.[^\.]+)\.(erb|rhtml|rxml)$/.match(filename) - - layout << ".#{md.captures[1]}" if md && md.captures[1] - layout << ".#{md.captures[2]}" if md && md.captures[2] - - if File.exists?(File.join(layouts_path, layout)) - body[:content_for_layout] = render_message_without_layouts(method_name, body) - - # TODO: extract content_for blocks and somehow put them in body[:content_for_...] - - initialize_layout_template_class(body).render(:file => "/#{layout}") - else - render_message_without_layouts(method_name, body) - end - end - - def initialize_layout_template_class(assigns) - # for Rails 2.1 (and greater), we have to process view paths first! - ActionView::TemplateFinder.process_view_paths(layouts_path) if defined?(ActionView::TemplateFinder) - - returning(template = ActionView::Base.new(layouts_path, assigns, self)) do - template.extend self.class.master_helper_module - template.extend ActionView::Helpers::CaptureHelper - end - end - - def layouts_path - File.join(template_root, 'layouts') - end - end -end
\ No newline at end of file |