-<% 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>
-<% 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 %>
- <% 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 ".tags" %>
+ <%= @trace_tags.map(&:tag).join(", ") %>
<% end %>
<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 %>
<%= t ".hi", :to_user => @to_user %>
-<%= render :partial => "gpx_description" %>
<%= t ".failed_to_import" %>
+<%= render :partial => "gpx_description" %>
+
+<%= t ".verify" %>
+
==
<%= @error %>
==
<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) %>
<%= 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 %>
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"
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