From: Kasper Sanguesa-Franz Date: Tue, 12 Dec 2023 09:12:38 +0000 (+0000) Subject: Add buried to list of secondary Wiki prefixes X-Git-Tag: live~741^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2a6f78747e2013a1e606f9bc08b39f9c392d154a?hp=-c Add buried to list of secondary Wiki prefixes --- 2a6f78747e2013a1e606f9bc08b39f9c392d154a diff --git a/app/helpers/browse_tags_helper.rb b/app/helpers/browse_tags_helper.rb index 014b8262d..ffb88b43f 100644 --- a/app/helpers/browse_tags_helper.rb +++ b/app/helpers/browse_tags_helper.rb @@ -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) diff --git a/test/helpers/browse_tags_helper_test.rb b/test/helpers/browse_tags_helper_test.rb index 0af0d9310..76bd04f3b 100644 --- a/test/helpers/browse_tags_helper_test.rb +++ b/test/helpers/browse_tags_helper_test.rb @@ -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]