From: Andy Allan Date: Wed, 22 Mar 2023 16:09:46 +0000 (+0000) Subject: Avoid using raw html in translations on the about page X-Git-Tag: live~1375^2~3 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/92e3e425f126fe6c490a5701ad5100db0acbc90a Avoid using raw html in translations on the about page --- diff --git a/app/views/site/about.html.erb b/app/views/site/about.html.erb index 12d9a0608..277fb1384 100644 --- a/app/views/site/about.html.erb +++ b/app/views/site/about.html.erb @@ -4,7 +4,10 @@
-

<%= t ".copyright_html" %>

+

+ <%= t ".heading_html", :copyright => tag.span(t(".copyright_symbol_html")), + :br => tag.br %> +

@@ -22,16 +25,44 @@ <% end %> <%= render :layout => "about_section", :locals => { :icon => "community", :title => "community_driven" } do %> -

<%= t "site.about.community_driven_html", :diary_path => diary_entries_path %>

+

+ <%= t "site.about.community_driven_1_html", :osm_blog_link => link_to(t("site.about.community_driven_osm_blog"), + t("site.about.community_driven_osm_blog_url")), + :user_diaries_link => link_to(t("site.about.community_driven_user_diaries"), + diary_entries_path), + :community_blogs_link => link_to(t("site.about.community_driven_community_blogs"), + t("site.about.community_driven_community_blogs_url")), + :osm_foundation_link => link_to(t("site.about.community_driven_osm_foundation"), + t("site.about.community_driven_osm_foundation_url")) %> +

<% end %> <%= render :layout => "about_section", :locals => { :id => "open-data", :icon => "open", :title => "open_data" } do %> -

<%= t "site.about.open_data_html", :copyright_path => copyright_path %>

+

+ <%= t "site.about.open_data_1_html", :open_data => tag.i(t("site.about.open_data_open_data")), + :copyright_license_link => link_to(t("site.about.open_data_copyright_license"), + copyright_path) %>

<% end %> <%= render :layout => "about_section", :locals => { :id => "legal", :icon => "legal", :title => "legal" } do %> -

<%= t "site.about.legal_1_html" %>

-

<%= t "site.about.legal_2_html" %>

+

+ <%= t "site.about.legal_1_1_html", :openstreetmap_foundation_link => link_to(t("site.about.legal_1_1_openstreetmap_foundation"), + t("site.about.legal_1_1_openstreetmap_foundation_url")), + :terms_of_use_link => link_to(t("site.about.legal_1_1_terms_of_use"), + t("site.about.legal_1_1_terms_of_use_url")), + :aup_link => link_to(t("site.about.legal_1_1_aup"), + t("site.about.legal_1_1_aup_url")), + :privacy_policy_link => link_to(t("site.about.legal_1_1_privacy_policy"), + t("site.about.legal_1_1_privacy_policy_url")) %> +

+

+ <%= t "site.about.legal_2_1_html", :contact_the_osmf_link => link_to(t("site.about.legal_2_1_contact_the_osmf"), + t("site.about.legal_2_1_contact_the_osmf_url")) %> +

+

+ <%= t "site.about.legal_2_2_html", :registered_trademarks_link => link_to(t("site.about.legal_2_2_registered_trademarks"), + t("site.about.legal_2_2_registered_trademarks_url")) %> +

<% end %> <%= render :layout => "about_section", :locals => { :id => "partners", :icon => "partners", :title => "partners" } do %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ee97ebca2..ed58ef3f1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1825,7 +1825,8 @@ en: site: about: next: Next - copyright_html: ©OpenStreetMap
contributors + heading_html: "%{copyright}OpenStreetMap %{br} contributors" + copyright_symbol_html: "©" used_by_html: "%{name} provides map data for thousands of websites, mobile apps, and hardware devices" lede_text: | OpenStreetMap is built by a community of mappers that contribute and maintain data @@ -1836,35 +1837,52 @@ en: aerial imagery, GPS devices, and low-tech field maps to verify that OSM is accurate and up to date. community_driven_title: Community Driven - community_driven_html: | + community_driven_1_html: | OpenStreetMap's community is diverse, passionate, and growing every day. Our contributors include enthusiast mappers, GIS professionals, engineers running the OSM servers, humanitarians mapping disaster-affected areas, and many more. - To learn more about the community, see the - OpenStreetMap Blog, - user diaries, - community blogs, and - the OSM Foundation website. + To learn more about the community, see the %{osm_blog_link}, + %{user_diaries_link}, %{community_blogs_link}, and the + %{osm_foundation_link} website. + community_driven_osm_blog: OpenStreetMap Blog + community_driven_osm_blog_url: https://blog.openstreetmap.org + community_driven_user_diaries: user diaries + community_driven_community_blogs: community blogs + community_driven_community_blogs_url: https://blogs.openstreetmap.org/ + community_driven_osm_foundation: OSM Foundation + community_driven_osm_foundation_url: https://www.osmfoundation.org/ open_data_title: Open Data - open_data_html: | - OpenStreetMap is open data: you are free to use it for any purpose + open_data_1_html: | + OpenStreetMap is %{open_data}: you are free to use it for any purpose as long as you credit OpenStreetMap and its contributors. If you alter or build upon the data in certain ways, you may distribute the result only - under the same licence. See the Copyright and - License page for details. + under the same licence. See the %{copyright_license_link} for details. + open_data_open_data: open data + open_data_copyright_license: Copyright and License page legal_title: Legal - legal_1_html: | + legal_1_1_html: | This site and many other related services are formally operated by the - OpenStreetMap Foundation (OSMF) + %{openstreetmap_foundation_link} (OSMF) on behalf of the community. Use of all OSMF operated services is subject - to our Terms of Use, - Acceptable Use Policies and our Privacy Policy. - legal_2_html: | - Please contact the OSMF + to our %{terms_of_use_link}, %{aup_link} and our %{privacy_policy_link}. + legal_1_1_openstreetmap_foundation: OpenStreetMap Foundation + legal_1_1_openstreetmap_foundation_url: https://osmfoundation.org/ + legal_1_1_terms_of_use: Terms of Use + legal_1_1_terms_of_use_url: https://wiki.osmfoundation.org/wiki/Terms_of_Use + legal_1_1_aup: Acceptable Use Policies + legal_1_1_aup_url: https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy + legal_1_1_privacy_policy: Privacy Policy + legal_1_1_privacy_policy_url: https://wiki.osmfoundation.org/wiki/Privacy_Policy + legal_2_1_html: | + Please %{contact_the_osmf_link} if you have licensing, copyright or other legal questions. -
- OpenStreetMap, the magnifying glass logo and State of the Map are registered trademarks of the OSMF. + legal_2_1_contact_the_osmf: contact the OSMF + legal_2_1_contact_the_osmf_url: https://osmfoundation.org/Contact + legal_2_2_html: | + OpenStreetMap, the magnifying glass logo and State of the Map are %{registered_trademarks_link}. + legal_2_2_registered_trademarks: registered trademarks of the OSMF + legal_2_2_registered_trademarks_url: https://wiki.osmfoundation.org/wiki/Trademark_Policy partners_title: Partners copyright: foreign: