Merge remote-tracking branch 'upstream/pull/5487'
This commit is contained in:
commit
a6c6f26acb
8 changed files with 55 additions and 39 deletions
|
@ -1,9 +1,16 @@
|
|||
<% trace_name = tag.strong(@trace_name) %>
|
||||
<% trace_name = link_to(trace_name, @trace_url) if @trace_url %>
|
||||
<% trace_description = tag.em(@trace_description) %>
|
||||
<% if @trace_tags.length > 0 %>
|
||||
<% tags = safe_join @trace_tags.map { |trace_tag| tag.em trace_tag.tag }, ", " %>
|
||||
<%= t ".description_with_tags_html", :trace_name => trace_name, :trace_description => trace_description, :tags => tags %>
|
||||
<% else %>
|
||||
<%= t ".description_with_no_tags_html", :trace_name => trace_name, :trace_description => trace_description %>
|
||||
<% end %>
|
||||
<p><%= t ".details" %></p>
|
||||
|
||||
<dl>
|
||||
<dt><%= t ".filename" %>
|
||||
<% if @trace_url %>
|
||||
<dd><%= link_to(@trace_name, @trace_url) %>
|
||||
<% else %>
|
||||
<dd><%= @trace_name %>
|
||||
<% end %>
|
||||
<dt><%= t ".description" %>
|
||||
<dd><%= @trace_description %>
|
||||
<% if @trace_tags.length > 0 %>
|
||||
<dt><%= t ".tags" %>
|
||||
<dd><%= @trace_tags.map(&:tag).join(", ") %>
|
||||
<% end %>
|
||||
</dl>
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
<% 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 %>
|
||||
<%= t ".details" %>
|
||||
|
||||
<%= t ".filename" %>
|
||||
<%= @trace_name %>
|
||||
<% if @trace_url %>
|
||||
<%= t ".url" %>
|
||||
<%= @trace_url %>
|
||||
<% end %>
|
||||
<%= t ".description" %>
|
||||
<%= @trace_description %>
|
||||
<% if @trace_tags.length > 0 %>
|
||||
<%= t ".tags" %>
|
||||
<%= @trace_tags.map(&:tag).join(", ") %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<p><%= t ".hi", :to_user => @to_user %></p>
|
||||
|
||||
<p>
|
||||
<%= render :partial => "gpx_description" %>
|
||||
<%= t ".failed_to_import" %>
|
||||
</p>
|
||||
<p><%= t ".failed_to_import" %>
|
||||
|
||||
<%= render :partial => "gpx_description" %>
|
||||
|
||||
<p><%= t ".verify" %></p>
|
||||
|
||||
<blockquote>
|
||||
<%= @error %>
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<%= t ".hi", :to_user => @to_user %>
|
||||
|
||||
<%= render :partial => "gpx_description" %>
|
||||
<%= t ".failed_to_import" %>
|
||||
|
||||
<%= render :partial => "gpx_description" %>
|
||||
|
||||
<%= t ".verify" %>
|
||||
|
||||
==
|
||||
<%= @error %>
|
||||
==
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<p><%= t ".hi", :to_user => @to_user %></p>
|
||||
|
||||
<p>
|
||||
<%= render :partial => "gpx_description" %>
|
||||
<%= t(".loaded", :trace_points => @trace_points, :count => @possible_points) %>
|
||||
</p>
|
||||
<p><%= t ".loaded_successfully", :trace_points => @trace_points, :count => @possible_points %>
|
||||
|
||||
<%= render :partial => "gpx_description" %>
|
||||
|
||||
<p>
|
||||
<%= t ".all_your_traces_html", :url => link_to(@my_traces_url, @my_traces_url) %>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<%= t ".hi", :to_user => @to_user %>
|
||||
|
||||
<%= render :partial => "gpx_description" %>
|
||||
<%= t(".loaded", :trace_points => @trace_points, :count => @possible_points) %>
|
||||
<%= t ".loaded_successfully", :trace_points => @trace_points, :count => @possible_points %>
|
||||
|
||||
<%= t ".trace_location", :trace_url => @trace_url %>
|
||||
<%= render :partial => "gpx_description" %>
|
||||
|
||||
<%= t ".all_your_traces", :url => @my_traces_url %>
|
||||
|
|
|
@ -1669,23 +1669,24 @@ 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 file %{trace_name} with the description %{trace_description} and the following tags: %{tags}"
|
||||
description_with_tags_html: "It looks like your file %{trace_name} with the description %{trace_description} and the following tags: %{tags}"
|
||||
description_with_no_tags: "It looks like your file %{trace_name} with the description %{trace_description} and no tags"
|
||||
description_with_no_tags_html: "It looks like your file %{trace_name} with the description %{trace_description} and no tags"
|
||||
details: "Your file details:"
|
||||
filename: Filename
|
||||
url: URL
|
||||
description: Description
|
||||
tags: Tags
|
||||
gpx_failure:
|
||||
hi: "Hi %{to_user},"
|
||||
failed_to_import: "failed to be imported as a GPS trace file. Please verify that your file is a valid GPX file or an archive containing GPX file(s) in the supported format (.tar.gz, .tar.bz2, .tar, .zip, .gpx.gz, .gpx.bz2). Could there be a format or syntax issue with your file? Here is the importing error:"
|
||||
more_info: "More information about GPX import failures and how to avoid them can be found at %{url}."
|
||||
failed_to_import: "It looks like your file failed to be imported as a GPS trace."
|
||||
verify: "Please verify that your file is a valid GPX file or an archive containing GPX file(s) in the supported format (.tar.gz, .tar.bz2, .tar, .zip, .gpx.gz, .gpx.bz2). Could there be a format or syntax issue with your file? Here is the importing 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"
|
||||
gpx_success:
|
||||
hi: "Hi %{to_user},"
|
||||
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}"
|
||||
loaded_successfully:
|
||||
one: "It looks like your file loaded successfully with %{trace_points} out of a possible %{count} point."
|
||||
other: "It looks like your file loaded successfully with %{trace_points} out of a possible %{count} points."
|
||||
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"
|
||||
|
|
|
@ -15,7 +15,7 @@ class UserMailerTest < ActionMailer::TestCase
|
|||
end
|
||||
email = UserMailer.gpx_success(trace, 100)
|
||||
|
||||
assert_match("<em>one</em>, <em>two&three</em>, <em>four<five</em>", email.html_part.body.to_s)
|
||||
assert_match("one, two&three, four<five", email.html_part.body.to_s)
|
||||
assert_match("one, two&three, four<five", email.text_part.body.to_s)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue