Template talk:Taglist

From OpenStreetMap Wiki
Jump to navigation Jump to search

Languages

Unresolved

This is a very cool feature! One question: Could the template get the langugage automatically? I know this is done on some templates (e.g. Template:Tag).--Jojo4u (talk) 17:20, 20 August 2015 (UTC)

I am not a template wizard. What I wrote is about as far as my knowledge of Mediawiki templates took me. But maybe somebody else wants to try this. Joto (talk) 18:50, 20 August 2015 (UTC)

Translation

Resolved

Hi, this looks interesting.

I just would like to point out that the table header (Key, Value, Element, ...) is always in Engligh and does not get translated to a proper language.

Also I have started a discussion about using this feature on Map Features page with some ideas for expaning this software here Talk:Map_Features#Using_Tag_lists. Chrabros (talk) 08:36, 5 September 2016 (UTC)

Translation currently only works for English and German. That is simply so, because the needed texts for these languages are hardcoded into the Javascript. This can be extended to add more languages. See https://github.com/joto/taginfo/blob/master/web/public/js/taglists.js#L63-L79 . The problem is that this script needs to be changed and then deployed manually. We'll need a better mechanism in the long run to make this easier, but if anybody wants to supply translations, please go ahead and send emails or, better, pull requests. Joto (talk) 09:32, 5 September 2016 (UTC)
I have tried to create the pull request for Czech language. It was the first time I did something on GitHub, so I hope it is correct. Chrabros (talk)
Looks good. Joto (talk) 12:54, 5 September 2016 (UTC)
Localizations for Czech, German, English, Spanish, French, Hungarian, Italian, Japanese, Polish, Portugese, Russian, Ukrainian, Vietnamese, and Chinese are available now. Joto (talk) 13:49, 6 September 2016 (UTC)

Thousands separator in count

Resolved

Just a suggestion. It would be nice to display the number in Count column with some thousands separator. I would suggest to use space. However I do not know what is the best option for the whole world. Chrabros (talk) 13:23, 5 September 2016 (UTC)

I have used a small space as a thousand separator in taginfo for a long time precisely to get around the problem that different separators are used around the world. Nobody has ever complained, so I'll use the same here. Thanks for the suggestion. Joto (talk) 16:39, 5 September 2016 (UTC)
This is live now. Joto (talk) 13:47, 6 September 2016 (UTC)
Thank you. Chrabros (talk) 15:35, 6 September 2016 (UTC)

Case-insensitive sorting

Hi again,

it seems that the list is sorted alphabetically but case sensitive. In this way the tags with capital letters are listed first which is odd. Please see for example MDF beeing listed first here User:Chrabros/test.

Chrabros (talk) 14:33, 5 September 2016 (UTC)

This is difficult to do perfectly, because it depends on the locale. But OSM keys and tags should be lowercase in almost all cases. And the current behaviour is consistent with how taginfo does it in its own web interface. If you want to be sure about the ordering, you can give a list of all tags. Joto (talk) 16:53, 5 September 2016 (UTC)

Mobile front end

Resolved

The headings under Map Features that use tag lists say “Loading tag list” on mobile devices because the support is in Common.js but not Mobile.js. --Andrew (talk) 08:07, 7 September 2016 (UTC) Andrew (talk) 08:07, 7 September 2016 (UTC)

OK copied the same into Mobile.js I wonder if there's a smart way to avoid that duplication. -- Harry Wood (talk) 14:39, 26 November 2016 (UTC)

png Icons

