]> git.openstreetmap.org Git - rails.git/commitdiff
Add buried to list of secondary Wiki prefixes
authorKasper Sanguesa-Franz <kasper@franz.guru>
Tue, 12 Dec 2023 09:12:38 +0000 (09:12 +0000)
committerKasper Sanguesa-Franz <kasper@franz.guru>
Tue, 12 Dec 2023 09:12:38 +0000 (09:12 +0000)
app/helpers/browse_tags_helper.rb
test/helpers/browse_tags_helper_test.rb

index 014b8262d050b947de09416b15a8020191f0bb26..ffb88b43f0a48b1b4bff5eaa53301be6309f2ea1 100644 (file)
@@ -1,7 +1,7 @@
 module BrowseTagsHelper
   # https://wiki.openstreetmap.org/wiki/Key:wikipedia#Secondary_Wikipedia_links
   # https://wiki.openstreetmap.org/wiki/Key:wikidata#Secondary_Wikidata_links
-  SECONDARY_WIKI_PREFIXES = "architect|artist|brand|flag|genus|name:etymology|network|operator|species|subject".freeze
+  SECONDARY_WIKI_PREFIXES = "architect|artist|brand|buried|flag|genus|name:etymology|network|operator|species|subject".freeze
 
   def format_key(key)
     if url = wiki_link("key", key)
index 0af0d931018ee7c25928f80ad4ac6f025cb0cb1a..76bd04f3b349cb8a649d23e25b4fa20bbe2dca06 100644 (file)
@@ -132,6 +132,11 @@ class BrowseTagsHelperTest < ActionView::TestCase
     assert_equal "//www.wikidata.org/entity/Q24?uselang=en", links[0][:url]
     assert_equal "Q24", links[0][:title]
 
+    # This verified buried is working
+    links = wikidata_links("buried:wikidata", "Q24")
+    assert_equal "//www.wikidata.org/entity/Q24?uselang=en", links[0][:url]
+    assert_equal "Q24", links[0][:title]
+
     links = wikidata_links("species:wikidata", "Q26899")
     assert_equal "//www.wikidata.org/entity/Q26899?uselang=en", links[0][:url]
     assert_equal "Q26899", links[0][:title]