Skip to content

Commit

Permalink
Merge branch 'pull/5031'
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Aug 1, 2024
2 parents 08484f8 + 2d3988e commit 6f1ffc4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/views/user_mailer/_gpx_description.text.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% trace_name = @trace_name %>
<% trace_description = @trace_description %>
<% if @trace_tags.length > 0 %>
<% tags = @trace_tags.map { |trace_tag| trace_tag.tag }.join(", ") %>
<%= t ".description_with_tags", :trace_name => trace_name, :trace_description => trace_description, :tags => tags %>
<% else %>
<%= t ".description_with_no_tags", :trace_name => trace_name, :trace_description => trace_description %>
<% end %>
10 changes: 10 additions & 0 deletions app/views/user_mailer/gpx_failure.text.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<%= t ".hi", :to_user => @to_user %>
<%= render :partial => "gpx_description" %>
<%= t ".failed_to_import" %>

==
<%= @error %>
==

<%= t ".more_info", :url => t(".import_failures_url") %>
8 changes: 8 additions & 0 deletions app/views/user_mailer/gpx_success.text.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<%= t ".hi", :to_user => @to_user %>
<%= render :partial => "gpx_description" %>
<%= t(".loaded", :trace_points => @trace_points, :count => @possible_points) %>
<%= t ".trace_location", :trace_url => @trace_url %>
<%= t ".all_your_traces", :url => @my_traces_url %>
5 changes: 5 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1626,11 +1626,14 @@ en:
befriend_them: "You can also add them as a friend at %{befriendurl}."
befriend_them_html: "You can also add them as a friend at %{befriendurl}."
gpx_description:
description_with_tags: "It looks like your GPX file %{trace_name} with the description %{trace_description} and the following tags: %{tags}"
description_with_tags_html: "It looks like your GPX file %{trace_name} with the description %{trace_description} and the following tags: %{tags}"
description_with_no_tags: "It looks like your GPX file %{trace_name} with the description %{trace_description} and no tags"
description_with_no_tags_html: "It looks like your GPX file %{trace_name} with the description %{trace_description} and no tags"
gpx_failure:
hi: "Hi %{to_user},"
failed_to_import: "failed to import. Here is the error:"
more_info: "More information about GPX import failures and how to avoid them can be found at %{url}."
more_info_html: "More information about GPX import failures and how to avoid them can be found at %{url}."
import_failures_url: "https://wiki.openstreetmap.org/wiki/GPX_Import_Failures"
subject: "[OpenStreetMap] GPX Import failure"
Expand All @@ -1639,6 +1642,8 @@ en:
loaded:
one: "loaded successfully with %{trace_points} out of a possible %{count} point."
other: "loaded successfully with %{trace_points} out of a possible %{count} points."
trace_location: "Your trace is available at %{trace_url}"
all_your_traces: "All your successfully uploaded GPX traces can be found at %{url}"
all_your_traces_html: "All your successfully uploaded GPX traces can be found at %{url}."
subject: "[OpenStreetMap] GPX Import success"
signup_confirm:
Expand Down

0 comments on commit 6f1ffc4

Please sign in to comment.