Well done! Icons that are saved as png are not displayed. I did a test on tourism=guest_house (I'll delete it later). The png files will surely converted to svg. But that will take time.

Can you also display the png symbols? --geozeisig (talk) 06:41, 26 November 2016 (UTC)

I'll fix that as soon as I can. Joto (talk) 10:07, 3 January 2017 (UTC)

Discussion on user page

User geozeisig mentioned a number of issues and concerns regarding Taglists, and why he is reverting them where needed. Discussion is going on on his talk page: http://wiki.openstreetmap.org/wiki/User_talk:Geozeisig#Deine_.C3.84nderungen_aka_.22new_technic.22 Might probably be useful to join this discussion, or even better continue on this talk page. Mmd (talk) 09:39, 24 December 2016 (UTC)

If there are specific requests for the taginfo tagslists to support extra features, please add them to this page or open an issue on github. Joto (talk) 10:08, 3 January 2017 (UTC)

Taglist no longer working

Resolved

A recent Wiki update seems to have completely broken the Taglist feature. It's currently only displaying "LOADING TAG LIST... (If you do not see this tag list, you need to enable Javascript)". Javascript console shows errors like "ReferenceError: addOnloadHook is not defined ReferenceError: addOnloadHook is not defined". Mmd (talk) 12:26, 28 February 2017 (UTC)


Sysadmins fixed it. Joto (talk)
For what it's worth, I cannot reproduce this. Math1985 (talk) 01:08, 1 March 2017 (UTC)
Well, it's been fixed in the meantime, so that's probably kind of expected :) Mmd (talk) 11:36, 1 March 2017 (UTC)
yep. We got rid of addOnloadHook from MediaWiki:Common.js. Seems MediaWiki js no longer has that (Legacy JavaScript) -- Harry Wood (talk) 01:47, 1 March 2017 (UTC)
Thanks a lot for the quick fix! Mmd (talk) 11:36, 1 March 2017 (UTC)

Keys

Resolved

While attempting to convert Template:Map Features:annotation to Taglists, I failed to get keys listed on their own, without a value. Is this supported? --Tordanik 14:23, 30 April 2017 (UTC)

No, that is not supported. Joto (talk) 15:42, 30 April 2017 (UTC)
Hm, that's too bad. Is there any chance to have some version of this implemented? Without this feature I don't really see a way to fully port Map features over to Taglists, as this issue would be blocking the migration of several other templates, too (e.g. Name, References, Properties, Restrictions, and Addresses). --Tordanik 17:25, 30 April 2017 (UTC)
Update: keys are now supported in the format "tags=<key>=*" - use an asterix ("*") for the value when you just want the key. See issue #200 and current documentation. --Jeisenbe (talk) 00:42, 5 March 2020 (UTC)

Images

HI ! Super interesting tool, thanks for that. Question : I would like not showing images example,as for example those ones for highways are not typical in Madagascar. Would that be an option? Violaine_Do 31st May 2018

No, this is currently not possible. You can have different images on the key/tag pages in a local language, though. Joto (talk) 08:16, 3 July 2018 (UTC)

Count field

Resolved

Is it possible to increase the width of the field for "Count"? Currently, it is too narrow and looks very strange. See Pl:Key:site_type.
Good job! --Władysław Komorek (talk) 13:49, 4 November 2018 (UTC)

Looks okay to me. Can you post a screen shot here? -- Joto (talk) 14:03, 4 November 2018 (UTC)
Site_type Count field --Władysław Komorek (talk) 15:21, 4 November 2018 (UTC)
Should be better now. -- Joto (talk) 16:46, 4 November 2018 (UTC)
Thanks. --Władysław Komorek (talk) 18:13, 4 November 2018 (UTC)

Link to the translated page

Unresolved

How can I get a link to the key and the value of the translated page?
memorial -> Pl:Key:memorial
plaque -> Pl:Tag:memorial=plaque
it was possible before, because:
|{{Map Features:memorial/tagkeylink|lang={{{lang|}}}|{{{memorial:key|}}}|memorial}}
|{{Map Features:memorial/tagvaluelink|lang={{{lang|}}}|{{{memorial:plaque|}}}|memorial|plaque}}
--Władysław Komorek (talk) 09:40, 5 November 2018 (UTC)

Taglist with unused values

Resolved

I've created several wiki-pages for police-related tags (Key:police), based on an approved proposal Proposed Features/Tag:Police. This includes new values for the police key, like police=naval_base, that hasen't been mapped in OSM before. Now, when using taglist to create a list of pages for all new values, only some of the values appear, although I had all specifically mentioned in the page's source code. Is it possible, that taglist only shows tags that have a positive tag-count in taginfo? --Grimpeur78 (talk) 10:25, 18 May 2019 (UTC)

Taginfo is only updated once per day. You have to give it time to even find your new page. Joto (talk) 15:09, 18 May 2019 (UTC)
Re: > "taglist only shows tags that have a positive tag-count in taginfo?" - Yes, that appears to be the case. If the tag is used at least 1 time in the database, then it will appear on the taglist. I believe this is a case of "it's a feature, not a bug": there isn't any reason to show a value that has never been used. --Jeisenbe (talk) 00:45, 5 March 2020 (UTC)

