From: Andy Allan Date: Wed, 15 Mar 2023 14:12:56 +0000 (+0000) Subject: Avoid using raw html in translations on the copyright page X-Git-Tag: live~1296^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/77e6bb8577e073e73856df584f9590a17162d6a7 Avoid using raw html in translations on the copyright page --- diff --git a/app/views/site/copyright.html.erb b/app/views/site/copyright.html.erb index e94fad402..100b485aa 100644 --- a/app/views/site/copyright.html.erb +++ b/app/views/site/copyright.html.erb @@ -39,23 +39,63 @@ <% I18n.with_locale @locale do %> <%= tag.div :lang => @locale, :dir => t("html.dir") do %> -

<%= t ".legal_babble.intro_1_html" %>

-

<%= t ".legal_babble.intro_2_html" %>

-

<%= t ".legal_babble.intro_3_1_html" %>

+

+ <%= t ".legal_babble.introduction_1_html", + :registered_trademark_link => tag.sup(link_to(t(".legal_babble.introduction_1_registered_trademark_html"), + :anchor => "trademarks")), + :open_data => tag.i(t(".legal_babble.introduction_1_open_data")), + :odc_odbl_link => link_to(t(".legal_babble.introduction_1_odc_odbl"), + t(".legal_babble.introduction_1_odc_odbl_url")), + :osm_foundation_link => link_to(t(".legal_babble.introduction_1_osm_foundation"), + t(".legal_babble.introduction_1_osm_foundation_url")) %> +

+

+ <%= t ".legal_babble.introduction_2_html", + :legal_code_link => link_to(t(".legal_babble.introduction_2_legal_code"), + t(".legal_babble.introduction_2_legal_code_url")) %> +

+

+ <%= t ".legal_babble.introduction_3_html", + :creative_commons_link => link_to(t(".legal_babble.introduction_3_creative_commons"), + t(".legal_babble.introduction_3_creative_commons_url")) %> +

<%= t ".legal_babble.credit_title_html" %>

<%= t ".legal_babble.credit_1_html" %>

-

<%= t ".legal_babble.credit_2_1_html" %>

-

<%= t ".legal_babble.credit_3_1_html" %>

-

<%= t ".legal_babble.credit_4_html" %>

+ +

+ <%= t ".legal_babble.credit_3_html", + :attribution_guidelines_link => link_to(t(".legal_babble.credit_3_attribution_guidelines"), + t(".legal_babble.credit_3_attribution_guidelines_url")) %> +

+

+ <%= t ".legal_babble.credit_4_1_html", + :this_copyright_page_link => link_to(t(".legal_babble.credit_4_1_this_copyright_page"), + copyright_path) %> +

<%= image_tag("attribution_example.png", :alt => t(".legal_babble.attribution_example.alt"), :border => 0, :title => t(".legal_babble.attribution_example.title")) %>

<%= t ".legal_babble.more_title_html" %>

-

<%= t ".legal_babble.more_1_html" %>

-

<%= t ".legal_babble.more_2_html" %>

+

+ <%= t ".legal_babble.more_1_1_html", + :osmf_licence_page_link => link_to(t(".legal_babble.more_1_1_osmf_licence_page"), + t(".legal_babble.more_1_1_osmf_licence_page_url")) %> +

+

+ <%= t ".legal_babble.more_2_1_html", + :api_usage_policy_link => link_to(t(".legal_babble.more_2_1_api_usage_policy"), + t(".legal_babble.more_2_1_api_usage_policy_url")), + :tile_usage_policy_link => link_to(t(".legal_babble.more_2_1_tile_usage_policy"), + t(".legal_babble.more_2_1_tile_usage_policy_url")), + :nominatim_usage_policy_link => link_to(t(".legal_babble.more_2_1_nominatim_usage_policy"), + t(".legal_babble.more_2_1_nominatim_usage_policy_url")) %> +

<%= t ".legal_babble.contributors_title_html" %>

<%= t ".legal_babble.contributors_intro_html" %>

