Made GPX notification E-Mails translatable

The multiline 'notifier.gpx_notification.success.loaded_successfully'
message is how one should properly do multiline messages to be
embedded into E-Mail. It wraps at 80 columns (if translated correctly)
and isn't as inhererently limited as splitting the E-Mail into one
message per-line like the other notification messages do it.
This commit is contained in:
Ævar Arnfjörð Bjarmason 2009-06-07 15:50:30 +00:00
parent 2b07fd8b4b
commit 938cdd8503
5 changed files with 29 additions and 13 deletions

View file

@ -33,7 +33,7 @@ class Notifier < ActionMailer::Base
def gpx_success(trace, possible_points)
common_headers trace.user
subject "[OpenStreetMap] GPX Import success"
subject I18n.t('notifier.gpx_notification.success.subject')
body :trace_name => trace.name,
:trace_points => trace.size,
:trace_description => trace.description,
@ -44,7 +44,7 @@ class Notifier < ActionMailer::Base
def gpx_failure(trace, error)
common_headers trace.user
from "webmaster@openstreetmap.org"
subject "[OpenStreetMap] GPX Import failure"
subject I18n.t('notifier.gpx_notification.failure.subject')
body :trace_name => trace.name,
:trace_description => trace.description,
:trace_tags => trace.tags,

View file

@ -1,14 +1,14 @@
Hi,
<%= t'notifier.gpx_notification.greeting' %>
It looks like your GPX file
<%= t'notifier.gpx_notification.your_gpx_file' %>
<%= @trace_name %>
with the description
<%= t'notifier.gpx_notification.with_description' %>
<%= @trace_description %>
<% if @trace_tags.length>0 %>
and the following tags:
<%= t'notifier.gpx_notification.and_the_tags' %>
<% @trace_tags.each do |tag| %>
<%= tag.tag.rstrip %><% end %><% else %>
and no tags.<% end %>
<%= t'notifier.gpx_notification.and_no_tags' %><% end %>

View file

@ -1,9 +1,9 @@
<%= render :partial => "gpx_description" %>
failed to import. Here's the error:
<%= t'notifier.gpx_notification.failure.failed_to_import' %>
<%= @error %>
More information about GPX import failures and how to avoid
them can be found at:
<%= t'notifier.gpx_notification.failure.more_info_1' %>
<%= t'notifier.gpx_notification.failure.more_info_2' %>
http://wiki.openstreetmap.org/wiki/GPX_Import_Failures
<%= t'notifier.gpx_notification.failure.import_failures_url' %>

View file

@ -1,3 +1,2 @@
<%= render :partial => "gpx_description" %>
loaded successfully with <%= @trace_points %> out of a possible
<%= @possible_points %> points.
<%= t'notifier.gpx_notification.success.loaded_successfully', :trace_points => @trace_points, :possible_points => @possible_points %>