Last modified: 2012-09-11 19:34:03 UTC
http://wlm.wikimedia.org/api/api.php?action=adminlevels&format=json&admtree=it contains 01-20, should be it-01 - it-20. See https://en.wikipedia.org/wiki/ISO_3166-2:IT for the list
Fixing.
CONCAT('it-',`regione`) AS `adm1`, should fix this. mysql> SELECT DISTINCT(adm1) FROM monuments_all WHERE country='it' AND lang='it' AND adm0= 'it'; +-------+ | adm1 | +-------+ | it-07 | | it-18 | | it-01 | | it-03 | | it-04 | | it-05 | | it-06 | | it-08 | | it-11 | | it-09 | | it-10 | | it-12 | | it-15 | | it-13 | | it-14 | | it-02 | | it-16 | | it-17 | | it-19 | | it-20 | +-------+ 20 rows in set (0.00 sec)
*** Bug 39873 has been marked as a duplicate of this bug. ***
This does not actually solve the problem, as those adm1 regions are NOT ISO-3166-2 codes. Compare against: http://en.wikipedia.org/wiki/ISO_3166-2:IT adm2 codes also appear to be only digits, although perhaps that was actually intended?
Oh, right, this is a mess. The source data should be fixed and than we can pick it up in the database. Lodewijk, can you contact the right people?
I guess Frieda would know who to poke :)
We're not using simile digits, we're using Istat codes (look for "codice ISTAT" for instance here http://it.wikipedia.org/wiki/Lombardia). Those are the official code for geopolitical entities in Italy. Same kind of codes are used for towns..
That codes (it-01, it-02, it-03, ..., it-20) should be mapped to region names. In fact they are displayed in the WLM app on Android, which is of little use. I don't know if this is the right place to point this out, but in Also, the monuments in the list are shown by ID number and not with their names. Cristian
(In reply to comment #8) > That codes (it-01, it-02, it-03, ..., it-20) should be mapped to region names. > In fact they are displayed in the WLM app on Android, which is of little use. Agreed. At this point in the game, we unfortunately cannot add support for other standards like ISTAT. Most if not all other campaigns are using ISO-3166-2, and that is what is currently supported. Without switching to ISO-3166-2 codes, Italian regions will not be human-readable in the android app, and additionally might cause confusion for others using the APIs who, by convention, expect to that the topmost adm levels be ISO-3166-2 codes.
(In reply to comment #9) > (In reply to comment #8) > > That codes (it-01, it-02, it-03, ..., it-20) should be mapped to region names. > > In fact they are displayed in the WLM app on Android, which is of little use. > > Agreed. At this point in the game, we unfortunately cannot add support for > other standards like ISTAT. Most if not all other campaigns are using > ISO-3166-2, and that is what is currently supported. Well, having ISTAT codes displayed in the WLM app wouldn't help much. I think Frieda misunderstood the question. > Without switching to ISO-3166-2 codes, Italian regions will not be > human-readable in the android app, and additionally might cause confusion for > others using the APIs who, by convention, expect to that the topmost adm levels > be ISO-3166-2 codes. strong +1. Cristian
(In reply to comment #10) > Well, having ISTAT codes displayed in the WLM app wouldn't help much. I think > Frieda misunderstood the question. Actually it was me that misunderstood the point. I'll correct the template with iso codes for Italian region. But I'm wonderig what I have to do for municipalities codes. Cristian
I think we have fixed it. * Comune field renamed to comune-id (the one with the number) * New field regione-iso for https://en.wikipedia.org/wiki/ISO_3166-2:IT#Regions (adm1) * New field prov=iso for https://en.wikipedia.org/wiki/ISO_3166-2:IT#Provinces (adm2) * New field comune filled with the name of the comune (adm3) Data looks good: mysql> SELECT DISTINCT(CONCAT(`regione-iso`, ' - ', `prov-iso`, ' - ', `comune`)) FROM `monuments_it_(it)` WHERE NOT `regione-iso`=''lIMIT 10; +--------------------------------------------------------------+ | (CONCAT(`regione-iso`, ' - ', `prov-iso`, ' - ', `comune`)) | +--------------------------------------------------------------+ | IT-25 - IT-PV - [[Pavia]] | +--------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> SELECT DISTINCT(CONCAT(`adm1`, ' - ', `adm2`, ' - ', `adm3`)) FROM `monuments_all` WHERE lang='it' AND country='it' AND adm0='it' AND NOT `adm1`=''lIMIT 10; +-------------------------------------------------+ | (CONCAT(`adm1`, ' - ', `adm2`, ' - ', `adm3`)) | +-------------------------------------------------+ | IT-25 - IT-PV - [[Pavia]] | +-------------------------------------------------+ 1 row in set (0.04 sec) The rest of the entries will be populated this weekend
Due to the changes in the Momuments template (see bug 38325[*]) the list in the WLM Android app should be fixable now. Cristian [*]https://bugzilla.wikimedia.org/show_bug.cgi?id=38325
We now have human readable Italian regions showing up in the app :D Thanks for updating the data!