Server scripts as alternative taglists

Now the wiki has data items and scripting in Lua I have been wondering whether they are a useful alternative to Taginfo-driven lists.

Advantages of server scripts:

  1. Descriptions can be generated from data items, tharefore they can be in a language where there is no long form documentation for the key. This resolves the issues that have limited use of taglists in languages other than English because descriptions can be rolled out quickly and some can be copied from the old map features templates.
  2. Tables at the top of pages are visible immediately,
  3. A successful connection to tagindo.openstreetmap.org is unnecessary.

Advantages of taglists driven by Taginfo:

  1. The technology aleady exists and can be rolled out.
  2. Separate scripts avoid overloading the server (Map Features in Polish, Ukrainian and Japanese hits wiki limits).
  3. The web scripts are free-standing and can be hosted on another website outside the wiki,

--Andrew (talk) 21:23, 3 August 2019 (UTC)

As mentioned on the mailing list, I think [1] is a better alternative that we can adapt to run on OSM wiki. --Yurik (talk) 22:15, 3 August 2019 (UTC)
Really interesting :)

Do you have any examples or SPARQL queries in OSM Wiki?
Does this template use the Sophox endpoint (OSM DataItems) or the Wikidata endpoint ?
--Pyrog (talk) 15:32, 19 January 2022 (UTC)

Horrible performance

In my experience it is horribly, horribly slow sometimes requiring minute or longer to load. Is it just me or is it unusuably bad? (it also requires JS for some reason) Mateusz Konieczny (talk) 10:27, 14 August 2019 (UTC)

I haven't noticed much in the way of performance problems yet. --21:53, 21 August 2019 (UTC)
I'm curious about this. Sometimes the taglists load quickly, but other times they don't load at all and I have to reload the page in my browser. Another user has complained that the lists never load for them in the "preview" mode while editing the wiki. Looking at the page source, it's not clear to me how the taglists work.
Is my brower generating the html for table, client-side, based on the javascript?
Would it be possible to pre-generate the html on the server so that the loading time is not so slow for users? Sorry if I'm misunderstanding the technical aspects. --Jeisenbe (talk) 00:51, 5 March 2020 (UTC)
The technical side is a bit complicated because we need to integrate with the Mediawiki-generated pages. The best way to accomplish this I could think of was by generating the tables with Javascript in the browser. I don't believe Javascript is to blame here, there are many much more complicated Javascript pages out there. It beeing slow in "preview" mode where, presumably, Mediawiki caching is not involved, points towards a problem with Mediawiki. And it might well be a combination of Mediawiki and taginfo both being slow in some cases. -- Joto (talk) 07:05, 11 May 2020 (UTC)

Categories in tables ?

Is it possible with "Taglist" to make tables with different categories in one table, like in "classical" tables.
See by example =>https://wiki.openstreetmap.org/wiki/Key:building.

Header header header
content content content
content content content
Category 2
content content content
content content content
content content content
Category 3
content content content

Or should I use "Taglist" multiple times as below

Category 1

LOADING TAG LIST... (If you do not see this tag list, you need to enable JavaScript)
This table is auto-generated. See Template:Taglist for a documentation on it.

Category 2

LOADING TAG LIST... (If you do not see this tag list, you need to enable JavaScript)
This table is auto-generated. See Template:Taglist for a documentation on it.

Category 3

LOADING TAG LIST... (If you do not see this tag list, you need to enable JavaScript)
This table is auto-generated. See Template:Taglist for a documentation on it.

...

No, you can't do categories, just use multiple tables. -- Joto (talk) 10:10, 4 March 2020 (UTC)

What is actual source of data and how it can be edited?

Resolved

? Mateusz Konieczny (talk) 03:37, 28 July 2020 (UTC)

I thought the taglists are populated using the same information shown in taginfo, which comes from infoboxes here. However, today someone on OSMUS Slack noticed that Template:Map Features:office was showing a description of office=advertising_agency that more matched the lead paragraph of the body in Tag:office=advertising_agency rather than the contents of the infobox, which is surprising and inconsistent with how taginfo itself works. – Minh Nguyễn 💬 04:24, 28 July 2020 (UTC)

Count for specific country?

Unresolved

Can we specify the count to be for a specific country? Could the count use the UK taginfo, for example, to get the UK count rather than the global count? Casey boy (talk) 10:59, 15 April 2021 (UTC)

Sortable wiki table

Unresolved

Would it be possible to make the table sortable like "wikitable sortable"? So one could provide the taglist in order of usage count and a user viewing the wiki page could sort the content of the table in alphabetical order. --Chris2map (talk) 13:25, 12 February 2022 (UTC)

Splitting the documentation

Taginfo/Taglists currently documents two distinct things:

I think it would be better if these were documented at Template:Taglist/doc and Taginfo/taglists.js respectively, turning the page into a disambiguation page.

This would make Template:Taglist directly show the template documentation (like most other templates do) instead of just linking to another page.

--Push-f (talk) 07:19, 25 June 2022 (UTC)

Putting template documentation in the usual place does seem to be a good idea. Andrew (talk) 10:16, 25 June 2022 (UTC)

Taglist with only valid tags: in use, de facto, approved

Unresolved

I have created a git ticket https://github.com/taginfo/taginfo/issues/366 asking if it is possible to have a list of only valid tags: in use, de facto, and approved, ignoring those that are new (proposals) and the deprecated ones. In fact, when creating a generic list, it is not possible to identify which ones are valid and which ones are not.

I think something like this:

{{Taglist|tags=access|status=defacto,inuse,approved}}

In this way, it is easier to create a list of valid tags, without explicitly specifying each tag.

-- AngocA (talk) 04:18, 11 July 2022 (UTC)

Where styling of that template can be modified?

Resolved

I see nothing editable when editing template itself. Mateusz Konieczny (talk) 04:38, 27 July 2022 (UTC)

The table of the taglist uses css-class ".taginfo-taglist" so we could add styles to MediaWiki:Common.css (admin could) or to User:.../common.css --Chris2map (talk) 16:43, 27 July 2022 (UTC)
But how one may change text content of headers? Sorry for the unclear question (see section below). Mateusz Konieczny (talk) 17:03, 27 July 2022 (UTC)
I suppose the headers are entered in https://taginfo.openstreetmap.org/js/taglists.js --Chris2map (talk) 18:24, 27 July 2022 (UTC)

"Map rendering" is OSM Carto-centric

Unresolved

I propose to change "Map rendering" into "OSM Carto map rendering". Right now it misleadingly treats OSM Carto as a sole map showing OSM data Mateusz Konieczny (talk) 04:40, 27 July 2022 (UTC)

+1 --Push-f (talk) 16:54, 27 July 2022 (UTC)
+1; I suppose the header text is defined in https://taginfo.openstreetmap.org/js/taglists.js at
   function column_name(lang, column) {
           'en': {
               'key': 'Key',
               'value': 'Value',
               'element': 'Element',
               'description': 'Description',
               'image': 'Image',
               'osmcarto_rendering': 'Map rendering',
               'count': 'Count'

--Chris2map (talk) 18:24, 27 July 2022 (UTC)
Opened request on https://github.com/taginfo/taginfo/issues/404 --Chris2map (talk) 13:19, 10 April 2023 (UTC)

Data source

Resolved

"The key/tag description must be available in the wiki in this language. Update the info box on the key/tag page for this to work (description will not used from data items)" - it applies to all info, not only descriptions, right? See also https://community.openstreetmap.org/t/wiki-page-for-office-therapist/4149 Mateusz Konieczny (talk) 06:28, 16 October 2022 (UTC)

Yes! As far as I know taginfo and dependent taglist exclusively parse information from wiki pages (Taginfo/Parsing the Wiki), not from data items. --Chris2map (talk) 12:17, 10 April 2023 (UTC)

element column should be optional

Unresolved

Add support to make "element" column hidden. It unnecessarily takes up space in the table. maro21 15:16, 9 April 2023 (UTC)

And also "image". --Chris2map (talk) 12:21, 10 April 2023 (UTC)

count is too precise and not global

I don't think it's useful to have the detailed count per node/way/relation. First, as a result, tables can be very tall because it means 3 lines for each item of the taglist (most of the time this isn't a problem if there is an image but sometimes it is). Second (and for me most important), the total nodes+ways+relations is not shown (so when I look at the numbers, I try to add those numbers to see how many items are using the tag. But I'm not a computer so it's very difficult to have a good idea of the real usage). I will therefore suggest replacing the 3 lines with a single line with the total count (like in the "Taginfo entry" template). Yunan973 (talk) 13:25, 19 July 2024 (UTC)