Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18302 closed enhancement (fixed)

support national taginfo instances

Reported by: Klumbumbus Owned by: Don-vip
Priority: normal Milestone: 19.12
Component: Core Version:
Keywords: taginfo Cc:

Description (last modified by Klumbumbus)

Additional to the global taginfo page https://taginfo.openstreetmap.org/ there are national instances too, see osmwiki:Taginfo/Sites. It would be a nice feature if the context menu of a tag would support these too. I guess we would need to manually maintain the list of working (and regulary updated) instances with their base URL and match it with our internal boundaries.osm file.
If you right click an tag then JOSM needs to check if it is inside of a boundary with a national taginfo instance and if so then display a second link, e.g. "Go to Taginfo UK"


Attachments (2)

taginfo.png (11.3 KB ) - added by Klumbumbus 4 years ago.
18302.png (2.2 KB ) - added by Don-vip 4 years ago.

Download all attachments as: .zip

Change History (36)

by Klumbumbus, 4 years ago

Attachment: taginfo.png added

comment:1 by Klumbumbus, 4 years ago

Description: modified (diff)

comment:2 by Klumbumbus, 4 years ago

Description: modified (diff)

comment:3 by Don-vip, 4 years ago

Owner: changed from team to Don-vip
Status: newassigned

comment:4 by Don-vip, 4 years ago

Milestone: 19.11

comment:5 by Don-vip, 4 years ago

Milestone: 19.1119.12

comment:6 by Don-vip, 4 years ago

In 15564/josm:

see #18302 - cleanup boundaries file

comment:7 by Don-vip, 4 years ago

Resolution: fixed
Status: assignedclosed

In 15565/josm:

fix #18302 - support national taginfo instances

comment:8 by stoecker, 4 years ago

Are you sure that REPLACING the taginfo with a national variant is right? I'd ADD the national one as a second option.

comment:9 by Don-vip, 4 years ago

In 15566/josm:

see #18302 - fix boundaries file broken in r15564

in reply to:  8 ; comment:10 by Don-vip, 4 years ago

Replying to stoecker:

Are you sure that REPLACING the taginfo with a national variant is right? I'd ADD the national one as a second option.

I didn't replace the instance but added all possible instances:


Last edited 4 years ago by Don-vip (previous) (diff)

by Don-vip, 4 years ago

Attachment: 18302.png added

comment:11 by Don-vip, 4 years ago

In 15569/josm:

see #18302 - fix NPE in unit tests

in reply to:  10 comment:12 by stoecker, 4 years ago

Replying to Don-vip:

Replying to stoecker:

Are you sure that REPLACING the taginfo with a national variant is right? I'd ADD the national one as a second option.

I didn't replace the instance but added all possible instances:


Well, now that I checked the code it was obvious on first view. Sometimes it seems I loose my ability to read code for some time. :-(

in reply to:  7 comment:13 by Klumbumbus, 4 years ago

Replying to Don-vip:

In 15565/josm:

fix #18302 - support national taginfo instances

Great. I think we should remove sweden though. The data is 4 years old, see top right on http://se.taginfo.openstreetmap.se/. This doens't really represent the current tagging situation in sweden anymore.

Version 0, edited 4 years ago by Klumbumbus (next)

comment:14 by Don-vip, 4 years ago

In 15572/josm:

see #18302 - remove outdated taginfo instance from Sweden

comment:15 by Don-vip, 4 years ago

In 15589/josm:

see #18302 - spotbugs - SIC_INNER_SHOULD_BE_STATIC

comment:16 by Don-vip, 4 years ago

Geofabrik now provides one Taginfo instance per extract: https://twitter.com/HermioneNight/status/1213850596589080576

comment:17 by Klumbumbus, 4 years ago

So, should we add all these to boundaries.osm?

comment:18 by Don-vip, 4 years ago

It's not official yet, Frederik should send me an e-mail with more details soon.

comment:19 by simon04, 4 years ago

In 15669/josm:

see #18302 - PropertiesDialog: avoid intermediate list creation

comment:20 by Don-vip, 4 years ago

Frederik just made a new version of GeoFabrik json index:
http://download.geofabrik.de/index-v1-nogeom.json

It contains links to their regional Taginfo instances with ISO3166 ids so that we can map them with our internal boundaries.

I've set up a remote link on JOSM website:
https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json

comment:21 by Don-vip, 4 years ago

In 15876/josm:

fix #18729, see #18302 - support regional taginfo instances from Geofabrik

comment:22 by simon04, 4 years ago

Awesome, great work, Vincent and Frederik, thank you so much!

in reply to:  20 ; comment:23 by simon04, 4 years ago

Replying to Don-vip:

I've set up a remote link on JOSM website:
https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json

Vincent, can you enable gzip compression? Currently, the 416 kB file is transmitted w/o compression:

2020-02-22 23:11:29.643 INFO: GET https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json -> HTTP/1.1 200 (56 ms; 416 kB)
2020-02-22 23:11:29.644 FINE: RESPONSE: {Keep-Alive=[timeout=5, max=99], null=[HTTP/1.1 200 OK], Server=[Apache/2.4.29 (Ubuntu)], Connection=[Keep-Alive], Last-Modified=[Sat, 22 Feb 2020 04:55:02 GMT], Date=[Sat, 22 Feb 2020 22:11:29 GMT], Accept-Ranges=[bytes], Strict-Transport-Security=[max-age=16070400; includeSubDomains], ETag=["6815e-59f22f0dedd7e"], Content-Length=[426334], Age=[178], X-Clacks-Overhead=[GNU Terry Pratchett], Content-Type=[application/json]}

comment:24 by Klumbumbus, 4 years ago

Another little problem is the translation. Currently the country code and "Geofabrik" from #18729 is added to the end of the string. E.g. for german that should be in the midlle of the string instead as the verb is at the end of that word group. Could the placeholder be integrated in the translatable string so it can be moved to the correct position in the translated string by translators?

in reply to:  23 comment:25 by stoecker, 4 years ago

Vincent, can you enable gzip compression? Currently, the 416 kB file is transmitted w/o compression:

Added JSON to the compressed file types.

in reply to:  24 ; comment:26 by simon04, 4 years ago

Replying to Klumbumbus:

Could the placeholder be integrated in the translatable string so it can be moved to the correct position in the translated string by translators?

For the 20.03 release, yes. For now I'd like to find a solution that does not introduce a new i18n string. What about tr("Go to Taginfo") + " (Geofabrik AT)"?


Replying to stoecker:

Added JSON to the compressed file types.

Nice! Now, only 23 kB are transferred. :)

in reply to:  26 ; comment:27 by Klumbumbus, 4 years ago

Replying to simon04:

For the 20.03 release, yes. For now I'd like to find a solution that does not introduce a new i18n string. What about tr("Go to Taginfo") + " (Geofabrik AT)"?

We can leave it for 20.02 as is and change it after 20.02.

Last edited 4 years ago by Klumbumbus (previous) (diff)

in reply to:  27 ; comment:28 by stoecker, 4 years ago

Replying to Klumbumbus:

Replying to simon04:

For the 20.03 release, yes. For now I'd like to find a solution that does not introduce a new i18n string. What about tr("Go to Taginfo") + " (Geofabrik AT)"?

We can leave it for 20.02 as is and change it after 20.02.

It should be tr("Go to Taginfo {0}", "(Geofabrik AT)"), but better would be tr("Go to Taginfo ({0} {1})", "Geofabrik", "AT"). Best is to don't assume anything about translated string.

P.S. There is no harm in adding a new tr() before the release when the current state is untranslated. No need to wait in this case.

in reply to:  28 comment:29 by Klumbumbus, 4 years ago

Replying to stoecker:

P.S. There is no harm in adding a new tr() before the release when the current state is untranslated. No need to wait in this case.

In this case the string was already translated since 2015 (for german). So it would have broken the translation for most languages.

comment:30 by stoecker, 4 years ago

With Geofabrik? Or do you refer to the plain one without additional text?

comment:31 by Klumbumbus, 4 years ago

The plain one which is still used also together with Geofabrik. See https://translations.launchpad.net/josm/trunk/+pots/josm/de/+translate?batch=2&show=all&search=taginfo

comment:32 by stoecker, 4 years ago

Well, that's illegal reuse :-) But I see your point...

comment:33 by GerdP, 4 years ago

See #18772. My fix in r15937 is probably not good enough, taginfoGeofabrikCache might contain invalid data?
Under what conditions are the invalid versions of the CachedFile overwritten / retrieved again from the server?

comment:34 by simon04, 4 years ago

In 16067/josm:

fix #18821, see #18302 - TaginfoAction: improve i18n

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.