Module talk:DescriptionFromDataItem
Closed ways
Why add an icon for onClosedWay? It was disfavoured at Template_talk:Description/Archive_1#Closed_way_icon. --Andrew (talk) 17:24, 30 December 2018 (UTC)
- Andrew, where do you see an icon on closed way? The only check for it is to create a Category:Obsolete description template parameters -- so that it can be removed (I might remove it using a bot if everyone is ok with it). --19:19, 30 December 2018 (UTC)
- That is fine.--Andrew (talk) 20:30, 30 December 2018 (UTC)
P11 (Proposal discussion) -> statuslink not working
The adoption of proposal discussion (P11) for statuslink
in {{KeyDescription}} and {{ValueDescription}} does not work. --SelfishSeahorse (talk) 20:07, 9 April 2019 (UTC)
- @SelfishSeahorse: please be a bit more specific. The Pl:Key:bridge:movable shows a link to the proposal discussion, without it being listed. I saw you were experimenting with shop=fashion_accessories (Q19528), i will see if it works correctly. --Yurik (talk) 20:53, 9 April 2019 (UTC)
- @SelfishSeahorse:, fixed -- you used proposal discussion (P11) as a qualifier, but per data item docs, it should be used as a "reference" (e.g. proving that status is set correctly). I fixed it for you. Note that "add reference" only shows up in the status property. --Yurik (talk) 21:03, 9 April 2019 (UTC)
- @Yurik:: Thank you for your help! --SelfishSeahorse (talk) 06:38, 10 April 2019 (UTC)
Linked tags break mismatch tooltip
@Yurik: If the wiki page and data item have differing descriptions, the module inserts a <span>
with a tooltip containing the desc_mismatch
message and the data item's formatted description. This formatted description needs to be sanitized; otherwise, links added during formatting can break the HTML tag, as seen on change=*. – Minh Nguyễn 💬 18:18, 19 April 2019 (UTC)
- @Minh Nguyen: thx for the report. This one is a bit nasty -- template expansion "key:xxx" -> {{Key|xxx}} happens at the very last moment, right before passing the "description" parameter to the {{Description}} template. But the <span> gets added before that, which means the string "<span title="... key:xxx ..."> ... </span>" is expanded with templates at the last moment, thus breaking the key:xxx thing. One simple solution would be to not expand the keys/tags if the description is different, but it's not ideal. --Yurik (talk) 03:46, 21 April 2019 (UTC)
- P.S. resolved with the above fix, still a todo for the future cleanup. --Yurik (talk) 03:55, 21 April 2019 (UTC)
Lua error: multiple tags in combination (?)
@Yurik: Based on my edits at DE:Key:restaurant and Item:Q646, I guess there is an error with {{KeyDescription}} when there are multiple tags/keys using property P46. Is that correct? --Tigerfell (Let's talk) 18:25, 11 August 2019 (UTC)
- @Tigerfell: thanks, I fixed the code -- it never should have crashed, even on bad data. It now shows "bad item" for cases like that. I didn't want to hide it because then it would be much harder to notice and to fix. The reason - the value in combinations is not a key or a tag. --Yurik (talk) 16:05, 15 August 2019 (UTC)
Thanks, I would have never figured out that error. --Tigerfell (Let's talk) 20:18, 15 August 2019 (UTC)
- Resolved: Mateusz Konieczny (talk) 08:23, 26 October 2020 (UTC)
ValueDescription adding nonexisting category
See Template_talk:Description/Archive_1#Why_Tag:waterway=riverbank_has_nonexisting_category,_apparently_added_by_this_template? - seems to be caused by this module Mateusz Konieczny (talk) 11:14, 18 October 2019 (UTC)
- Resolved: Mateusz Konieczny (talk) 08:23, 26 October 2020 (UTC)
Add category listing English language pages loading content from data items
Please, see Template_talk:Description#Add_category_listing_English_language_pages_loading_content_from_data_items for discussion Mateusz Konieczny (talk) 08:22, 26 October 2020 (UTC)
- Category:Pages loading description from data item
- Category:Pages loading status from data item
- Category:Pages loading image from data item
- Category:Pages loading applicabilities from data item
Remove P38?
Not sure what RENDER_IMAGE is doing, but https://wiki.openstreetmap.org/wiki/Property:P38 is marked as deprecated 19:09, 8 December 2020 (UTC)
- The same for https://wiki.openstreetmap.org/wiki/Property:P27 that since 2018 is marked as soon to be deleted https://wiki.openstreetmap.org/w/index.php?title=Property:P27&diff=1758394&oldid=1758393 It still appears in code of this module Mateusz Konieczny (talk) 19:11, 8 December 2020 (UTC)
- Note: The term RENDER_IMAGE is still used in the module but not the deprecated Property:P38. The usage of property was changed in Dec.2021 into Property:P39 by setting p.RENDER_IMAGE = P39 without changing the name of the constant. --Chris2map (talk) 11:30, 25 March 2023 (UTC)
Always show button to edit wiki page
Currently in some cases only link to data item is displayed (such as at Key:waterway).
I propose to always show pencil linking data item and page in the edit mode Mateusz Konieczny (talk) 17:23, 10 December 2020 (UTC)
- Why do you want to have this extra button? You can just click on Edit or Edit source at the very top. It actually does the same thing. --Tigerfell (Let's talk) 17:01, 29 December 2020 (UTC)
Adding wikidata link to the boxes
(copy to Template_talk:Description#Adding_wikidata_link_to_the_boxes)
Hi there,
There is a lot of tags (keys or values, e.g. landuse=orchard) with corresponding Element data (e.g. Item:Q4923) having a concept Wikidata value (e.g. Q236371). But the correspondance wikipage (e.g. Tag:landuse=orchard) does not show a link to this wikidata item ( e.g. [2]).
In the Infobox, Tools for this tag offers precious technical and historical links to the key|value, but not links to deeper the semantic, in spite of the available semantic tools.
It should be interesting to add such links in the Tools for this tag.
First : a wikidata link. It does not need to be a big one. A simple logo with a link, like I did here for example. A little tooltip with the localized label could be helpful.
And, I don't know if it is possible, when the wikidata item have links to wikipedia pages in different languages, a link to the wikipedia page (e.g. Verger) in the actual language, with a label, or with a logo and tooltip...
Thanks for your opinion and your skill. FrViPofm (talk) 11:29, 1 March 2023 (UTC)
- Please see Proposed features/remove link to Wikidata from infoboxes. --Chris2map (talk) 18:44, 18 March 2023 (UTC)
- OK, the link was horrific. But this one : ? A pity it has not been suggested better, cleverer use of this link, rather than only remove. Very often people on OSM think binarily : black/white, yes/no, indian/cowboy (I've been reverted for having corrected some obvious typos with taginfo-josm like building=hoouse because don't make mechanical edits but the rule seems more important than the reality : das haben wir nicht entschieden). Maybe it could be a link to the wikipedia page in the customer language that recorded in the wikidata page. I'm convinced it is possible in lua. It could be cleverer than a pure remove' solution. FrViPofm (talk) 09:26, 28 April 2023 (UTC)
Added maintenance subcategories for filtering pages in default namespace
Since the maintenance categories for missing or mismatched information are populated with entries from many language namespaces, I added filtering of pages in the default namespace (pages in English) to list them in additional categories, see Category:Data item issues in default namespace. – Talk:Wiki#Categorizing_"Mismatched_..."_in_subcategories_for_"default_English_namespace" (permalink) --Chris2map (talk) 18:18, 2 March 2023 (UTC)
Not complaining about "Image:" instead of "File:"
See Module:DescriptionFromDataItem/Sandbox line 406. Adding that line to the module will stop putting key and tag pages in "Category:Mismatched image" if the only difference between the image file from wiki page and the one from data item is that it is noted with "Image:" instead of "File:". --Chris2map (talk) 19:50, 12 March 2023 (UTC)
Not complaining about mismatched "statuslink" if only difference is URL notation
Added code to the module to stop putting key and tag pages in "Category:Mismatched statuslink" if the only difference between the entry on wiki page and the one from data item is that the former is noted as relative wiki link (Proposed_features/foo_bar) and the latter as URL (https://wiki.openstreetmap.org/wiki/Proposed_features/foo_bar). For now, it doesn't work with spaces (" ") and needs "_". --Chris2map (talk) 16:06, 17 March 2023 (UTC)
- Chris2map, would it be possible to do the same for osm-carto-rendering? The same story is with this category with underscores and spaces. maro21 15:01, 29 April 2023 (UTC)
Category:Not copied description
I don't understand why some pages where description was not copied to the data item are not in Category:Not copied description, but in Category:Mismatched description. As an example: Pl:Tag:government=healthcare and its data item. maro21 21:06, 29 June 2023 (UTC)
Ok, I discovered that it compares the Polish description with the English description - there is a hint as you position the cursor over the description. I think it's bug and that's why there are so few pages in this category. For example, RU:Tag:landuse=well is in Category:Not copied description because there is no Russian or English description. But if I add the English description in the data item, this page will be in Category:Mismatched description even though the Russian description was still not copied. maro21 21:18, 29 June 2023 (UTC)
- Indeed, looks like a bug. Maybe I already have a fix. You can test the sandbox version by using {{ValueDescription/Sandbox}} on a tag page. I'm not sure yet if the change has any unwanted effects. --Chris2map (talk) 19:19, 30 June 2023 (UTC)
- Change to module has been applied. Let's see! --Chris2map (talk) 16:50, 4 July 2023 (UTC)
- Now, Category:Not copied description has 1829 pages, Category:Mismatched description 4110 pages. Seems to work. --Chris2map (talk) 16:52, 5 July 2023 (UTC)
- Yay! maro21 16:55, 5 July 2023 (UTC)
- Now, Category:Not copied description has 1829 pages, Category:Mismatched description 4110 pages. Seems to work. --Chris2map (talk) 16:52, 5 July 2023 (UTC)
- Change to module has been applied. Let's see! --Chris2map (talk) 16:50, 4 July 2023 (UTC)
Additional categories?
I’d like two more maintenance categories — one for missing data items and one for documentation pages not linked from the data item. Yuri’s bot handled both of them automatically but it hasn’t run for a long time. Andrew (talk) 21:59, 14 November 2023 (UTC)
- Which one do you else have in mind for the former?
- For the latter that should be possible by adding respective code to that module. --Chris2map (talk) 23:27, 14 November 2023 (UTC)
Failed link to key prefixes
The data item modules seem not to provide correct links to key prefix pages. E.g. in the description box at DE:Key:object:* there is an error "Bad item: Q35" with the seeAlso link to addr:*=*. The link isn't set as description template parameter at the page so it is fetched from the data item by the module. I tried to improve Module:OsmPageTitleParser/sandbox with removing the "*" from the title name of a key prefix but after testing it wasn't succesfull. – We probably need to expand the Module:DescriptionFromDataItem accordingly to handle the key prefixes and suffixes properly. Does anyone have an idea and can support? --Chris2map (talk) 20:06, 3 March 2024 (UTC)
- For cases like DE:Key:object:*, it is enough to add to the infobox what is in the data items. maro21 19:40, 6 March 2024 (UTC)