if user
@entries = user.diary_entries
- @title = I18n.t("diary_entry.feed.user.title", :user => user.display_name)
- @description = I18n.t("diary_entry.feed.user.description", :user => user.display_name)
+ @title = t("diary_entry.feed.user.title", :user => user.display_name)
+ @description = t("diary_entry.feed.user.description", :user => user.display_name)
@link = url_for :controller => "diary_entry", :action => "list", :display_name => user.display_name, :host => SERVER_URL, :protocol => SERVER_PROTOCOL
else
head :not_found
if params[:language]
@entries = @entries.where(:language_code => params[:language])
- @title = I18n.t("diary_entry.feed.language.title", :language_name => Language.find(params[:language]).english_name)
- @description = I18n.t("diary_entry.feed.language.description", :language_name => Language.find(params[:language]).english_name)
+ @title = t("diary_entry.feed.language.title", :language_name => Language.find(params[:language]).english_name)
+ @description = t("diary_entry.feed.language.description", :language_name => Language.find(params[:language]).english_name)
@link = url_for :controller => "diary_entry", :action => "list", :language => params[:language], :host => SERVER_URL, :protocol => SERVER_PROTOCOL
else
- @title = I18n.t("diary_entry.feed.all.title")
- @description = I18n.t("diary_entry.feed.all.description")
+ @title = t("diary_entry.feed.all.title")
+ @description = t("diary_entry.feed.all.description")
@link = url_for :controller => "diary_entry", :action => "list", :host => SERVER_URL, :protocol => SERVER_PROTOCOL
end
end
append_content_security_policy_directives(
:connect_src => %w[*],
:img_src => %w[* blob:],
- :script_src => %w[dev.virtualearth.net *.wikipedia.org www.wikidata.org 'unsafe-eval'],
+ :script_src => %w[dev.virtualearth.net *.wikipedia.org www.wikidata.org services.arcgisonline.com serviceslab.arcgisonline.com 'unsafe-eval'],
:style_src => %w['unsafe-inline']
)
-<%
- browse_not_found_type = {
- 'node' => I18n.t('.type.node'),
- 'way' => I18n.t('.type.way'),
- 'relation' => I18n.t('.type.relation'),
- 'changeset' => I18n.t('.type.changeset'),
- };
-%>
-
<h2>
- <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
- <%= t '.sorry', :type=> browse_not_found_type[@type] , :id => params[:id] %></h2>
+ <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
+ <%= t ".sorry", :type => t(".type.#{@type}"), :id => params[:id] %>
+</h2>
-<%
- browse_timeout_type = {
- 'node' => I18n.t('.type.node'),
- 'way' => I18n.t('.type.way'),
- 'relation' => I18n.t('.type.relation'),
- 'changeset' => I18n.t('.type.changeset'),
- };
-%>
<div class="browse-section">
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
- <%= t '.sorry', :type=> browse_timeout_type[@type] , :id => params[:id] %>
+ <%= t '.sorry', :type => t(".type.#{@type}"), :id => params[:id] %>
</div>
"fo" => "fo",
"fr" => "fr_FR",
"fur" => "fur",
+ "fy" => "fy",
"ga" => "ga",
"gd" => "gd",
"gl" => "gl",
"mr" => "mr",
"ms" => "ms",
"nb" => "nb_NO",
+ "ne" => "ne",
"nl" => "nl_NL",
"nn" => "nn_NO",
"no" => "nb_NO",
"rue" => "rue",
"sah" => "sah",
"scn" => "scn",
+ "shn" => "shn",
"sk" => "sk",
"skr" => "skr-arab",
"sl" => "sl",
"sq" => "sq",
"sr" => "sr-ec",
"sr-Latn" => "sr-el",
+ "sty" => "sty",
"sv" => "sv_SE",
"ta" => "ta",
"te" => "te",
+ "th" => "th",
"tl" => "tl",
"tly" => "tly",
"tr" => "tr",
end
def test_repeated_changeset_create
- 30.times do
+ 3.times do
basic_authorization create(:user).email, "test"
# create a temporary changeset
versions[xml_node["version"]] = xml_doc.to_s
# randomly move the node about
- 20.times do
+ 3.times do
# move the node somewhere else
xml_node["lat"] = precision(rand * 180 - 90).to_s
xml_node["lon"] = precision(rand * 360 - 180).to_s
end
# add a bunch of random tags
- 30.times do
+ 3.times do
xml_tag = XML::Node.new("tag")
xml_tag["k"] = random_string
xml_tag["v"] = random_string
versions[xml_node["version"]] = xml_doc.to_s
# randomly move the node about
- 20.times do
+ 3.times do
# move the node somewhere else
xml_node["lat"] = precision(rand * 180 - 90).to_s
xml_node["lon"] = precision(rand * 360 - 180).to_s
end
# add a bunch of random tags
- 30.times do
+ 3.times do
xml_tag = XML::Node.new("tag")
xml_tag["k"] = random_string
xml_tag["v"] = random_string