#23183 closed defect (fixed)
Tag "country" is approved so it should not appear in the Informational level validator
Reported by: | angoca | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 23.11 |
Component: | Core validator | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Activate Informational level validator
- Modify an existing element
- Validate objects
What is the expected result?
Ignore this tag.
What happens instead?
Show the tag as not existing in presets
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-08-29 13:38:40 +0200 (Tue, 29 Aug 2023) Revision:18822 Build-Date:2023-08-30 01:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18822 en) Mac OS X 10.15.7 OS Build number: Mac OS X 10.15.7 (19H2026) Memory Usage: 1588 MB / 4096 MB (553 MB allocated, but free) Java version: 17.0.7+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 69731270 1440×900 (scaling 2.00×2.00) Maximum Screen Size: 1440×900 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: en_CO.UTF-8 System property file.encoding: US-ASCII System property sun.jnu.encoding: UTF-8 Locale info: en_CO Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop] Dataset consistency test: No problems found Validator rules: + https://raw.githubusercontent.com/MaptimeBogota/ColombianJosmValidator/main/Rules_Colombian-specific.validator.mapcss Last errors/warnings: - 00771.445 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8218509.2812221,469629.1017841,-8140237.7642581,547900.6187481 content type was: text/xml;charset=utf-8 - 00771.445 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8296780.7981862,469629.1017841,-8140237.7642581,626172.1357122 content type was: text/xml;charset=utf-8 - 00771.445 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8218509.2812221,391357.5848201,-8140237.7642581,469629.1017841 content type was: text/xml;charset=utf-8 - 00771.445 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8296780.7981862,469629.1017841,-8140237.7642581,626172.1357122 content type was: text/xml;charset=utf-8 - 00771.449 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8766409.8999703,-0.0000000,-8140237.7642581,626172.1357122 content type was: text/xml;charset=utf-8 - 00771.449 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8296780.7981862,313086.0678561,-8140237.7642581,469629.1017841 content type was: text/xml;charset=utf-8 - 00771.449 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8453323.8321142,313086.0678561,-8140237.7642581,626172.1357122 content type was: text/xml;charset=utf-8 - 00771.449 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8296780.7981862,313086.0678561,-8140237.7642581,469629.1017841 content type was: text/xml;charset=utf-8 - 00771.449 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8453323.8321142,313086.0678561,-8140237.7642581,626172.1357122 content type was: text/xml;charset=utf-8 - 00771.449 W: Image not returned for tile: http://192.168.0.7:8080/geoserver/Colombia_IGAC_workspace/ows?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&LAYERS=&STYLES=&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=-8766409.8999703,-0.0000000,-8140237.7642581,626172.1357122 content type was: text/xml;charset=utf-8
Attachments (2)
Change History (20)
comment:1 by , 14 months ago
by , 14 months ago
Attachment: | Screen Shot 2023-09-21 at 12.03.08 PM.png added |
---|
comment:2 by , 14 months ago
Yes, I was talking about "country" tag which is different from "office=diplomatic". I attached a screenshot of the validator.
comment:3 by , 14 months ago
And the same issue applies for "target" - https://wiki.openstreetmap.org/wiki/Key:target and "embassy" - https://wiki.openstreetmap.org/wiki/Key:embassy, which are part of the approved proposal - https://wiki.openstreetmap.org/wiki/Proposal:Office%3Ddiplomatic
comment:4 by , 14 months ago
Milestone: | → 23.09 |
---|
follow-ups: 7 8 comment:6 by , 14 months ago
Is it worth adding the codes to the preset? They are available on https://www.iso.org/obp/ui/#search/code/
comment:7 by , 14 months ago
Replying to gaben:
Is it worth adding the codes to the preset? They are available at https://www.iso.org/obp/ui/#search/code/
That could be interesting. If this option is included, then multiple countries should be allowed, as some embassies in some places are for several countries.
comment:8 by , 14 months ago
Replying to gaben:
Is it worth adding the codes to the preset? They are available on https://www.iso.org/obp/ui/#search/code/
Maybe? I'd rather implement the Vespucci value_type
extension with an additional option (e.g. ISO 3166-1 alpha-2
); I'd rather not have hardcoded country codes that we have to update every time country <bar> changes (we'd have to update the boundaries.xml file, but that is one location, instead of many).
comment:9 by , 14 months ago
Adding values to the preset auto add it to the validator as well, so anything not defined would raise some message.
Also there is a values_from="java.util.Locale#getISOCountries"
option which is depending on the JVM.
comment:10 by , 14 months ago
I like that better. For now.
I'm working through the popular tags right now, so I'll wrap that in for those changes.
by , 14 months ago
Attachment: | weirdness.png added |
---|
comment:11 by , 14 months ago
It may be a solution, but in my locale (Hungarian) with a specific JDK (openjdk 17.0.8.1) I see a weird value, see the screenshot. At this point I'm not saying anything. It's getting more and more complex, better to leave it as it is.
follow-up: 13 comment:12 by , 14 months ago
See #23184 for the popular tags, if you want to critique me. Or better yet, make better icons. :)
I see a weird value, see the screenshot
I'll have to open it up in a debugger to see where Azon
is coming from. Probably a typo or something in the JDK. Which vendor are you actually using? Azul? I haven't been able to reproduce using JShell (Locale.setDefault(Locale.forLanguageTag("hu")); Arrays.stream(Locale.getISOCountries()).anyMatch(i -> i.equalsIgnoreCase("Azon"));
).
Maybe Azon
is saved in preferences somewhere as a last-used tag?
comment:13 by , 14 months ago
Replying to taylor.smock:
See #23184 for the popular tags, if you want to critique me. Or better yet, make better icons. :)
Sorry I don't get it.
Maybe
Azon
is saved in preferences somewhere as a last-used tag?
It may be the case, I'll check in the next days, just shut down the PC. In other locales it doesn't reproduce.
comment:14 by , 14 months ago
Also, embassy tag has several values: https://wiki.openstreetmap.org/wiki/Key:embassy
comment:15 by , 14 months ago
The "Azon" string is coming from trc(context, value)
inside PresetListEntry#getDisplayValue()
.
The context is null, so I18n#trc()
uses return tr(text)
where the text = "ID"
, so it uses translation data "Azon"
. Huh. Think like ID = Identification, but in Hungarian (ID = Azonosító).
I'm assuming you are talking about osmwiki:Key:country. If so, it was part of the
office=diplomatic
proposal, and we do haveoffice=diplomatic
in the presets.