]> git.openstreetmap.org Git - rails.git/commitdiff
Avoid using raw html in credit translations
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Mar 2023 15:21:11 +0000 (15:21 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 22 Mar 2023 14:40:55 +0000 (14:40 +0000)
app/views/site/copyright.html.erb
config/locales/en.yml

index 100b485aa5d1ae38d75088450600e310e7fa2026..d9521716d67a060720c6a71532924e1b3baf9b02 100644 (file)
     <h3><%= t ".legal_babble.contributors_title_html" %></h3>
     <p><%= t ".legal_babble.contributors_intro_html" %></p>
     <ul id="contributors">
     <h3><%= t ".legal_babble.contributors_title_html" %></h3>
     <p><%= t ".legal_babble.contributors_intro_html" %></p>
     <ul id="contributors">
-      <li><%= t ".legal_babble.contributors_at_html" %></li>
-      <li><%= t ".legal_babble.contributors_au_html" %></li>
-      <li><%= t ".legal_babble.contributors_ca_html" %></li>
-      <li><%= t ".legal_babble.contributors_fi_html" %></li>
-      <li><%= t ".legal_babble.contributors_fr_html" %></li>
-      <li><%= t ".legal_babble.contributors_nl_html" %></li>
-      <li><%= t ".legal_babble.contributors_nz_html" %></li>
-      <li><%= t ".legal_babble.contributors_si_html" %></li>
-      <li><%= t ".legal_babble.contributors_es_html" %></li>
-      <li><%= t ".legal_babble.contributors_za_html" %></li>
-      <li><%= t ".legal_babble.contributors_gb_html" %></li>
+      <li>
+        <%= t ".legal_babble.contributors_at_credit_html",
+              :austria => tag.strong(t(".legal_babble.contributors_at_austria")),
+              :stadt_wien_link => link_to(t(".legal_babble.contributors_at_stadt_wien"),
+                                          t(".legal_babble.contributors_at_stadt_wien_url")),
+              :cc_by_link => link_to(t(".legal_babble.contributors_at_cc_by"),
+                                     t(".legal_babble.contributors_at_cc_by_url")),
+              :land_vorarlberg_link => link_to(t(".legal_babble.contributors_at_land_vorarlberg"),
+                                               t(".legal_babble.contributors_at_land_vorarlberg_url")),
+              :cc_by_at_with_amendments_link => link_to(t(".legal_babble.contributors_at_cc_by_at_with_amendments"),
+                                                        t(".legal_babble.contributors_at_cc_by_at_with_amendments_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_au_credit_html",
+              :australia => tag.strong(t(".legal_babble.contributors_au_australia")),
+              :geoscape_australia_link => link_to(t(".legal_babble.contributors_au_geoscape_australia"),
+                                                  t(".legal_babble.contributors_au_geoscape_australia_url")),
+              :cc_licence_link => link_to(t(".legal_babble.contributors_au_cc_licence"),
+                                          t(".legal_babble.contributors_au_cc_licence_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_ca_credit_html",
+              :canada => tag.strong(t(".legal_babble.contributors_ca_canada")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_fi_credit_html",
+              :finland => tag.strong(t(".legal_babble.contributors_fi_finland")),
+              :nlsfi_license_link => link_to(t(".legal_babble.contributors_fi_nlsfi_license"),
+                                             t(".legal_babble.contributors_fi_nlsfi_license_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_fr_credit_html",
+              :france => tag.strong(t(".legal_babble.contributors_fr_france")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_nl_credit_html",
+              :netherlands => tag.strong(t(".legal_babble.contributors_nl_netherlands")),
+              :and_link => link_to(t(".legal_babble.contributors_nl_and"),
+                                   t(".legal_babble.contributors_nl_and_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_nz_credit_html",
+              :new_zealand => tag.strong(t(".legal_babble.contributors_nz_new_zealand")),
+              :linz_data_service_link => link_to(t(".legal_babble.contributors_nz_linz_data_service"),
+                                                 t(".legal_babble.contributors_nz_linz_data_service_url")),
+              :cc_by_link => link_to(t(".legal_babble.contributors_nz_cc_by"),
+                                     t(".legal_babble.contributors_nz_cc_by_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_si_credit_html",
+              :slovenia => tag.strong(t(".legal_babble.contributors_si_slovenia")),
+              :gu_link => link_to(t(".legal_babble.contributors_si_gu"),
+                                  t(".legal_babble.contributors_si_gu_url")),
+              :mkgp_link => link_to(t(".legal_babble.contributors_si_mkgp"),
+                                    t(".legal_babble.contributors_si_mkgp_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_es_credit_html",
+              :spain => tag.strong(t(".legal_babble.contributors_es_spain")),
+              :ign_link => link_to(t(".legal_babble.contributors_es_ign"),
+                                   t(".legal_babble.contributors_es_ign_url")),
+              :scne_link => link_to(t(".legal_babble.contributors_es_scne"),
+                                    t(".legal_babble.contributors_es_scne_url")),
+              :cc_by_link => link_to(t(".legal_babble.contributors_es_cc_by"),
+                                     t(".legal_babble.contributors_es_cc_by_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_za_credit_html",
+              :south_africa => tag.strong(t(".legal_babble.contributors_za_south_africa")),
+              :ngi_link => link_to(t(".legal_babble.contributors_za_ngi"),
+                                   t(".legal_babble.contributors_za_ngi_url")) %>
+      </li>
+      <li>
+        <%= t ".legal_babble.contributors_gb_credit_html",
+              :united_kingdom => tag.strong(t(".legal_babble.contributors_gb_united_kingdom")) %>
+      </li>
     </ul>
     <p>
       <%= t ".legal_babble.contributors_2_html",
     </ul>
     <p>
       <%= t ".legal_babble.contributors_2_html",
index d2dcba8e7923763be6de5e5b9233451fd6ee5ce1..ee97ebca2f6911b2fbb1eaa45e49eb1697ad8bac 100644 (file)
@@ -1944,57 +1944,87 @@ en:
           Our contributors are thousands of individuals. We also include
           openly-licensed data from national mapping agencies
           and other sources, among them:
           Our contributors are thousands of individuals. We also include
           openly-licensed data from national mapping agencies
           and other sources, among them:
-        contributors_at_html: |
-          <strong>Austria</strong>: Contains data from
-          <a href="https://data.wien.gv.at/">Stadt Wien</a> (under
-          <a href="https://creativecommons.org/licenses/by/3.0/at/deed.de">CC BY</a>),
-          <a href="https://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm">Land Vorarlberg</a> and
-          Land Tirol (under <a href="https://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC BY AT with amendments</a>).
-        contributors_au_html: |
-          <strong>Australia</strong>: Incorporates or developed using Administrative Boundaries &copy;
-          <a href="https://geoscape.com.au/legal/data-copyright-and-disclaimer/">Geoscape Australia</a>
-          licensed by the Commonwealth of Australia under
-          <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International licence (CC BY 4.0)</a>.
-        contributors_ca_html: |
-          <strong>Canada</strong>: Contains data from
+        contributors_at_credit_html: |
+          %{austria}: Contains data from %{stadt_wien_link} (under %{cc_by_link}), %{land_vorarlberg_link}
+          and Land Tirol (under %{cc_by_at_with_amendments_link}).
+        contributors_at_austria: Austria
+        contributors_at_stadt_wien: Stadt Wien
+        contributors_at_stadt_wien_url: https://data.wien.gv.at/
+        contributors_at_cc_by: CC BY
+        contributors_at_cc_by_url: https://creativecommons.org/licenses/by/3.0/at/deed.de
+        contributors_at_land_vorarlberg: Land Vorarlberg
+        contributors_at_land_vorarlberg_url: https://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm
+        contributors_at_cc_by_at_with_amendments: CC BY AT with amendments
+        contributors_at_cc_by_at_with_amendments_url: https://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/
+        contributors_au_credit_html: |
+          %{australia}: Incorporates or developed using Administrative Boundaries &copy; %{geoscape_australia_link}
+          licensed by the Commonwealth of Australia under %{cc_licence_link}.
+        contributors_au_australia: Australia
+        contributors_au_geoscape_australia: Geoscape Australia
+        contributors_au_geoscape_australia_url: https://geoscape.com.au/legal/data-copyright-and-disclaimer/
+        contributors_au_cc_licence: Creative Commons Attribution 4.0 International licence (CC BY 4.0)
+        contributors_au_cc_licence_url: https://creativecommons.org/licenses/by/4.0/
+        contributors_ca_credit_html: |
+          %{canada}: Contains data from
           GeoBase&reg;, GeoGratis (&copy; Department of Natural
           Resources Canada), CanVec (&copy; Department of Natural
           Resources Canada), and StatCan (Geography Division,
           Statistics Canada).
           GeoBase&reg;, GeoGratis (&copy; Department of Natural
           Resources Canada), CanVec (&copy; Department of Natural
           Resources Canada), and StatCan (Geography Division,
           Statistics Canada).
-        contributors_fi_html: |
-          <strong>Finland</strong>: Contains data from the
+        contributors_ca_canada: Canada
+        contributors_fi_credit_html: |
+          %{finland}: Contains data from the
           National Land Survey of Finland's Topographic Database
           National Land Survey of Finland's Topographic Database
-          and other datasets, under the
-          <a href="https://www.maanmittauslaitos.fi/en/opendata-licence-version1">NLSFI License</a>.
-        contributors_fr_html: |
-          <strong>France</strong>: Contains data sourced from
+          and other datasets, under the %{nlsfi_license_link}.
+        contributors_fi_finland: Finland
+        contributors_fi_nlsfi_license: NLSFI License
+        contributors_fi_nlsfi_license_url: https://www.maanmittauslaitos.fi/en/opendata-licence-version1
+        contributors_fr_credit_html: |
+          %{france}: Contains data sourced from
           Direction Générale des Impôts.
           Direction Générale des Impôts.
-        contributors_nl_html: |
-          <strong>Netherlands</strong>: Contains &copy; AND data, 2007
-          (<a href="https://www.and.com">www.and.com</a>)
-        contributors_nz_html: |
-          <strong>New Zealand</strong>: Contains data sourced from the
-          <a href="https://data.linz.govt.nz/">LINZ Data Service</a> and
-          licensed for reuse under
-          <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
-        contributors_si_html: |
-          <strong>Slovenia</strong>: Contains data from the
-          <a href="http://www.gu.gov.si/en/">Surveying and Mapping Authority</a> and
-          <a href="http://www.mkgp.gov.si/en/">Ministry of Agriculture, Forestry and Food</a>
+        contributors_fr_france: France
+        contributors_nl_credit_html: |
+          %{netherlands}: Contains &copy; AND data, 2007 (%{and_link})
+        contributors_nl_netherlands: Netherlands
+        contributors_nl_and: www.and.com
+        contributors_nl_and_url: https://www.and.com
+        contributors_nz_credit_html: |
+          %{new_zealand}: Contains data sourced from the %{linz_data_service_link}
+          and licensed for reuse under %{cc_by_link}.
+        contributors_nz_new_zealand: New Zealand
+        contributors_nz_linz_data_service: LINZ Data Service
+        contributors_nz_linz_data_service_url: https://data.linz.govt.nz/
+        contributors_nz_cc_by: CC BY 4.0
+        contributors_nz_cc_by_url: https://creativecommons.org/licenses/by/4.0/
+        contributors_si_credit_html: |
+          %{slovenia}: Contains data from the %{gu_link} and %{mkgp_link}
           (public information of Slovenia).
           (public information of Slovenia).
-        contributors_es_html: |
-          <strong>Spain</strong>: Contains data sourced from the
-          Spanish National Geographic Institute (<a href="http://www.ign.es/">IGN</a>) and
-          National Cartographic System (<a href="http://www.scne.es/">SCNE</a>)
-          licensed for reuse under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
-        contributors_za_html: |
-          <strong>South Africa</strong>: Contains data sourced from
-          <a href="http://www.ngi.gov.za/">Chief Directorate:
-          National Geo-Spatial Information</a>, State copyright reserved.
-        contributors_gb_html: |
-          <strong>United Kingdom</strong>: Contains Ordnance
+        contributors_si_slovenia: Slovenia
+        contributors_si_gu: Surveying and Mapping Authority
+        contributors_si_gu_url: http://www.gu.gov.si/en/
+        contributors_si_mkgp: Ministry of Agriculture, Forestry and Food
+        contributors_si_mkgp_url: http://www.mkgp.gov.si/en/
+        contributors_es_credit_html: |
+          %{spain}: Contains data sourced from the
+          Spanish National Geographic Institute (%{ign_link}) and
+          National Cartographic System (%{scne_link})
+          licensed for reuse under %{cc_by_link}.
+        contributors_es_spain: Spain
+        contributors_es_ign: IGN
+        contributors_es_ign_url: http://www.ign.es/
+        contributors_es_scne: SCNE
+        contributors_es_scne_url: http://www.scne.es/
+        contributors_es_cc_by: CC BY 4.0
+        contributors_es_cc_by_url: https://creativecommons.org/licenses/by/4.0/
+        contributors_za_credit_html: |
+          %{south_africa}: Contains data sourced from %{ngi_link}, State copyright reserved.
+        contributors_za_south_africa: South Africa
+        contributors_za_ngi: "Chief Directorate: National Geo-Spatial Information"
+        contributors_za_ngi_url: http://www.ngi.gov.za/
+        contributors_gb_credit_html: |
+          %{united_kingdom}: Contains Ordnance
           Survey data &copy; Crown copyright and database right
           2010-2023.
           Survey data &copy; Crown copyright and database right
           2010-2023.
+        contributors_gb_united_kingdom: United Kingdom
         contributors_2_html: |
           For further details of these, and other sources that have been used
           to help improve OpenStreetMap, please see the %{contributors_page_link} on the OpenStreetMap Wiki.
         contributors_2_html: |
           For further details of these, and other sources that have been used
           to help improve OpenStreetMap, please see the %{contributors_page_link} on the OpenStreetMap Wiki.