summaryrefslogtreecommitdiffstats
path: root/vendor/plugins/gloc-1.1.0
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/gloc-1.1.0')
-rw-r--r--vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb b/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb
index 006d8976a..8f201bcb8 100644
--- a/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb
+++ b/vendor/plugins/gloc-1.1.0/lib/gloc-rails.rb
@@ -92,7 +92,8 @@ module ActionMailer #:nodoc:
private
alias :render_message_without_gloc :render_message
def render_message(method_name, body)
- render_message_without_gloc("#{method_name}_#{current_language}", body)
+ template = File.exist?("#{template_path}/#{method_name}_#{current_language}.rhtml") ? "#{method_name}_#{current_language}" : "#{method_name}"
+ render_message_without_gloc(template, body)
end
end
end