Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make error pages translatable #3879

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/views/errors/_contact.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p><%= t ".contact_the_community_html",
:contact_link => link_to(t(".contact"), t(".contact_url"),
:title => t(".contact_url_title")) %></p>
6 changes: 3 additions & 3 deletions app/views/errors/forbidden.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<h1>Forbidden</h1>
<p>The operation you requested on the OpenStreetMap server is only available to administrators (HTTP 403)</p>
<p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if you have found a broken link / bug. Make a note of the exact URL of your request.</p>
<h1><%= t ".title" %></h1>
<p><%= t ".description" %></p>
<%= render :partial => "contact" %>
7 changes: 3 additions & 4 deletions app/views/errors/internal_server_error.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<h1>Application error</h1>
<p>The OpenStreetMap server encountered an unexpected condition that prevented it from fulfilling the request (HTTP 500)</p>
<p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if your problem persists. Make a note of the exact URL / post data of your request.</p>
<p>This may be a problem in our Ruby On Rails code. 500 occurs with exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code)</p>
<h1><%= t ".title" %></h1>
<p><%= t ".description" %></p>
<%= render :partial => "contact" %>
6 changes: 3 additions & 3 deletions app/views/errors/not_found.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<h1>File not found</h1>
<p>Couldn't find a file/directory/API operation by that name on the OpenStreetMap server (HTTP 404)</p>
<p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if you have found a broken link / bug. Make a note of the exact URL of your request.</p>
<h1><%= t ".title" %></h1>
<p><%= t ".description" %></p>
<%= render :partial => "contact" %>
15 changes: 15 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,21 @@ en:
applications:
create:
notice: Application Registered.
errors:
contact:
contact_url: https://wiki.openstreetmap.org/wiki/Contact
contact_url_title: Various contact channels explained
contact: contact
contact_the_community_html: Feel free to %{contact_link} the OpenStreetMap community if you have found a broken link / bug. Make a note of the exact URL of your request.
forbidden:
title: Forbidden
description: The operation you requested on the OpenStreetMap server is only available to administrators (HTTP 403)
internal_server_error:
title: Application error
description: The OpenStreetMap server encountered an unexpected condition that prevented it from fulfilling the request (HTTP 500)
not_found:
title: File not found
description: Couldn't find a file/directory/API operation by that name on the OpenStreetMap server (HTTP 404)
friendships:
make_friend:
heading: "Add %{user} as a friend?"
Expand Down