@@ -72,14 +112,30 @@
  • <%= t ".legal_babble.contributors_za_html" %>
  • <%= t ".legal_babble.contributors_gb_html" %>
  • -

    <%= t ".legal_babble.contributors_footer_1_html" %>

    +

    + <%= t ".legal_babble.contributors_2_html", + :contributors_page_link => link_to(t(".legal_babble.contributors_2_contributors_page"), + t(".legal_babble.contributors_2_contributors_page_url")) %> +

    <%= t ".legal_babble.contributors_footer_2_html" %>

    <%= t ".legal_babble.infringement_title_html" %>

    <%= t ".legal_babble.infringement_1_html" %>

    -

    <%= t ".legal_babble.infringement_2_html" %>

    +

    + <%= t ".legal_babble.infringement_2_1_html", + :takedown_procedure_link => link_to(t(".legal_babble.infringement_2_1_takedown_procedure"), + t(".legal_babble.infringement_2_1_takedown_procedure_url")), + :online_filing_page_link => link_to(t(".legal_babble.infringement_2_1_online_filing_page"), + t(".legal_babble.infringement_2_1_online_filing_page_url")) %> +

    -

    <%= t ".legal_babble.trademarks_title_html" %>

    -

    <%= t ".legal_babble.trademarks_1_html" %>

    +

    + <%= t ".legal_babble.trademarks_title" %> +

    +

    + <%= t ".legal_babble.trademarks_1_1_html", + :trademark_policy_link => link_to(t(".legal_babble.trademarks_1_1_trademark_policy"), + t(".legal_babble.trademarks_1_1_trademark_policy_url")) %> +

    <% end %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 302cebd35..d2dcba8e7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1878,61 +1878,67 @@ en: mapping_link: start mapping legal_babble: title_html: Copyright and License - intro_1_html: | - OpenStreetMap® is open data, licensed under the Open Data - Commons Open Database License (ODbL) by the OpenStreetMap Foundation (OSMF). - intro_2_html: | + introduction_1_html: | + OpenStreetMap%{registered_trademark_link} is %{open_data}, licensed under the + %{odc_odbl_link} (ODbL) by the %{osm_foundation_link} (OSMF). + introduction_1_registered_trademark_html: "®" + introduction_1_open_data: open data + introduction_1_odc_odbl: Open Data Commons Open Database License + introduction_1_odc_odbl_url: https://opendatacommons.org/licenses/odbl/ + introduction_1_osm_foundation: OpenStreetMap Foundation + introduction_1_osm_foundation_url: https://osmfoundation.org/ + introduction_2_html: | You are free to copy, distribute, transmit and adapt our data, as long as you credit OpenStreetMap and its contributors. If you alter or build upon our data, you may distribute the result only under the same licence. The - full legal - code explains your rights and responsibilities. - intro_3_1_html: | - Our documentation is licensed under the - Creative - Commons Attribution-ShareAlike 2.0 license (CC BY-SA 2.0). + full %{legal_code_link} explains your rights and responsibilities. + introduction_2_legal_code: legal code + introduction_2_legal_code_url: https://opendatacommons.org/licenses/odbl/1.0/ + introduction_3_html: | + Our documentation is licensed under the %{creative_commons_link} license (CC BY-SA 2.0). + introduction_3_creative_commons: Creative Commons Attribution-ShareAlike 2.0 + introduction_3_creative_commons_url: https://creativecommons.org/licenses/by-sa/2.0/ credit_title_html: How to credit OpenStreetMap credit_1_html: | Where you use OpenStreetMap data, you are required to do the following two things: - credit_2_1_html: | - - credit_3_1_html: | + credit_2_1: Provide credit to OpenStreetMap by displaying our copyright notice. + credit_2_2: Make clear that the data is available under the Open Database License. + credit_3_html: | For the copyright notice, we have different requirements on how this should be displayed, depending on how you are using our data. For example, different rules apply on how to show the copyright notice depending on whether you have created a browsable map, a printed map or a static image. Full details on the - requirements can be found in the - Attribution - Guidelines. - credit_4_html: | + requirements can be found in the %{attribution_guidelines_link}. + credit_3_attribution_guidelines: Attribution Guidelines + credit_3_attribution_guidelines_url: https://wiki.osmfoundation.org/wiki/Licence/Attribution_Guidelines + credit_4_1_html: | To make clear that the data is available under the Open - Database License, you may link to - this copyright page. + Database License, you may link to %{this_copyright_page_link}. Alternatively, and as a requirement if you are distributing OSM in a data form, you can name and link directly to the license(s). In media where links are not possible (e.g. printed works), we suggest you direct your readers to openstreetmap.org (perhaps by expanding 'OpenStreetMap' to this full address) and to opendatacommons.org. In this example, the credit appears in the corner of the map. + credit_4_1_this_copyright_page: this copyright page attribution_example: alt: Example of how to attribute OpenStreetMap on a webpage title: Attribution example more_title_html: Finding out more - more_1_html: | - Read more about using our data, and how to credit us, at the OSMF Licence page. - more_2_html: | + more_1_1_html: Read more about using our data, and how to credit us, at the %{osmf_licence_page_link}. + more_1_1_osmf_licence_page: OSMF Licence page + more_1_1_osmf_licence_page_url: https://osmfoundation.org/Licence + more_2_1_html: | Although OpenStreetMap is open data, we cannot provide a free-of-charge map API for third-parties. - See our API Usage Policy, - Tile Usage Policy - and Nominatim Usage Policy. + See our %{api_usage_policy_link}, %{tile_usage_policy_link} and %{nominatim_usage_policy_link}. + more_2_1_api_usage_policy: API Usage Policy + more_2_1_api_usage_policy_url: https://operations.osmfoundation.org/policies/api/ + more_2_1_tile_usage_policy: Tile Usage Policy + more_2_1_tile_usage_policy_url: https://operations.osmfoundation.org/policies/tiles/ + more_2_1_nominatim_usage_policy: Nominatim Usage Policy + more_2_1_nominatim_usage_policy_url: https://operations.osmfoundation.org/policies/nominatim/ contributors_title_html: Our contributors contributors_intro_html: | Our contributors are thousands of individuals. We also include @@ -1989,11 +1995,11 @@ en: United Kingdom: Contains Ordnance Survey data © Crown copyright and database right 2010-2023. - contributors_footer_1_html: | + contributors_2_html: | For further details of these, and other sources that have been used - to help improve OpenStreetMap, please see the Contributors - page on the OpenStreetMap Wiki. + to help improve OpenStreetMap, please see the %{contributors_page_link} on the OpenStreetMap Wiki. + contributors_2_contributors_page: Contributors page + contributors_2_contributors_page_url: https://wiki.openstreetmap.org/wiki/Contributors contributors_footer_2_html: | Inclusion of data in OpenStreetMap does not imply that the original data provider endorses OpenStreetMap, provides any warranty, or @@ -2003,15 +2009,22 @@ en: OSM contributors are reminded never to add data from any copyrighted sources (e.g. Google Maps or printed maps) without explicit permission from the copyright holders. - infringement_2_html: | + infringement_2_1_html: | If you believe that copyrighted material has been inappropriately added to the OpenStreetMap database or this site, please refer - to our takedown - procedure or file directly at our - on-line filing page. - trademarks_title_html: Trademarks - trademarks_1_html: | - OpenStreetMap, the magnifying glass logo and State of the Map are registered trademarks of the OpenStreetMap Foundation. If you have questions about your use of the marks, please see our Trademark Policy. + to our %{takedown_procedure_link} or file directly at our + %{online_filing_page_link}. + infringement_2_1_takedown_procedure: takedown procedure + infringement_2_1_takedown_procedure_url: https://wiki.osmfoundation.org/wiki/Takedown_procedure + infringement_2_1_online_filing_page: on-line filing page + infringement_2_1_online_filing_page_url: https://dmca.openstreetmap.org/ + trademarks_title: Trademarks + trademarks_1_1_html: | + OpenStreetMap, the magnifying glass logo and State of the Map are registered trademarks of the + OpenStreetMap Foundation. If you have questions about your use of the marks, please see our + %{trademark_policy_link}. + trademarks_1_1_trademark_policy: Trademark Policy + trademarks_1_1_trademark_policy_url: https://wiki.osmfoundation.org/wiki/Trademark_Policy index: js_1: "You are either using a browser that does not support JavaScript, or you have disabled JavaScript." js_2: "OpenStreetMap uses JavaScript for its slippy map."