[openstreetmap/openstreetmap-website] Make error pages translatable (PR #3879)
Andy Allan
notifications at github.com
Mon Jan 9 19:14:22 UTC 2023
@gravitystorm requested changes on this pull request.
> @@ -572,6 +572,19 @@ en:
applications:
create:
notice: Application Registered.
+ errors:
+ contact:
+ html: 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.
We should avoid including raw html tags in translations - these can be hard for translators to get right, among other things. Instead I think it's better to have each component of the paragraph as separate keys, e.g.
```
errors:
contact:
contact_url: http:/...
contact_url_title: Various...
contact: contact
contact_the_community_html: Feel free to %{contact_link} the OpenStreetMap ....
```
... and the appropriate `link_to` when calling the translation.
> @@ -572,6 +572,19 @@ en:
applications:
create:
notice: Application Registered.
+ errors:
+ contact:
+ html: 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.
`https` for the link too
> @@ -572,6 +572,19 @@ en:
applications:
create:
notice: Application Registered.
+ errors:
+ contact:
+ html: 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.
+ forbidden:
+ title: Forbidden
+ paragraph_1: The operation you requested on the OpenStreetMap server is only available to administrators (HTTP 403)
+ internal_server_error:
+ title: Application error
+ paragraph_1: The OpenStreetMap server encountered an unexpected condition that prevented it from fulfilling the request (HTTP 500)
+ paragraph_2: 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)
I think the second sentence here is jargon that we shouldn't show to end users. I mention it here because I don't know what "Dispatcher setups" are, in this context, and so I wouldn't be able to advise a translator what it means either! :smile:
> @@ -572,6 +572,19 @@ en:
applications:
create:
notice: Application Registered.
+ errors:
+ contact:
+ html: 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.
+ forbidden:
+ title: Forbidden
+ paragraph_1: The operation you requested on the OpenStreetMap server is only available to administrators (HTTP 403)
Eh, not strictly true, but whatever.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3879#pullrequestreview-1241061049
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3879/review/1241061049 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230109/b258272b/attachment.htm>
More information about the rails-dev
mailing list