This PR renames all references to "map key" to "legend" in 
the codebase, as the term "legend" has less ambiguity and improves 
clarity.
As an example, `(?<!f|foreign|foreign[_ ]|p|primary|primary[_ 
]|Settings\.|Object\.|shift|meta|ctrl|alt|api|send_)key(?!board|down|frames)` 
was the regex used to check occurrences of "key", because there have 
been instances where only "key" was used instead of "map 
key" or "mapkey".

The only exception is the translation source together with the SiteTest and 
IndexTest, which still use "Map Key". This ensures translatewiki 
moves the existing translations.
The excessive caching in the controller is also removed, as it has become 
unnecessary with 938212c429a159a1ceeec13b91c4ae966ef6663e.
The _panes_ context has been added to the resource path and the controller 
name, following discussions in 
https://github.com/openstreetmap/openstreetmap-website/pull/6063#issuecomment-2973551702
 and 
https://github.com/openstreetmap/openstreetmap-website/pull/6106#discussion_r2149530329
 respectively.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6113

-- Commit Summary --

  * Remove aggressive caching
  * Rename map key controller to legend pane
  * Rename map key element to legend
  * Rename map key js to legend
  * Rename key.yml to legend.yml
  * Rename map key control icon path to legend
  * Rename key_svg_tag to legend_svg_tag in svg_helper
  * Rename key variable to legend
  * Move /key to /panes/legend
  * Move legend images from key
  * Move legend js translations

-- File Changes --

    M app/abilities/ability.rb (2)
    R app/assets/images/legend/cyclemap/beach.png (0)
    R app/assets/images/legend/cyclemap/bicycle_parking.png (0)
    R app/assets/images/legend/cyclemap/bicycle_parking_small.svg (0)
    R app/assets/images/legend/cyclemap/bicycle_rental.png (0)
    R app/assets/images/legend/cyclemap/bicycle_rental_small.svg (0)
    R app/assets/images/legend/cyclemap/bicycle_shop.png (0)
    R app/assets/images/legend/cyclemap/toilets.png (0)
    R app/assets/images/legend/mapnik/cable.png (0)
    R app/assets/images/legend/mapnik/capital4.svg (0)
    R app/assets/images/legend/mapnik/capital7.svg (0)
    R app/assets/images/legend/mapnik/city4.svg (0)
    R app/assets/images/legend/mapnik/city6.svg (0)
    R app/assets/images/legend/mapnik/construction.png (0)
    R app/assets/images/legend/mapnik/destination.png (0)
    R app/assets/images/legend/mapnik/intermittent_water.svg (0)
    R app/assets/images/legend/mapnik/mainroad12.svg (0)
    R app/assets/images/legend/mapnik/mainroad15.svg (0)
    R app/assets/images/legend/mapnik/mainroad8.svg (0)
    R app/assets/images/legend/mapnik/mainroad9.svg (0)
    R app/assets/images/legend/mapnik/military.svg (0)
    R app/assets/images/legend/mapnik/private.png (0)
    R app/assets/images/legend/mapnik/reef.png (0)
    R app/assets/images/legend/mapnik/reserve.svg (0)
    R app/assets/images/legend/mapnik/runway11.svg (0)
    R app/assets/images/legend/mapnik/runway12.svg (0)
    R app/assets/images/legend/mapnik/runway13.svg (0)
    R app/assets/images/legend/mapnik/runway14.svg (0)
    R app/assets/images/legend/mapnik/school.svg (0)
    R app/assets/images/legend/mapnik/summit.svg (0)
    R app/assets/images/legend/mapnik/wetland.png (0)
    M app/assets/javascripts/index.js (4)
    R app/assets/javascripts/leaflet.legend.js (10)
    M app/assets/javascripts/leaflet.sidebar-pane.js (2)
    M app/assets/javascripts/osm.js.erb (4)
    M app/assets/stylesheets/common.scss (2)
    R app/controllers/legend_panes_controller.rb (7)
    M app/helpers/svg_helper.rb (2)
    M app/views/layouts/_control_icons.html.erb (2)
    M app/views/layouts/map.html.erb (2)
    R app/views/legend_panes/show.html.erb (10)
    R config/legend.yml (0)
    M config/locales/en.yml (4)
    M config/routes.rb (2)
    A test/controllers/legend_panes_controller_test.rb (20)
    D test/controllers/map_keys_controller_test.rb (20)
    M test/helpers/svg_helper_test.rb (44)
    M test/system/site_test.rb (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6113.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6113.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6113
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to