<p>In app/helpers/browse_helper.rb:</p>
<pre style='color:#555'>> :url => "//www.wikidata.org/wiki/#{value}?uselang=#{I18n.locale}",
> :title => value
> - }
> + }]
> + elsif (
> + # Key has to be one of the accepted wikidata-tags
> + key =~ /(architect|artist|brand|operator|subject):wikidata/ and
> + # Value has to be a semicolon-separated list of wikidata-IDs (whitespaces allowed before and after semicolons)
> + value =~ /^[Qq][1-9][0-9]*(\s*;\s*[Qq][1-9][0-9]*)*$/
> + )
> + # Splitting at every semicolon to get an array of wikidata-IDs (some will be surrounded by whitespaces)
> + ids = value.split(";")
> + result = []
> + for id in ids
> + # Add a hash to the result-array for every wikidata-ID
</pre>
<p><a href="https://github.com/tomhughes" class="user-mention">@tomhughes</a> thanks for your comments. I'm quite a newbie in Ruby, so I didn't realize, that using map would be a better solution. I'll revise my changes according to your recommendations.</p>
<p>Regarding the multiple values: No, it's not left over from etymology. For example for <code>brand:wikidata</code> it makes sense to allow multiple values, because a car-shop may sell more than one brand (see examples in my comment above). But the plain <code>wikidata</code>-tag establishes a 1:1-mapping of wikidata- and OSM-items. There won't be more than one wikidata-item representing the very same entity as one OSM-object.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/pull/788/files#r15375100">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/1419053__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMTg1NzU1MCwiZGF0YSI6eyJpZCI6Mzc2ODAyMTl9fQ==--53cc02f61f7141c778a9ed8842d3cd0d14f5aafd.gif" width="1" /></p>