Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18360 closed defect (fixed)

validator : wikipedia language code are not up to date

Reported by: pyrog Owned by: Don-vip
Priority: normal Milestone: 19.11
Component: Core validator Version:
Keywords: template_report wikipedia Cc:



The static list of language code is different from the wikimedia commons api (that list effective wiki sites and their languages).

The wikipedia.mapcss allow 127 languages that don't have yet wikipedia website.
And 8 languages are missing.

What steps will reproduce the problem?

  1. add the following tag: wikipedia=sje:Dummy
  1. press the validation button

What is the expected result?

Got this warning "la clé wikipedia contient un préfixe de langue inconnu"
(And this is an error as the wiki website couldn't be reached)

What happens instead?

No warning/error messages are displayed by the validator.
When opening the link (with tag2link plugin), the web browser can't open

It the Wikipedia plugin is installed, it display this error : "[Wiki] Unknown Wikipedia language prefix 'sje'!"

Please provide any additional information below. Attach a screenshot if possible.

For information, the wikipedia plugin download dynamically the uptodate list of wikipedia languages.


Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-11-24 21:23:35 +0100 (Sun, 24 Nov 2019)
Build-Date:2019-11-25 02:31:03
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15541 fr) Mac OS X 10.14.6
OS Build number: Mac OS X 10.14.6 (18G95)
Memory Usage: 596 MB / 1820 MB (126 MB allocated, but free)
Java version: 1.8.0_231-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 69732928 1280x800
Maximum Screen Size: 1280x800
VM arguments: [<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin,, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/31/583aa85f-4a297e61, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, (development version), -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-72a21903.icns, -Djnlp.application.href= , -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found

+ CADTools (1008)
+ PicLayer (35104)
+ SeaMapEditor (34908)
+ apache-commons (35092)
+ apache-http (34908)
+ cadastre-fr (35194)
+ ejml (35122)
+ geotools (35169)
+ jaxb (35014)
+ jna (34908)
+ jts (35122)
+ opendata (35179)
+ reverter (35226)
+ tag2link (35149)
+ utilsplugin2 (35230)
+ wikipedia (1.1.3)

Tagging presets:

Validator rules:
+ ${HOME}/Downloads/Rules_Pictures.validator.mapcss

Last errors/warnings:
- W: Identifiant de territoire inconnu: JA
- W: Identifiant de territoire inconnu: JA
- W: Identifiant de territoire inconnu: JA
- W: Identifiant de territoire inconnu: JA
- W: Identifiant de territoire inconnu: JA
- W: Identifiant de territoire inconnu: JA
- W: connect timed out
- W: Already here Network is unreachable (connect failed)
- E: connect timed out
- W: Impossible de joindre le serveur. Veuillez vérifier votre connexion Internet.. Cause : connect timed out

Attachments (1)

wikipedia language code.csv (7.2 KB ) - added by pyrog 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by pyrog, 4 years ago

can't send you a .CSV file that compare both list

in reply to:  1 comment:2 by stoecker, 4 years ago

Replying to pyrog:

can't send you a .CSV file that compare both list

Either gzip/zip it or leave the URLs out (or make them non-URLs). Better would be, when you already provide a patch containing the necessary changes.

by pyrog, 4 years ago

Attachment: wikipedia language code.csv added

comment:3 by pyrog, 4 years ago

I removed the URLs, thanks 😀

Write a patch is better, but I'am not familiar with TRAC, don't have a Java toolchain.
The good thing maybe not to edit the regex manually, but do this (semi) automatically. That a design issue and need JOSM/Java specialists 😉

comment:4 by Klumbumbus, 4 years ago

Component: CoreCore validator

comment:5 by floscher, 4 years ago

As of today, these are the available language prefixes:


Plus these prefixes, but these Wikipedias are closed:


They should not be extracted from the URL mentioned in but rather from .
The former contains all languages for Wikimedia sites, but not for all of those languages there is a separate Wikipedia (e.g. de-formal is a language that you can select in the language picker, but there is no Wikipedia for it). The latter URL lists all languages, for which a Wikipedia exists.

comment:6 by Don-vip, 4 years ago

Keywords: wikipedia added
Milestone: 19.11
Owner: changed from team to Don-vip
Status: newassigned

comment:7 by Don-vip, 4 years ago

Resolution: fixed
Status: assignedclosed

In 15545/josm:

fix #18360 - fix list of wikipedia language prefixes

comment:8 by floscher, 4 years ago

At it looks to me as if there are encoding issues in the file: e.g. абвабв

comment:9 by Don-vip, 4 years ago

In 15546/josm:

see #18360 - fix encoding issue

Modify Ticket

Change Properties
Set your email in Preferences
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.